답안 #107637

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
107637 2019-04-25T11:15:19 Z dfistric 수열 (BOI14_sequence) C++14
9 / 100
379 ms 612 KB
#include <bits/stdc++.h>

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define FORd(i, a, b) for (int i = (a); i >= (b); i--)
#define REP(i, n) FOR(i, 0, n)
#define ll long long

using namespace std;

const int MAXN = 100100;
int arr[MAXN];

int main() {
    ios_base::sync_with_stdio(false);
 
    int n;
    cin >> n;
    REP(i, n) cin >> arr[i];
    
    REP(k, 1001) {
        int good = 1;
        REP(i, n) {
            int flag = 0, t = k + i;
            while (t > 0) {
                if (t % 10 == arr[i]) flag = 1;
                t /= 10;
            }

            if (!flag) good = 0;
        }
        if (good) {
            cout << k << "\n";
            return 0;
        }
    }

    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 6 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 3 ms 384 KB Output is correct
6 Correct 2 ms 432 KB Output is correct
7 Correct 3 ms 384 KB Output is correct
8 Correct 8 ms 384 KB Output is correct
9 Correct 2 ms 384 KB Output is correct
10 Correct 3 ms 384 KB Output is correct
11 Correct 3 ms 384 KB Output is correct
12 Correct 2 ms 384 KB Output is correct
13 Correct 2 ms 384 KB Output is correct
14 Correct 9 ms 384 KB Output is correct
15 Correct 8 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 5 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 384 KB Output is correct
6 Correct 2 ms 384 KB Output is correct
7 Incorrect 9 ms 384 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 380 KB Output is correct
2 Incorrect 77 ms 384 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 7 ms 384 KB Output is correct
3 Correct 3 ms 384 KB Output is correct
4 Correct 3 ms 384 KB Output is correct
5 Incorrect 379 ms 612 KB Output isn't correct
6 Halted 0 ms 0 KB -