답안 #755181

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
755181 2023-06-09T13:50:18 Z AliHasanli 수열 (BOI14_sequence) C++17
9 / 100
1000 ms 340 KB
#include<bits/stdc++.h>
using namespace std;
bool check_is_number_has(int n,int a)
{
    while(n>0)
    {
        if(n%10==a)return true;
        n/=10;
    }
    return false;
}
bool check(int a,int k,int numberarray[])
{
    for(int i=a;i<=k+a-1;i++)
        if(!check_is_number_has(i,numberarray[i-a]))
            return false;
    return true;
}
void print(int n,int k)
{
    cout<<n;
    exit(0);
}
int main (){
    int k;
    cin>>k;
    int a[k];
    for(int i=0;i<k;i++)
    cin>>a[i];
    for(int i=a[0];i<=1000000;i++)
    {
        bool flag=check(i,k,a);
        if(flag)print(i,k);
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Incorrect 430 ms 212 KB Output isn't correct
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 36 ms 324 KB Output is correct
3 Execution timed out 1079 ms 308 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Incorrect 26 ms 340 KB Output isn't correct
6 Halted 0 ms 0 KB -