Pagini recente » Borderou de evaluare (job #2468943) | Borderou de evaluare (job #1653305) | Borderou de evaluare (job #361383) | Borderou de evaluare (job #2133575) | Borderou de evaluare (job #2740016)
Borderou de evaluare (job #2740016)
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,999);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<<'\n';for(auto i:h)g<<i.first<<' '<<i.second<<'\n';}
^~~~~
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,999);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<<'\n';for(auto i:h)g<<i.first<<' '<<i.second<<'\n';}
^
main.cpp: In function 'int main()':
main.cpp:2:170: 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,999);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<<'\n';for(auto i:h)g<<i.first<<' '<<i.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 | Raspuns Gresit | 0 |
5 | 3ms | 131kb | OK! | 10 |
6 | 3ms | 131kb | OK! | 10 |
7 | 2ms | 131kb | Raspuns Gresit | 0 |
8 | 3ms | 131kb | OK! | 10 |
9 | 3ms | 131kb | OK! | 10 |
10 | 2ms | 131kb | OK! | 10 |
Punctaj total | 80 |