Mai intai trebuie sa te autentifici.
Borderou de evaluare (job #2740033)
| Utilizator | Data | 10 aprilie 2021 23:30:47 | |
|---|---|---|---|
| Problema | Reteta2 | Status | done |
| Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
| Scor | 100 | ||
Raport evaluator
Compilare:
main.cpp:3:110: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
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=s(r)while(S){if(*S>'/'&*S<':')T+=atoi(S);else{c=s(0)i[S]+=atoi(c);}S=s(0)}O<<T<<'\n';for(auto t:i)O<<t.first<<' '<<t.second<<'\n';}
^~~~~
main.cpp:3:127: 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=s(r)while(S){if(*S>'/'&*S<':')T+=atoi(S);else{c=s(0)i[S]+=atoi(c);}S=s(0)}O<<T<<'\n';for(auto t:i)O<<t.first<<' '<<t.second<<'\n';}
^
main.cpp: In function 'int main()':
main.cpp:3:163: 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=s(r)while(S){if(*S>'/'&*S<':')T+=atoi(S);else{c=s(0)i[S]+=atoi(c);}S=s(0)}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 | 2ms | 131kb | OK! | 10 |
| 4 | 2ms | 131kb | OK! | 10 |
| 5 | 2ms | 131kb | OK! | 10 |
| 6 | 3ms | 131kb | OK! | 10 |
| 7 | 3ms | 131kb | OK! | 10 |
| 8 | 2ms | 131kb | OK! | 10 |
| 9 | 3ms | 131kb | OK! | 10 |
| 10 | 3ms | 131kb | OK! | 10 |
| Punctaj total | 100 | |||
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
