# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
65277 |
2018-08-07T09:36:13 Z |
gnoor |
Gondola (IOI14_gondola) |
C++17 |
|
21 ms |
916 KB |
#include "gondola.h"
#include <cmath>
#include <cstdio>
int valid(int n, int inputSeq[])
{
int key=-1e9;
int id=-1;
int cur;
for (int i=0;i<n;i++) {
if (inputSeq[i]>n) continue;
cur=i-inputSeq[i];
if (id==-1) {
key=cur;
id=inputSeq[i];
}
if (inputSeq[i]<id) cur-=n;
if (key!=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 |
3 ms |
248 KB |
Output is correct |
2 |
Correct |
2 ms |
484 KB |
Output is correct |
3 |
Correct |
3 ms |
564 KB |
Output is correct |
4 |
Correct |
2 ms |
564 KB |
Output is correct |
5 |
Correct |
2 ms |
564 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
564 KB |
Output is correct |
2 |
Correct |
3 ms |
564 KB |
Output is correct |
3 |
Correct |
2 ms |
592 KB |
Output is correct |
4 |
Correct |
2 ms |
592 KB |
Output is correct |
5 |
Correct |
2 ms |
592 KB |
Output is correct |
6 |
Correct |
8 ms |
744 KB |
Output is correct |
7 |
Correct |
15 ms |
916 KB |
Output is correct |
8 |
Correct |
19 ms |
916 KB |
Output is correct |
9 |
Correct |
7 ms |
916 KB |
Output is correct |
10 |
Correct |
14 ms |
916 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
916 KB |
Output is correct |
2 |
Correct |
2 ms |
916 KB |
Output is correct |
3 |
Correct |
2 ms |
916 KB |
Output is correct |
4 |
Correct |
2 ms |
916 KB |
Output is correct |
5 |
Correct |
2 ms |
916 KB |
Output is correct |
6 |
Correct |
8 ms |
916 KB |
Output is correct |
7 |
Correct |
21 ms |
916 KB |
Output is correct |
8 |
Correct |
21 ms |
916 KB |
Output is correct |
9 |
Correct |
6 ms |
916 KB |
Output is correct |
10 |
Correct |
14 ms |
916 KB |
Output is correct |
11 |
Incorrect |
3 ms |
916 KB |
Output isn't correct |
12 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
916 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
916 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
916 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
916 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
916 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
916 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
916 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |