Submission #848830

#TimeUsernameProblemLanguageResultExecution timeMemory
848830TAhmed33The Collection Game (BOI21_swaps)C++17
50 / 100
40 ms1444 KiB
#include <bits/stdc++.h> #include "swaps.h" using namespace std; void solve (int n, int v) { vector <int> arr; for (int i = 1; i <= n; i++) { arr.push_back(i); } for (int i = 0; i < n; i++) { for (int j = (i & 1); j + 1 < n; j += 2) { schedule(arr[j], arr[j + 1]); } auto x = visit(); int cnt = -1; for (int j = (i & 1); j + 1 < n; j += 2) { cnt++; if (!x[cnt]) { swap(arr[j + 1], arr[j]); } } } answer(arr); }
#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...