Borderou de evaluare (job #2740011)

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

Raport evaluator

Compilare: main.cpp:2:129: 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[1001],*c,*p,l[]=" ()";int t;map<string,int>h;main(){f.get(s,1002);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<<endl;for(auto i:h)g<<i.first<<' '<<i.second<<endl;} ^ main.cpp: In function 'int main()': main.cpp:2:173: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] using namespace std;ifstream f("reteta2.in");ofstream g("reteta2.out");char s[1001],*c,*p,l[]=" ()";int t;map<string,int>h;main(){f.get(s,1002);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<<endl;for(auto i:h)g<<i.first<<' '<<i.second<<endl;} ~~^~~~
Test Timp executie Memorie folosita Mesaj Punctaj/test
12ms131kbOK!10
22ms131kbOK!10
33ms131kbOK!10
43ms131kbOK!10
53ms131kbOK!10
64ms131kbOK!10
73ms131kbOK!10
83ms131kbOK!10
93ms131kbOK!10
103ms131kbOK!10
Punctaj total100

Ceva nu functioneaza?