Submission #558050

#TimeUsernameProblemLanguageResultExecution timeMemory
558050InternetPerson10The Collection Game (BOI21_swaps)C++17
50 / 100
57 ms452 KiB
#include "swaps.h" #include <bits/stdc++.h> using namespace std; void solve(int N, int V) { srand(time(NULL)); vector<int> x(N); for(int i = 0; i < N; i++) x[i] = i + 1; vector<int> shuff(N); for(int i = 0; i < N; i++) { shuff[i] = i+1; } for(int i = 0; i < N; i++) { for(int j = i%2; j < N - 1; j += 2) { schedule(x[j], x[j+1]); } vector<int> v = visit(); for(int j = i%2; j < N - 1; j += 2) { if(v[j/2] == 0) swap(x[j], x[j+1]); } } answer(x); }
#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...