# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
72857 |
2018-08-27T05:59:04 Z |
nvmdava |
Gondola (IOI14_gondola) |
C++17 |
|
26 ms |
4920 KB |
#include "gondola.h"
#include <bits/stdc++.h>
using namespace std;
int ord[100001];
map<int, int> in;
int valid(int n, int inputSeq[])
{
int i;
for(i = 0; i < n; i++){
if(inputSeq[i] <= n) break;
}
if(i == n) return 1;
int k = inputSeq[i] - 1;
for(int j = 0; j < n; j++){
ord[(k + j) % n] = inputSeq[(i + j) % n];
}
for(i = 0; i < n; i++){
if(ord[i] != i + 1 && ord[i] <= n) 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 |
248 KB |
Output is correct |
2 |
Correct |
2 ms |
488 KB |
Output is correct |
3 |
Correct |
3 ms |
604 KB |
Output is correct |
4 |
Correct |
3 ms |
604 KB |
Output is correct |
5 |
Correct |
3 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
760 KB |
Output is correct |
2 |
Correct |
2 ms |
760 KB |
Output is correct |
3 |
Correct |
2 ms |
760 KB |
Output is correct |
4 |
Correct |
3 ms |
760 KB |
Output is correct |
5 |
Correct |
3 ms |
760 KB |
Output is correct |
6 |
Correct |
9 ms |
1096 KB |
Output is correct |
7 |
Correct |
19 ms |
2092 KB |
Output is correct |
8 |
Correct |
20 ms |
2288 KB |
Output is correct |
9 |
Correct |
6 ms |
2288 KB |
Output is correct |
10 |
Correct |
26 ms |
3132 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
3132 KB |
Output is correct |
2 |
Correct |
2 ms |
3132 KB |
Output is correct |
3 |
Correct |
3 ms |
3132 KB |
Output is correct |
4 |
Correct |
3 ms |
3132 KB |
Output is correct |
5 |
Correct |
2 ms |
3132 KB |
Output is correct |
6 |
Correct |
9 ms |
3132 KB |
Output is correct |
7 |
Correct |
16 ms |
3844 KB |
Output is correct |
8 |
Correct |
18 ms |
4312 KB |
Output is correct |
9 |
Correct |
8 ms |
4312 KB |
Output is correct |
10 |
Correct |
16 ms |
4920 KB |
Output is correct |
11 |
Incorrect |
2 ms |
4920 KB |
Output isn't correct |
12 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
4920 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
4920 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
4920 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
4920 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
4920 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
4920 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
4920 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |