Submission #107635

# Submission time Handle Problem Language Result Execution time Memory
107635 2019-04-25T11:14:40 Z dfistric Sequence (BOI14_sequence) C++14
0 / 100
4 ms 384 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;
            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;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Incorrect 4 ms 384 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -