답안 #938228

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
938228 2024-03-05T03:15:15 Z Faisal_Saqib 수열 (BOI14_sequence) C++17
0 / 100
65 ms 600 KB
#include <iostream>
#include <string>
using namespace std;
bool is_in(int x,int y)
{
    string s=to_string(x);
    string yp="";
    yp+=char(y+'0');
    return s.find(yp)!=string::npos;
}
int main()
{
    int n;
    cin>>n;
    int b[n];
    for(int i=0;i<n;i++)
        cin>>b[i];
    for(int ans=0;ans<=1e6;ans++)
    {
        bool pos=1;
        for(int j=0;j<n;j++)
        {
            if(!is_in(ans+j,b[j]))
                {
                    pos=0;
                    break;
                }   
        }
        if(pos)
        {
            cout<<ans<<endl;
            break;
        }
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Incorrect 0 ms 348 KB Output isn't correct
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Incorrect 0 ms 348 KB Output isn't correct
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 600 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 436 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 436 KB Output is correct
5 Incorrect 65 ms 600 KB Output isn't correct
6 Halted 0 ms 0 KB -