Submission #867056

#TimeUsernameProblemLanguageResultExecution timeMemory
867056Mizo_CompilerThe Collection Game (BOI21_swaps)C++17
50 / 100
39 ms1680 KiB
#include <bits/stdc++.h> #include "swaps.h" using namespace std; typedef long long ll; typedef double ld; #define pb push_back #define sz(x) int(x.size()) #define all(x) x.begin(),x.end() #define F first #define S second void solve(int n, int l) { // TODO implement this function vector<int> ret; for (int i = 1; i <= n; i++) { ret.pb(i); } for (int i = 0; i < min(n, l); i++) { for (int j = (i & 1); j + 1 < n; j += 2) { schedule(ret[j], ret[j+1]); } vector<int> v = visit(); for (int j = (i & 1), cur = 0; j + 1 < n; j += 2, cur++) { if (!v[cur]) { swap(ret[j], ret[j+1]); } } } answer(ret); }
#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...