Submission #726129

#TimeUsernameProblemLanguageResultExecution timeMemory
726129gagik_2007The Collection Game (BOI21_swaps)C++17
0 / 100
1 ms208 KiB
#include "swaps.h" #include <iostream> #include <algorithm> #include <string> #include <vector> #include <cmath> #include <chrono> #include <ctime> #include <set> #include <map> #include <stack> #include <queue> #include <deque> #include <limits> #include <iomanip> #include <unordered_set> #include <unordered_map> #include <fstream> #include <functional> #include <random> #include <cassert> using namespace std; typedef long long ll; typedef long double ld; #define ff first #define ss second ll ttt; const ll INF = 1e18; const ll MOD = 1e9 + 7; const ll N = 200007; ll n, m; bool used[N]; void solve(int NN, int VV) { vector<int>p; n = NN; if (n == 1) { answer({ 1 }); return; } for (int i = 1; i <= n; i++) { p.push_back(i); } for (int len = 1; len < n; len++) { for (int i = 1; i <= n; i++) { if (!used[i] && i + len <= n && !used[i + len]) { used[i] = used[i + len] = true; schedule(i, i + len); } } visit(); for (int i = 1; i <= n; i++) { used[i] = false; } } answer(p); }
#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...