Pagini recente » Borderou de evaluare (job #2927152) | Borderou de evaluare (job #2527691) | Borderou de evaluare (job #3288760) | Borderou de evaluare (job #1496501) | Borderou de evaluare (job #2740014)
Borderou de evaluare (job #2740014)
Raport evaluator
Compilare:
main.cpp:2:93: 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[999],*c,*p,*l=" ()";int t;map<string,int>h;main(){f.get(s,1002);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<<endl;for(auto i:h)g<<i.first<<' '<<i.second<<endl;}
^~~~~
main.cpp:2:127: 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[999],*c,*p,*l=" ()";int t;map<string,int>h;main(){f.get(s,1002);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<<endl;for(auto i:h)g<<i.first<<' '<<i.second<<endl;}
^
main.cpp: In function 'int main()':
main.cpp:2:171: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
using namespace std;ifstream f("reteta2.in");ofstream g("reteta2.out");char s[999],*c,*p,*l=" ()";int t;map<string,int>h;main(){f.get(s,1002);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<<endl;for(auto i:h)g<<i.first<<' '<<i.second<<endl;}
~~^~~~
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 2ms | 131kb | OK! | 10 |
2 | 2ms | 131kb | OK! | 10 |
3 | 3ms | 131kb | OK! | 10 |
4 | 2ms | 131kb | OK! | 10 |
5 | 2ms | 131kb | OK! | 10 |
6 | 4ms | 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 |