#include "choreography.h"
#include <bits/stdc++.h>
using namespace std;
int pos[100010];
int shift;
int n;
void init(int N, std::vector<int> P) {
n=N;
for(int i=0;i<N;i++)pos[P[i]] = i;
return;
}
void move_right(int K) {
shift+=K;
return;
}
void move_left(int K) {
shift-=K;
return;
}
void swap_places() {
return;
}
void move_around() {
return;
}
int get_position(int D){
return ((pos[D]+shift)%n+n)%n;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
55 ms |
5828 KB |
Output is correct |
2 |
Correct |
56 ms |
8748 KB |
Output is correct |
3 |
Correct |
59 ms |
8904 KB |
Output is correct |
4 |
Correct |
55 ms |
8904 KB |
Output is correct |
5 |
Correct |
39 ms |
6184 KB |
Output is correct |
6 |
Correct |
36 ms |
6340 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
5th lines differ - on the 1st token, expected: '411', found: '410' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
50 ms |
5868 KB |
16th lines differ - on the 1st token, expected: '54117', found: '49341' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
50 ms |
5868 KB |
16th lines differ - on the 1st token, expected: '54117', found: '49341' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
55 ms |
5828 KB |
Output is correct |
2 |
Correct |
56 ms |
8748 KB |
Output is correct |
3 |
Correct |
59 ms |
8904 KB |
Output is correct |
4 |
Correct |
55 ms |
8904 KB |
Output is correct |
5 |
Correct |
39 ms |
6184 KB |
Output is correct |
6 |
Correct |
36 ms |
6340 KB |
Output is correct |
7 |
Incorrect |
50 ms |
5868 KB |
16th lines differ - on the 1st token, expected: '54117', found: '49341' |
8 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
55 ms |
5828 KB |
Output is correct |
2 |
Correct |
56 ms |
8748 KB |
Output is correct |
3 |
Correct |
59 ms |
8904 KB |
Output is correct |
4 |
Correct |
55 ms |
8904 KB |
Output is correct |
5 |
Correct |
39 ms |
6184 KB |
Output is correct |
6 |
Correct |
36 ms |
6340 KB |
Output is correct |
7 |
Incorrect |
1 ms |
348 KB |
5th lines differ - on the 1st token, expected: '411', found: '410' |
8 |
Halted |
0 ms |
0 KB |
- |