# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
418933 | VladM | Sequence (BOI14_sequence) | C++14 | 1 ms | 332 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
long long n, k, b[1007], flag, totflag, c;
vector<long long> vec;
void get_char(long long a)
{
vec.clear();
while(a>0)
{
vec.push_back(a%10);
a/=10;
}
return;
}
int main()
{
cin>>k;
for(int i=1; i<=k; i++) cin>>b[i];
for(int n=1; n<=1000; n++)
{
totflag=0;
for(int i=1; i<=k; i++)
{
c=n+i-1;
get_char(c);
flag=0;
for(int j=0; j<vec.size(); j++)
{
if(vec[j]==b[i]) flag=1;
}
if(flag==0)
{
totflag=1;
break;
}
}
if(totflag==0)
{
cout<<n<<endl;
break;
}
}
return 0;
}
Compilation message (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... |