Borderou de evaluare (job #2740028)

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

Raport evaluator

Compilare: main.cpp:3:128: 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.get(r,1000);S=strtok(r,m);while(S){if(*S>'/'&*S<':')T+=atoi(S);else{c=q;i[S]+=atoi(c);}S=q}O<<T<<'\n';for(auto t:i)O<<t.first<<' '<<t.second<<'\n';} ^ main.cpp: In function 'int main()': main.cpp:3:172: 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.get(r,1000);S=strtok(r,m);while(S){if(*S>'/'&*S<':')T+=atoi(S);else{c=q;i[S]+=atoi(c);}S=q}O<<T<<'\n';for(auto t:i)O<<t.first<<' '<<t.second<<'\n';} ~~^~~~
Test Timp executie Memorie folosita Mesaj Punctaj/test
13ms131kbOK!10
22ms131kbOK!10
32ms131kbOK!10
43ms131kbOK!10
52ms131kbOK!10
63ms131kbOK!10
72ms131kbOK!10
83ms131kbOK!10
93ms131kbOK!10
102ms131kbOK!10
Punctaj total100

Ceva nu functioneaza?