제출 #841167

#제출 시각아이디문제언어결과실행 시간메모리
841167heavylightdecompChoreography (IOI23_choreography)C++17
0 / 100
1077 ms3948 KiB
#include<bits/stdc++.h> using namespace std; const int maxn = 1e5+5; int N; vector<int> P; void init(int n, vector<int> p) { N = n; P = p; } void move_right(int K) { vector<int> p_new = P; for(int i = 0; i < N; i++) { p_new[(i+K)%N] = P[i]; } P = p_new; } void move_left(int K) { vector<int> p_new = P; for(int i = 0; i < N; i++) { p_new[i] = P[(i+K)%N]; } P = p_new; } void swap_places() { for(int i = 0; i < N/2; i++) { swap(P[i], P[i+1]); } } void move_around() { vector<int> p_new = P; for(int i = 0; i < N; i++) { p_new[P[i]] = i; } P = p_new; } int get_position(int D) { int res = -1; for(int i = 0; i < N; i++) { if(P[i] == D) { res = i; break; } } return res; }
#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...