Borderou de evaluare (job #2740019)

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

Raport evaluator

Compilare: main.cpp:2:89: 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,*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:123: 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,*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:167: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] using namespace std;ifstream f("reteta2.in");ofstream g("reteta2.out");char *s,*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
13ms131kbKilled by Signal 110
23ms131kbKilled by Signal 110
32ms131kbKilled by Signal 110
43ms131kbKilled by Signal 110
53ms131kbKilled by Signal 110
62ms131kbKilled by Signal 110
73ms131kbKilled by Signal 110
83ms131kbKilled by Signal 110
92ms131kbKilled by Signal 110
103ms131kbKilled by Signal 110
Punctaj total0

Ceva nu functioneaza?