# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
23479 | 2017-05-10T02:36:09 Z | TAMREF | 이상한 수열 (OJUZ10_bizarre) | C++11 | 19 ms | 11392 KB |
#include <bits/stdc++.h> using namespace std; int S[200000], A[2000005], cnt[200000]; const int bias=1000000; int main(){ int N,M; scanf("%d",&N); for(int i=1;i<=N;i++){ scanf("%d",&S[i]); cnt[i]=cnt[i-1]+(A[S[i]+bias]++?0:1); } scanf("%d",&M); if(M<=N) return !printf("%d\n",cnt[M]); cnt[N+1]=cnt[N]; for(int i=N+2;i<=M;i++) cnt[i]=cnt[i-1]+(A[cnt[i-1]+bias]++?0:1); return !printf("%d\n",cnt[M]); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Halted | 0 ms | 0 KB | - |
2 | Incorrect | 0 ms | 11392 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 11392 KB | Output is correct |
2 | Correct | 0 ms | 11392 KB | Output is correct |
3 | Correct | 0 ms | 11392 KB | Output is correct |
4 | Correct | 0 ms | 11392 KB | Output is correct |
5 | Correct | 0 ms | 11392 KB | Output is correct |
6 | Correct | 0 ms | 11392 KB | Output is correct |
7 | Correct | 0 ms | 11392 KB | Output is correct |
8 | Correct | 0 ms | 11392 KB | Output is correct |
9 | Correct | 0 ms | 11392 KB | Output is correct |
10 | Correct | 0 ms | 11392 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 11392 KB | Output isn't correct |
2 | Correct | 6 ms | 11392 KB | Output is correct |
3 | Correct | 3 ms | 11392 KB | Output is correct |
4 | Correct | 0 ms | 11392 KB | Output is correct |
5 | Halted | 0 ms | 0 KB | - |
6 | Correct | 3 ms | 11392 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 19 ms | 11392 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |