Pagini recente » Borderou de evaluare (job #2125876) | Borderou de evaluare (job #1955228) | Borderou de evaluare (job #2910541) | Borderou de evaluare (job #2462705) | Borderou de evaluare (job #2840946)
Borderou de evaluare (job #2840946)
Raport evaluator
Compilare:
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<fstream>
| ^~~~~~
main.cpp:2:125: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | int f[26969];int n,i,m,c,a,j;void u(){for(j=i;j<=n;j+=j&-j)f[j]+=a;}int s(int i){int s=0;for(;i>0;i-=i&-i)s+=f[i];return s;}main(){std::ifstream f("datorii.in");std::ofstream g("datorii.out");f>>n>>m;for(i=1;i<=n;i++){f>>a;u();}while(m--){f>>c>>i>>a;if(c)g<<s(a)-s(i-1)<<'\n';else a=-a,u();}}
| ^~~~
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 88ms | 716kb | Corect! | 20 |
2 | 88ms | 716kb | Corect! | 20 |
3 | 88ms | 724kb | Corect! | 20 |
4 | 88ms | 716kb | Corect! | 20 |
5 | 88ms | 716kb | Corect! | 20 |
Punctaj total | 100 |