#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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
248 KB |
Output is correct |
2 |
Correct |
2 ms |
356 KB |
Output is correct |
3 |
Correct |
3 ms |
392 KB |
Output is correct |
4 |
Correct |
3 ms |
468 KB |
Output is correct |
5 |
Correct |
3 ms |
468 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
512 KB |
Output is correct |
2 |
Correct |
2 ms |
516 KB |
Output is correct |
3 |
Correct |
3 ms |
516 KB |
Output is correct |
4 |
Correct |
2 ms |
568 KB |
Output is correct |
5 |
Correct |
3 ms |
568 KB |
Output is correct |
6 |
Correct |
26 ms |
2872 KB |
Output is correct |
7 |
Correct |
17 ms |
2872 KB |
Output is correct |
8 |
Correct |
51 ms |
4932 KB |
Output is correct |
9 |
Correct |
15 ms |
4932 KB |
Output is correct |
10 |
Correct |
54 ms |
5460 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
5460 KB |
Output is correct |
2 |
Correct |
3 ms |
5460 KB |
Output is correct |
3 |
Correct |
3 ms |
5460 KB |
Output is correct |
4 |
Correct |
3 ms |
5460 KB |
Output is correct |
5 |
Correct |
2 ms |
5460 KB |
Output is correct |
6 |
Correct |
33 ms |
5460 KB |
Output is correct |
7 |
Correct |
19 ms |
5460 KB |
Output is correct |
8 |
Correct |
40 ms |
5460 KB |
Output is correct |
9 |
Correct |
14 ms |
5460 KB |
Output is correct |
10 |
Correct |
56 ms |
5460 KB |
Output is correct |
11 |
Correct |
2 ms |
5460 KB |
Output is correct |
12 |
Correct |
3 ms |
5460 KB |
Output is correct |
13 |
Correct |
26 ms |
5460 KB |
Output is correct |
14 |
Correct |
2 ms |
5460 KB |
Output is correct |
15 |
Correct |
75 ms |
5612 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
3 ms |
5612 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
5612 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
5612 KB |
Integer -2 violates the range [0, 350000] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
5612 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
5612 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
5612 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
5612 KB |
Integer -3 violates the range [0, 1000000008] |
2 |
Halted |
0 ms |
0 KB |
- |