제출 #839543

#제출 시각아이디문제언어결과실행 시간메모리
839543model_codeChoreography (IOI23_choreography)C++17
12 / 100
1077 ms3884 KiB
// correct/sol_na_st2.cpp #include "choreography.h" #include <vector> #include <iostream> #include <cassert> #include <algorithm> std::vector<int> p; void init(int N, std::vector<int> P) { p=P; } void move_right(int K) { move_left((int)p.size()-K); } void move_left(int K) { rotate(p.begin(), p.begin()+K, p.end()); } void swap_places() { for(int i=0;i<(int)p.size()/2;++i) { std::swap(p[2*i], p[2*i+1]); } } void move_around() { std::vector<int> pos(p.size()); for(int i=0;i<(int)p.size();++i) { pos[p[i]]=i; } p=pos; } int get_position(int D){ return find(p.begin(), p.end(), D)-p.begin(); }
#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...