Pagini recente » Borderou de evaluare (job #885897) | Borderou de evaluare (job #256008) | Borderou de evaluare (job #383318) | Borderou de evaluare (job #3132888) | Borderou de evaluare (job #3244540)
Borderou de evaluare (job #3244540)
Raport evaluator
Compilare:
main.cpp: In function 'int main()':
main.cpp:2:291: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
2 | using namespace std;ifstream fin("editor.in");ofstream fout("editor.out");int main(){int t;fin >> t;while(t--){char ch;vector<char> v;while(fin >> ch){if(ch == 'E')break;else if(ch == '*'){if(!v.empty())v.pop_back();}else v.push_back(ch);}stack<char> s;bool check = true;int j;for(j = 0; j < v.size(); j++){if(v[j] == '(' || v[j] == '['){s.push(v[j]);}else if(v[j] == ')' || v[j] == ']'){if(s.empty()){check = false;break;}char topch = s.top();s.pop();if((v[j] == ')' && topch != '(') || (v[j] == ']' && topch != '[')){check = false;break;}}}if(check && s.empty()) cout << ":)"; else fout << ":(";fout << '\n';}}
| ~~^~~~~~~~~~
| Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
Punctaj/grupa |
| 1 | 0ms | 303kb | Incorect | 0 | 0 |
| 2 | 0ms | 303kb | Incorect | 0 |
| 3 | 0ms | 303kb | Incorect | 0 |
| 4 | 0ms | 303kb | Incorect | 0 |
| 5 | 4ms | 303kb | Incorect | 0 | 0 |
| 6 | 5ms | 303kb | Incorect | 0 | 0 |
| 7 | 4ms | 303kb | Incorect | 0 | 0 |
| 8 | 14ms | 303kb | Incorect | 0 | 0 |
| 9 | 9ms | 303kb | Incorect | 0 | 0 |
| 10 | 19ms | 548kb | Incorect | 0 | 0 |
| Punctaj total | 0 |