Borderou de evaluare (job #2740036)

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

Raport evaluator

Compilare: main.cpp:2:107: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] using namespace std;ifstream I("reteta2");ofstream O("reteta2.out");map<string,int>i;char r[999],*S,*c,*m="( )";int T;main(){I.get(r,1000);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:124: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] using namespace std;ifstream I("reteta2");ofstream O("reteta2.out");map<string,int>i;char r[999],*S,*c,*m="( )";int T;main(){I.get(r,1000);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:168: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses] using namespace std;ifstream I("reteta2");ofstream O("reteta2.out");map<string,int>i;char r[999],*S,*c,*m="( )";int T;main(){I.get(r,1000);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
12ms131kbRaspuns Gresit0
22ms131kbRaspuns Gresit0
32ms131kbRaspuns Gresit0
42ms131kbRaspuns Gresit0
52ms131kbRaspuns Gresit0
62ms131kbRaspuns Gresit0
72ms131kbRaspuns Gresit0
82ms131kbRaspuns Gresit0
92ms131kbRaspuns Gresit0
102ms131kbRaspuns Gresit0
Punctaj total0

Ceva nu functioneaza?