# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
65278 |
2018-08-07T09:40:12 Z |
gnoor |
Gondola (IOI14_gondola) |
C++17 |
|
23 ms |
876 KB |
#include "gondola.h"
#include <cmath>
#include <cstdio>
int valid(int n, int inputSeq[])
{
int key=-1;
int id=-1;
int cur;
for (int i=0;i<n;i++) inputSeq[i]--;
for (int i=0;i<n;i++) {
if (inputSeq[i]>=n) continue;
key=inputSeq[i];
id=i;
}
for (int i=0;i<n;i++) {
if (inputSeq[i]>=n) continue;
cur=key+i-id;
cur%=n;
cur+=n;
cur%=n;
if (inputSeq[i]!=cur) return 0;
}
return 1;
}
//----------------------
int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
return -2;
}
//----------------------
int countReplacement(int n, int inputSeq[])
{
return -3;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
3 ms |
488 KB |
Output is correct |
3 |
Correct |
2 ms |
488 KB |
Output is correct |
4 |
Correct |
2 ms |
488 KB |
Output is correct |
5 |
Correct |
2 ms |
488 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
488 KB |
Output is correct |
2 |
Correct |
2 ms |
488 KB |
Output is correct |
3 |
Correct |
2 ms |
488 KB |
Output is correct |
4 |
Correct |
3 ms |
488 KB |
Output is correct |
5 |
Correct |
2 ms |
488 KB |
Output is correct |
6 |
Correct |
7 ms |
624 KB |
Output is correct |
7 |
Correct |
23 ms |
828 KB |
Output is correct |
8 |
Correct |
13 ms |
876 KB |
Output is correct |
9 |
Correct |
6 ms |
876 KB |
Output is correct |
10 |
Correct |
15 ms |
876 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
876 KB |
Output is correct |
2 |
Correct |
3 ms |
876 KB |
Output is correct |
3 |
Correct |
2 ms |
876 KB |
Output is correct |
4 |
Correct |
2 ms |
876 KB |
Output is correct |
5 |
Correct |
2 ms |
876 KB |
Output is correct |
6 |
Correct |
13 ms |
876 KB |
Output is correct |
7 |
Correct |
20 ms |
876 KB |
Output is correct |
8 |
Correct |
15 ms |
876 KB |
Output is correct |
9 |
Correct |
5 ms |
876 KB |
Output is correct |
10 |
Correct |
21 ms |
876 KB |
Output is correct |
11 |
Incorrect |
2 ms |
876 KB |
Output isn't correct |
12 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
876 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
876 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
876 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
876 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
876 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
876 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
876 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |