Pagini recente » Borderou de evaluare (job #143861) | Borderou de evaluare (job #3127508)
Borderou de evaluare (job #3127508)
Raport evaluator
Compilare:
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<bits/stdc++.h>
| ^~~~~~
main.cpp:2:61: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | using namespace std;map<string,int>M;int S,j,k,n,i;string s;main(){ifstream f("reteta2.in");ofstream g("reteta2.out");getline(f,s);auto e=remove(s.begin(),s.end(),32);s.erase(e,s.end());for(;s[i];++i){if(s[i]==')'){n=0;j=i+1;while(isdigit(s[j]))n=n*10+s[j]-48,j++;S+=n;i=j-1;}else if(isalpha(s[i])){j=i+1;while(isalpha(s[j]))++j;n=0;k=j;while(isdigit(s[k]))n*=10,n+=s[k]-48,k++;M[s.substr(i,j-i)]+=n;i=k-1;}}g<<S<<'\n';for(auto x:M)g<<x.first<<' '<<x.second<<'\n';}
| ^~~~
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 0ms | 303kb | OK! | 10 |
2 | 0ms | 303kb | OK! | 10 |
3 | 0ms | 303kb | OK! | 10 |
4 | 0ms | 303kb | OK! | 10 |
5 | 0ms | 303kb | OK! | 10 |
6 | 0ms | 303kb | OK! | 10 |
7 | 0ms | 303kb | OK! | 10 |
8 | 0ms | 303kb | OK! | 10 |
9 | 0ms | 303kb | OK! | 10 |
10 | 0ms | 303kb | OK! | 10 |
Punctaj total | 100 |