# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
105635 |
2019-04-13T18:50:34 Z |
pamaj |
Sequence (BOI14_sequence) |
C++14 |
|
1000 ms |
108152 KB |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e7 + 10, maxm = 1e5 + 10;
bool num[maxn][11];
int n, v[maxm];
int main()
{
ios::sync_with_stdio(false), cin.tie(nullptr);
num[0][0] = true;
for(int i = 1; i < maxn; i++)
{
int p = i;
while(p)
{
num[i][p%10] = true;
p /= 10;
}
}
cin >> n;
for(int i = 0; i < n; i++)
{
cin >> v[i];
}
for(int i = 10; i < maxn - n - 1; i++)
{
bool ok = true;
for(int j = 0; j < n; j++)
{
if(!num[i + j][v[j]]) ok = false;
}
if(ok)
{
cout << i << "\n";
return 0;
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
218 ms |
107896 KB |
Output is correct |
2 |
Correct |
212 ms |
107900 KB |
Output is correct |
3 |
Incorrect |
216 ms |
107896 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
238 ms |
107896 KB |
Output is correct |
2 |
Correct |
207 ms |
108152 KB |
Output is correct |
3 |
Incorrect |
235 ms |
107924 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
216 ms |
108016 KB |
Output is correct |
2 |
Execution timed out |
1062 ms |
108012 KB |
Time limit exceeded |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
206 ms |
108012 KB |
Output is correct |
2 |
Correct |
291 ms |
108016 KB |
Output is correct |
3 |
Incorrect |
215 ms |
107976 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |