# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
103504 | 2019-03-30T20:28:15 Z | wilwxk | 수열 (BOI14_sequence) | C++11 | 6 ms | 640 KB |
#include <bits/stdc++.h> using namespace std; const int MAXN=1e5+5; int v[MAXN]; int n; bool procura(int val, int k) { if(val==k) return 1; while(val>=10) { if(val%10==k||val/10==k) return 1; val/=10; } return val==k; } bool testa(int k) { for(int i=1; i<=n; i++) { int cur=k+i-1; if(!procura(cur, v[i])) return 0; } return 1; } int main() { scanf("%d", &n); for(int i=1; i<=n; i++) scanf("%d", &v[i]); for(int i=0; i<=5000; i++) { if(testa(i)) { printf("%d\n", i); return 0; } } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 384 KB | Output is correct |
2 | Correct | 3 ms | 384 KB | Output is correct |
3 | Correct | 2 ms | 384 KB | Output is correct |
4 | Correct | 3 ms | 384 KB | Output is correct |
5 | Correct | 2 ms | 256 KB | Output is correct |
6 | Incorrect | 2 ms | 256 KB | Output isn't correct |
7 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 384 KB | Output is correct |
3 | Correct | 2 ms | 412 KB | Output is correct |
4 | Correct | 2 ms | 384 KB | Output is correct |
5 | Correct | 2 ms | 384 KB | Output is correct |
6 | Incorrect | 2 ms | 384 KB | Output isn't correct |
7 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 384 KB | Output is correct |
2 | Correct | 3 ms | 432 KB | Output is correct |
3 | Correct | 2 ms | 384 KB | Output is correct |
4 | Correct | 2 ms | 384 KB | Output is correct |
5 | Incorrect | 6 ms | 640 KB | Output isn't correct |
6 | Halted | 0 ms | 0 KB | - |