This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// 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];
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |