# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
94161 | 2019-01-16T12:06:43 Z | AKaan37 | Nizin (COCI16_nizin) | C++14 | 111 ms | 31324 KB |
#include <bits/stdc++.h> using namespace std; typedef long long int lo; typedef pair<int,int> PII; #define fi first #define se second #define pb push_back #define mp make_pair #define FOR for(lo i=1;i<=n;i++) #define mid (start+end)/2 const lo mod = 1000000007; const lo li = 1000001; const lo inf = 1000000000; const lo MAX = 1000000000000000000; const lo MIN = -1000000000000000000; const lo LOG = 30; lo n,m,cev,a[li],oo,ama,kk,vis[li],gogo,nono; vector<lo> v; int main(){ scanf("%lld",&n); FOR{ scanf("%lld",&a[i]); } FOR{ if(vis[i]==1) continue; while(a[i]!=a[n-i+1]){ if(a[i]>a[n-i+1]){ gogo++; a[n-i+1]+=a[n-i+1-gogo]; vis[n-i+1-gogo]=1; oo++; } if(a[i]<a[n-i+1]){ nono++; a[i]+=a[i+nono]; vis[i+nono]=1; oo++; } } } printf("%lld\n",oo); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Runtime error | 2 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 20 ms | 16248 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 20 ms | 16248 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 508 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 11 ms | 2936 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 43 ms | 11384 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 85 ms | 24220 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 111 ms | 31324 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |