# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
118521 | 2019-06-19T07:16:50 Z | 송준혁(#2902) | Sequence (BOI14_sequence) | C++14 | 1000 ms | 412 KB |
#include <bits/stdc++.h> using namespace std; int N, ans=1; int A[101010]; bool chk(int x, int d){ if (!x) return false; if (x%10 == d) return true; return chk(x/10, d); } int main(){ scanf("%d", &N); for (int i=1; i<=N; i++) scanf("%d", &A[i]); while (1){ ans++; bool tf=true; for (int i=1; i<=N; i++){ if (!chk(ans+i-1, A[i])){ tf = false; break; } } if (tf) break; } printf("%d\n", ans); 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 | Incorrect | 2 ms | 384 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 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 | Incorrect | 2 ms | 384 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 46 ms | 412 KB | Output is correct |
3 | Execution timed out | 1073 ms | 384 KB | Time limit exceeded |
4 | 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 | Incorrect | 2 ms | 256 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |