Submission #1070180

#TimeUsernameProblemLanguageResultExecution timeMemory
1070180errayThe Collection Game (BOI21_swaps)C++17
35 / 100
40 ms1568 KiB
#include "swaps.h" #include <bits/stdc++.h> using namespace std; #ifdef DEBUG #include "/home/ioi/contests/debug.h" #else #define debug(...) void(37) #endif void solve(int N, int V) { vector<int> ord(N); iota(ord.begin(), ord.end(), 1); for (int i = 0; i <= N; ++i) { vector<array<int, 2>> qs; for (int j = i % 2; j + 1 < N; j += 2) { debug(j); schedule(ord[j], ord[j + 1]); qs.push_back({j, j + 1}); } auto res = visit(); for (int i = 0; i < int(res.size()); ++i) { if (!res[i]) { swap(ord[qs[i][0]], ord[qs[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...