Borderou de evaluare (job #3244318)

Utilizator tonealexandruTone Alexandru tonealexandru Data 24 septembrie 2024 15:44:12
Problema Parantezare Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 100

Raport evaluator

Compilare: main.cpp:2:52: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | using namespace std;int f[99999],n,a,i;stack<int>p;main(){ifstream z("parantezare.in");ofstream g("parantezare.out");string s;z>>s>>n;while(i<s.size()){if(s[i]=='(')p.push(i);if(s[i]==')')f[p.top()]=i,p.pop();i++;}i=0;while(i<n)z>>a,g<<f[a]<<" ",i++;} | ^~~~ main.cpp: In function 'int main()': main.cpp:2:142: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare] 2 | using namespace std;int f[99999],n,a,i;stack<int>p;main(){ifstream z("parantezare.in");ofstream g("parantezare.out");string s;z>>s>>n;while(i<s.size()){if(s[i]=='(')p.push(i);if(s[i]==')')f[p.top()]=i,p.pop();i++;}i=0;while(i<n)z>>a,g<<f[a]<<" ",i++;} | ~^~~~~~~~~
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms303kbOK10
20ms303kbOK10
30ms303kbOK10
40ms303kbOK10
50ms303kbOK10
60ms303kbOK10
70ms303kbOK10
80ms303kbOK10
91ms819kbOK10
101ms819kbOK10
Punctaj total100

Ceva nu functioneaza?