Submission #867061

#TimeUsernameProblemLanguageResultExecution timeMemory
867061Mizo_CompilerThe Collection Game (BOI21_swaps)C++17
0 / 100
0 ms344 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 < n; i++) { for (int j = i+1; j < n; j++) { schedule(ret[i], ret[j]); } vector<int> v = visit(); for (int j = i+1, cur = 0; j < n; j++, cur++) { if (!v[cur]) { swap(ret[i], ret[j]); } } } 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...