Borderou de evaluare (job #2740037)

Utilizator C_DanyConstantin Daniel C_Dany Data 10 aprilie 2021 23:37:44
Problema Reteta2 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Compilare: main.cpp:2:110: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] using namespace std;ifstream I("reteta2.in");ofstream O("reteta2.out");map<string,int>i;char r[999],*S,*c,*m="( )";int T;main(){I>>r;S=strtok(r,m);while(S){if(*S>'/'&*S<':')T+=atoi(S);else{c=strtok(0,m);i[S]+=atoi(c);}S=strtok(0,m);}O<<T<<'\n';for(auto t:i)O<<t.first<<' '<<t.second<<'\n';} ^~~~~ main.cpp:2:127: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] using namespace std;ifstream I("reteta2.in");ofstream O("reteta2.out");map<string,int>i;char r[999],*S,*c,*m="( )";int T;main(){I>>r;S=strtok(r,m);while(S){if(*S>'/'&*S<':')T+=atoi(S);else{c=strtok(0,m);i[S]+=atoi(c);}S=strtok(0,m);}O<<T<<'\n';for(auto t:i)O<<t.first<<' '<<t.second<<'\n';} ^ main.cpp: In function 'int main()': main.cpp:2:162: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] using namespace std;ifstream I("reteta2.in");ofstream O("reteta2.out");map<string,int>i;char r[999],*S,*c,*m="( )";int T;main(){I>>r;S=strtok(r,m);while(S){if(*S>'/'&*S<':')T+=atoi(S);else{c=strtok(0,m);i[S]+=atoi(c);}S=strtok(0,m);}O<<T<<'\n';for(auto t:i)O<<t.first<<' '<<t.second<<'\n';} ~~^~~~
Test Timp executie Memorie folosita Mesaj Punctaj/test
12ms131kbKilled by Signal 110
22ms131kbKilled by Signal 110
33ms131kbKilled by Signal 110
42ms131kbKilled by Signal 110
52ms131kbKilled by Signal 110
62ms131kbKilled by Signal 110
72ms131kbKilled by Signal 110
83ms131kbKilled by Signal 110
93ms131kbKilled by Signal 110
102ms131kbKilled by Signal 110
Punctaj total0

Ceva nu functioneaza?