Submission #424859

#TimeUsernameProblemLanguageResultExecution timeMemory
424859zoooma13The Collection Game (BOI21_swaps)C++14
50 / 100
615 ms604 KiB
#include "bits/stdc++.h" #include "swaps.h" using namespace std; void solve(int N, int V) { vector <int> ord(N); iota(ord.begin() ,ord.end() ,1); for(int t = 0; t < V; t++){ for(int i = t&1; i+1 < N; i += 2) schedule(ord[i] ,ord[i+1]); auto res = visit(); for(int j = 0 ,i = t&1; i+1 < N; i += 2 ,j++) if(!res[j]) swap(ord[i] ,ord[i+1]); } answer(ord); }
#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...
#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...