# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
94174 | 2019-01-16T12:27:02 Z | AKaan37 | Nizin (COCI16_nizin) | C++14 | 117 ms | 66560 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 = 100000001; 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(i>n/2) break; 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++; //~ cout<<a[i]<<endl; } } } printf("%lld\n",oo); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Runtime error | 17 ms | 376 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 80 ms | 66560 KB | Execution killed with signal 9 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 18 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 82 ms | 66560 KB | Execution killed with signal 9 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 18 ms | 508 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 18 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 27 ms | 2252 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 55 ms | 8556 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 100 ms | 18256 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 117 ms | 23544 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |