// correct/solution-subtask3.cpp
#include "choreography.h"
#include <vector>
int n, cnt = 0;
std::vector<int> p, inv;
void init(int N, std::vector<int> P){
n = N;
p = P;
inv.resize(n);
for(int i = 0; i < n; i++){
inv[p[i]] = i;
}
}
void move_right(int K) {}
void move_left(int K) {}
void swap_places() {}
void move_around() {
++cnt;
}
int get_position(int D){
return cnt&1 ? p[D] : inv[D];
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
67 ms |
6212 KB |
3rd lines differ - on the 1st token, expected: '63867', found: '52402' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
5th lines differ - on the 1st token, expected: '411', found: '310' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
63 ms |
6212 KB |
Output is correct |
2 |
Correct |
59 ms |
6216 KB |
Output is correct |
3 |
Correct |
63 ms |
6204 KB |
Output is correct |
4 |
Correct |
44 ms |
4508 KB |
Output is correct |
5 |
Correct |
36 ms |
4412 KB |
Output is correct |
6 |
Correct |
53 ms |
4396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
63 ms |
6212 KB |
Output is correct |
2 |
Correct |
59 ms |
6216 KB |
Output is correct |
3 |
Correct |
63 ms |
6204 KB |
Output is correct |
4 |
Correct |
44 ms |
4508 KB |
Output is correct |
5 |
Correct |
36 ms |
4412 KB |
Output is correct |
6 |
Correct |
53 ms |
4396 KB |
Output is correct |
7 |
Incorrect |
59 ms |
6208 KB |
3rd lines differ - on the 1st token, expected: '74726', found: '64493' |
8 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
67 ms |
6212 KB |
3rd lines differ - on the 1st token, expected: '63867', found: '52402' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
67 ms |
6212 KB |
3rd lines differ - on the 1st token, expected: '63867', found: '52402' |
2 |
Halted |
0 ms |
0 KB |
- |