# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1016479 | 2024-07-08T06:38:19 Z | MohamedFaresNebili | The Collection Game (BOI21_swaps) | C++14 | 0 ms | 0 KB |
#include <bits/stdc++.h> using namespace std; bool cmp(int i, int j) { schedule(i, j); vector<int> K = visit(); return K[0] == 1; } void solve(int N, int V) { vector<int> res(N); for(int l = 0; l < N; l++) res[l] = l + 1; sort(res.begin(), res.end(), cmp); answer(res); }