Submission #1029597

#TimeUsernameProblemLanguageResultExecution timeMemory
1029597mansurSuper Dango Maker (JOI22_dango3)C++17
22 / 100
503 ms908 KiB
#include "dango3.h" #include<bits/stdc++.h> using namespace std; #define rall(s) s.rbegin() s.rend() #define all(s) s.begin(), s.end() #define sz(s) (int)s.size() #define s second #define f first using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; mt19937_64 rng(1733107); void Solve(int n, int m) { vector<int> s; for (int i = 1; i <= n * m; i++) s.push_back(i); shuffle(all(s), rng); for (int i = 1; i < m; i++) { vector<int> ans = {s.back()}; s.pop_back(); while (sz(ans) < n) { int x = s.back(); s.pop_back(); if (Query(s) == m - i) ans.push_back(x); else { reverse(all(s)); s.push_back(x); reverse(all(s)); } } Answer(ans); } Answer(s); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...