Pagini recente » Borderou de evaluare (job #999533) | Borderou de evaluare (job #2723531) | Borderou de evaluare (job #2119555) | Borderou de evaluare (job #2610271) | Borderou de evaluare (job #2740042)
Borderou de evaluare (job #2740042)
Raport evaluator
Compilare:
main.cpp:2:109: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
using namespace std;fstream 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);for(;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:126: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
using namespace std;fstream 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);for(;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:170: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
using namespace std;fstream 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);for(;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 |
1 | 2ms | 131kb | OK! | 10 |
2 | 2ms | 131kb | OK! | 10 |
3 | 3ms | 131kb | OK! | 10 |
4 | 3ms | 131kb | OK! | 10 |
5 | 3ms | 131kb | OK! | 10 |
6 | 3ms | 131kb | OK! | 10 |
7 | 3ms | 131kb | OK! | 10 |
8 | 3ms | 131kb | OK! | 10 |
9 | 3ms | 131kb | OK! | 10 |
10 | 3ms | 131kb | OK! | 10 |
Punctaj total | 100 |