Borderou de evaluare (job #3244540)

Utilizator andreifilimonPopescu Filimon Andrei Cosmin andreifilimon Data 25 septembrie 2024 10:46:28
Problema Editor Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

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
10ms303kbIncorect00
20ms303kbIncorect0
30ms303kbIncorect0
40ms303kbIncorect0
54ms303kbIncorect00
65ms303kbIncorect00
74ms303kbIncorect00
814ms303kbIncorect00
99ms303kbIncorect00
1019ms548kbIncorect00
Punctaj total0

Ceva nu functioneaza?