#include "gondola.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
int n, u[N];
int valid(int N, int x[])
{
n = N;
for (int i = 0; i < n; i++)
{
if (u[x[i]] > 0)
return 0;
u[x[i]] = i + 1;
}
for (int i = 1; i < n; i++)
{
if ( u[i] != 0 && u[i + 1] != 0 && ((u[i] - 1) + 1) % n != u[i + 1] - 1)
return 0;
}
return 1;
}
//----------------------
int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
return -2;
}
//----------------------
int countReplacement(int n, int inputSeq[])
{
return -3;
}
/**
1
30
16 26 18 19 20 13 22 21 24 25 17 27 28 29 30 1 2 3 11 5 6 8 7 9 10 12 4 23 14 15
**/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
2 ms |
376 KB |
Output is correct |
3 |
Correct |
2 ms |
584 KB |
Output is correct |
4 |
Correct |
2 ms |
584 KB |
Output is correct |
5 |
Correct |
2 ms |
584 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
584 KB |
Output is correct |
2 |
Correct |
2 ms |
604 KB |
Output is correct |
3 |
Correct |
2 ms |
608 KB |
Output is correct |
4 |
Correct |
2 ms |
608 KB |
Output is correct |
5 |
Correct |
2 ms |
616 KB |
Output is correct |
6 |
Correct |
7 ms |
1132 KB |
Output is correct |
7 |
Correct |
14 ms |
1984 KB |
Output is correct |
8 |
Correct |
11 ms |
2248 KB |
Output is correct |
9 |
Correct |
5 ms |
2248 KB |
Output is correct |
10 |
Correct |
13 ms |
3052 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
3052 KB |
Output is correct |
2 |
Correct |
2 ms |
3052 KB |
Output is correct |
3 |
Correct |
2 ms |
3052 KB |
Output is correct |
4 |
Correct |
2 ms |
3052 KB |
Output is correct |
5 |
Correct |
2 ms |
3052 KB |
Output is correct |
6 |
Correct |
10 ms |
3052 KB |
Output is correct |
7 |
Correct |
15 ms |
3784 KB |
Output is correct |
8 |
Correct |
21 ms |
4036 KB |
Output is correct |
9 |
Correct |
6 ms |
4036 KB |
Output is correct |
10 |
Correct |
14 ms |
4744 KB |
Output is correct |
11 |
Correct |
2 ms |
4744 KB |
Output is correct |
12 |
Incorrect |
2 ms |
4744 KB |
Output isn't correct |
13 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
4744 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
4744 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
4744 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
4744 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
4744 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
4744 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
4744 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |