# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
118514 | 2019-06-19T06:38:41 Z | 이온조(#2899) | Sequence (BOI14_sequence) | C++14 | 5 ms | 512 KB |
#include <bits/stdc++.h> using namespace std; int B[100009]; int main() { int K; scanf("%d",&K); for(int i=0; i<K; i++) scanf("%d",&B[i]); //* for(int i=1; i<=1000; i++) { for(int j=0; j<K; j++) { bool fl = 1; int ii = i+j; while(ii) { if(ii % 10 == B[j]) fl = 0; ii /= 10; } if(fl) goto hell; } printf("%d", i); return 0; hell:; } //*/ int l = 10; if(B[0] == 9) { while(l+1 < K) l *= 10; while(l/10) { printf("8"); l /= 10; } puts("9"); } else if(B[0] == 0) { while(l+1 < K) l *= 10; printf("10"); while(l/10) { printf("0"); l /= 10; } } else { while(l < K) l *= 10; printf("%d", B[0]); while(l/10) { printf("0"); l /= 10; } } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 384 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 384 KB | Output is correct |
4 | Correct | 2 ms | 384 KB | Output is correct |
5 | Correct | 2 ms | 256 KB | Output is correct |
6 | Correct | 2 ms | 256 KB | Output is correct |
7 | Correct | 2 ms | 384 KB | Output is correct |
8 | Correct | 2 ms | 384 KB | Output is correct |
9 | Correct | 2 ms | 384 KB | Output is correct |
10 | Correct | 2 ms | 384 KB | Output is correct |
11 | Correct | 2 ms | 384 KB | Output is correct |
12 | Correct | 2 ms | 256 KB | Output is correct |
13 | Correct | 2 ms | 384 KB | Output is correct |
14 | Correct | 2 ms | 256 KB | Output is correct |
15 | Correct | 2 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 384 KB | Output is correct |
2 | Correct | 2 ms | 384 KB | Output is correct |
3 | Correct | 2 ms | 256 KB | Output is correct |
4 | Correct | 2 ms | 384 KB | Output is correct |
5 | Correct | 2 ms | 256 KB | Output is correct |
6 | Correct | 2 ms | 384 KB | Output is correct |
7 | Incorrect | 2 ms | 256 KB | Output isn't correct |
8 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Incorrect | 3 ms | 384 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 256 KB | Output is correct |
4 | Correct | 2 ms | 256 KB | Output is correct |
5 | Incorrect | 5 ms | 512 KB | Output isn't correct |
6 | Halted | 0 ms | 0 KB | - |