Submission #923222

#TimeUsernameProblemLanguageResultExecution timeMemory
923222AdamGSChoreography (IOI23_choreography)C++17
7 / 100
70 ms9288 KiB
#include "choreography.h" #include<bits/stdc++.h> using namespace std; #define rep(a, b) for(int a = 0; a < (b); ++a) #define st first #define nd second #define pb push_back #define all(a) a.begin(), a.end() const int LIM=1e5+7; int P[LIM], Q[LIM], n, a; void init(int N, vector<int>_P) { n=N; rep(i, n) P[i]=_P[i]; rep(i, n) Q[P[i]]=i; } void move_right(int k) { a=(a+k)%n; } void move_left(int k) { move_right((n-k)%n); } void swap_places() { } void move_around() { } int get_position(int d) { return (Q[d]+a)%n; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...