#include "choreography.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> vec, pos(100005);
int sum = 0, n;
void init(int N, vector<int> P) {
n = N;
vec = P;
for (int i=0; i<n; i++) pos[vec[i]] = i;
}
void move_right(int K) {
sum = (sum + K) % n;
}
void move_left(int K) {
sum = (sum - K) % n;
return;
}
void swap_places() {
return;
}
void move_around() {
return;
}
int get_position(int D){
return (pos[D] + sum + n) % n;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
59 ms |
9160 KB |
Output is correct |
2 |
Correct |
54 ms |
9156 KB |
Output is correct |
3 |
Correct |
58 ms |
9156 KB |
Output is correct |
4 |
Correct |
58 ms |
9096 KB |
Output is correct |
5 |
Correct |
40 ms |
6596 KB |
Output is correct |
6 |
Correct |
44 ms |
6604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
856 KB |
5th lines differ - on the 1st token, expected: '411', found: '410' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
53 ms |
8644 KB |
16th lines differ - on the 1st token, expected: '54117', found: '49341' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
53 ms |
8644 KB |
16th lines differ - on the 1st token, expected: '54117', found: '49341' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
59 ms |
9160 KB |
Output is correct |
2 |
Correct |
54 ms |
9156 KB |
Output is correct |
3 |
Correct |
58 ms |
9156 KB |
Output is correct |
4 |
Correct |
58 ms |
9096 KB |
Output is correct |
5 |
Correct |
40 ms |
6596 KB |
Output is correct |
6 |
Correct |
44 ms |
6604 KB |
Output is correct |
7 |
Incorrect |
53 ms |
8644 KB |
16th lines differ - on the 1st token, expected: '54117', found: '49341' |
8 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
59 ms |
9160 KB |
Output is correct |
2 |
Correct |
54 ms |
9156 KB |
Output is correct |
3 |
Correct |
58 ms |
9156 KB |
Output is correct |
4 |
Correct |
58 ms |
9096 KB |
Output is correct |
5 |
Correct |
40 ms |
6596 KB |
Output is correct |
6 |
Correct |
44 ms |
6604 KB |
Output is correct |
7 |
Incorrect |
1 ms |
856 KB |
5th lines differ - on the 1st token, expected: '411', found: '410' |
8 |
Halted |
0 ms |
0 KB |
- |