# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1091796 | sqrteipi | Choreography (IOI23_choreography) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
}