#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> pos;
int total = 0;
void move_right(int K) {
total += K;
}
void move_left(int K) {
total -= K;
}
void swap_places() {
return;
}
void move_around() {
return;
}
void init(int N, vector<int> P) {
n = N;
pos = vector<int>(N);
for (int i = 0; i < N; ++i) {
pos[P[i]] = i;
}
}
int get_position(int D) {
return (((pos[D]+total)%n)+n)%n;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
55 ms |
8900 KB |
Output is correct |
2 |
Correct |
54 ms |
8904 KB |
Output is correct |
3 |
Correct |
55 ms |
8852 KB |
Output is correct |
4 |
Correct |
54 ms |
8900 KB |
Output is correct |
5 |
Correct |
40 ms |
6356 KB |
Output is correct |
6 |
Correct |
35 ms |
6352 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
5th lines differ - on the 1st token, expected: '411', found: '410' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
57 ms |
8120 KB |
16th lines differ - on the 1st token, expected: '54117', found: '49341' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
57 ms |
8120 KB |
16th lines differ - on the 1st token, expected: '54117', found: '49341' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
55 ms |
8900 KB |
Output is correct |
2 |
Correct |
54 ms |
8904 KB |
Output is correct |
3 |
Correct |
55 ms |
8852 KB |
Output is correct |
4 |
Correct |
54 ms |
8900 KB |
Output is correct |
5 |
Correct |
40 ms |
6356 KB |
Output is correct |
6 |
Correct |
35 ms |
6352 KB |
Output is correct |
7 |
Incorrect |
57 ms |
8120 KB |
16th lines differ - on the 1st token, expected: '54117', found: '49341' |
8 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
55 ms |
8900 KB |
Output is correct |
2 |
Correct |
54 ms |
8904 KB |
Output is correct |
3 |
Correct |
55 ms |
8852 KB |
Output is correct |
4 |
Correct |
54 ms |
8900 KB |
Output is correct |
5 |
Correct |
40 ms |
6356 KB |
Output is correct |
6 |
Correct |
35 ms |
6352 KB |
Output is correct |
7 |
Incorrect |
1 ms |
344 KB |
5th lines differ - on the 1st token, expected: '411', found: '410' |
8 |
Halted |
0 ms |
0 KB |
- |