#include "gondola.h"
#include<bits/stdc++.h>
#define ll int
#define mp make_pair
#define pub push_back
#define pob pop_back
#define ss second
#define ff first
#define ext exit(0)
using namespace std;
ll i,j,z=0,st;
vector<ll> v,vc;
map<ll,ll>m;
int valid(int n, int inputSeq[])
{
for(i=0;i<n;i++){
if(m[inputSeq[i]]==1) return 0;
m[inputSeq[i]]++;
}
for(i=0;i<n;i++){
if(inputSeq[i]<n){
st=(i-inputSeq[i]+1+n)%n;
for(i=st;i<n;i++) v.pub(inputSeq[i]);
for(i=0;i<st;i++) v.pub(inputSeq[i]);
for(i=0;i<n;i++){
if(v[i]>=n) continue;
if(v[i]!=i+1) return 0;
}
return 1;
}
}
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 |
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 |
# |
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 |
564 KB |
Output is correct |
4 |
Correct |
2 ms |
620 KB |
Output is correct |
5 |
Correct |
2 ms |
620 KB |
Output is correct |
6 |
Correct |
20 ms |
2940 KB |
Output is correct |
7 |
Correct |
17 ms |
2940 KB |
Output is correct |
8 |
Correct |
40 ms |
4864 KB |
Output is correct |
9 |
Correct |
13 ms |
4864 KB |
Output is correct |
10 |
Correct |
51 ms |
5500 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
5500 KB |
Output is correct |
2 |
Correct |
2 ms |
5500 KB |
Output is correct |
3 |
Correct |
2 ms |
5500 KB |
Output is correct |
4 |
Correct |
3 ms |
5500 KB |
Output is correct |
5 |
Correct |
2 ms |
5500 KB |
Output is correct |
6 |
Correct |
22 ms |
5500 KB |
Output is correct |
7 |
Correct |
19 ms |
5500 KB |
Output is correct |
8 |
Correct |
39 ms |
5500 KB |
Output is correct |
9 |
Correct |
13 ms |
5500 KB |
Output is correct |
10 |
Correct |
49 ms |
5500 KB |
Output is correct |
11 |
Correct |
2 ms |
5500 KB |
Output is correct |
12 |
Incorrect |
2 ms |
5500 KB |
Output isn't correct |
13 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
5500 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
5500 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
5500 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
5500 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
5500 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
5500 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
5500 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |