# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
352618 | MilosMilutinovic | Sequence (BOI14_sequence) | C++14 | 5 ms | 620 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int N=100050;
int n,a[N];
auto Do(int x){
vector<int> a;
while(x){
a.push_back(x%10);
x/=10;
}
return a;
}
int main(){
scanf("%i",&n);
for(int i=0;i<n;i++)scanf("%i",&a[i]);
for(int i=0;i<=1000;i++){
bool ok=1;
for(int j=0;j<n;j++){
auto dgt=Do(i+j);
bool have=0;
for(int c:dgt)if(c==a[j])have=1;
if(!have){
ok=0;
break;
}
}
if(ok){
printf("%i",i);
return 0;
}
}
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |