Borderou de evaluare (job #2740018)

Utilizator bubblegumixUdrea Robert bubblegumix Data 10 aprilie 2021 22:49:39
Problema Reteta2 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 10

Raport evaluator

Compilare: main.cpp:2:91: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] using namespace std;ifstream f("reteta2.in");ofstream g("reteta2.out");char s[1],*c,*p,*l=" ()";int t;map<string,int>h;main(){f.get(s,1001);c=strtok(s,l);while(c){if(*c>'/'&*c<':')t+=atoi(c);else{p=strtok(0,l),h[c]+=atoi(p);}c=strtok(0,l);}g<<t<<'\n';for(auto i:h)g<<i.first<<' '<<i.second<<'\n';} ^~~~~ main.cpp:2:125: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] using namespace std;ifstream f("reteta2.in");ofstream g("reteta2.out");char s[1],*c,*p,*l=" ()";int t;map<string,int>h;main(){f.get(s,1001);c=strtok(s,l);while(c){if(*c>'/'&*c<':')t+=atoi(c);else{p=strtok(0,l),h[c]+=atoi(p);}c=strtok(0,l);}g<<t<<'\n';for(auto i:h)g<<i.first<<' '<<i.second<<'\n';} ^ main.cpp: In function 'int main()': main.cpp:2:169: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] using namespace std;ifstream f("reteta2.in");ofstream g("reteta2.out");char s[1],*c,*p,*l=" ()";int t;map<string,int>h;main(){f.get(s,1001);c=strtok(s,l);while(c){if(*c>'/'&*c<':')t+=atoi(c);else{p=strtok(0,l),h[c]+=atoi(p);}c=strtok(0,l);}g<<t<<'\n';for(auto i:h)g<<i.first<<' '<<i.second<<'\n';} ~~^~~~
Test Timp executie Memorie folosita Mesaj Punctaj/test
12ms131kbOK!10
23ms131kbKilled by Signal 110
32ms131kbKilled by Signal 110
42ms131kbKilled by Signal 110
53ms131kbKilled by Signal 110
62ms131kbKilled by Signal 110
72ms131kbKilled by Signal 110
82ms131kbKilled by Signal 110
92ms131kbKilled by Signal 110
102ms131kbKilled by Signal 110
Punctaj total10

Ceva nu functioneaza?