# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
94147 | 2019-01-16T11:47:22 Z | AKaan37 | Nizin (COCI16_nizin) | C++14 | 12 ms | 1988 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(int i=1;i<=n;i++) #define mid (start+end)/2 const lo mod = 1000000007; const lo li = 100005; const lo inf = 1000000000; const lo MAX = 1000000000000000000; const lo MIN = -1000000000000000000; const lo LOG = 30; int n,m,cev,a[li],oo,ama,kk; vector<int> v; int main(){ scanf("%d",&n); FOR{ scanf("%d",&a[i]); v.pb(a[i]); } FOR{ if(i>n/2 && n%2==1) break; if(i>=n/2 && n%2==0) break; while(v[i-1]!=v[v.size()-i]){ if(v[i-1]>v[v.size()-i]){ kk+=1; v[v.size()-i]=v[v.size()-i]+v[v.size()-i-kk]; //~ v.erase(v.begin()+n-i-ama); oo++; } if(v[i-1]<v[v.size()-i]){ ama+=1; v[i-1]=v[i-1]+v[i-1+ama]; //~ v.erase(v.begin()+i-1+ama); oo++; } //~ cout<<"hello"<<v[0]<<" "<<v[2]<<endl; } } //~ cout<<"**\n"; printf("%d\n",oo); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Runtime error | 2 ms | 376 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 376 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | 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 | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 376 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 376 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | 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 | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 12 ms | 1988 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 11 ms | 1268 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 11 ms | 1264 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 11 ms | 1248 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |