답안 #136065

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
136065 2019-07-24T16:56:46 Z forelax 수열 (BOI14_sequence) C++14
9 / 100
14 ms 632 KB
#include<bits/stdc++.h>
using namespace std;
vector<bool> digs(int ind){
    vector<bool> rez(10);
    do{
        rez[ind%10]=true;
    }while(ind/=10);
    return rez;
}
int n;
vector<int> v;
int main(){
    cin>>n;
    v.resize(n);
    for(int i = 0 ; i < n ; i ++)
        cin>>v[i];
    for(int i = 1 ; i <= 1000 ; i ++){
        bool good=true;
        for(int k = 0 ; k < n ; k ++){
            if(!digs(i+k)[v[k]]){
                good=false;
                break;
            }
        }
        if(good){
            cout<<i;
            return 0;
        }
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 256 KB Output is correct
8 Correct 2 ms 256 KB Output is correct
9 Correct 2 ms 256 KB Output is correct
10 Correct 2 ms 356 KB Output is correct
11 Correct 2 ms 376 KB Output is correct
12 Correct 2 ms 376 KB Output is correct
13 Correct 2 ms 252 KB Output is correct
14 Correct 2 ms 256 KB Output is correct
15 Correct 2 ms 380 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 272 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Incorrect 2 ms 256 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 6 ms 504 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Incorrect 14 ms 632 KB Output isn't correct
6 Halted 0 ms 0 KB -