Submission #936829

#TimeUsernameProblemLanguageResultExecution timeMemory
936829TAhmed33Super Dango Maker (JOI22_dango3)C++17
0 / 100
9292 ms1032 KiB
#include "dango3.h" #include <bits/stdc++.h> using namespace std; int n, m; int get (vector <int> &x) { set <int> dd; for (auto i : x) dd.insert(i); vector <int> l; for (int i = 1; i <= n * m; i++) { if (!dd.count(i)) l.push_back(i); } return Query(l); } void Solve (int N, int M) { n = N; m = M; vector <int> cur[m + 1]; for (int i = 1; i <= n * m; i++) { int l = 1, r = m, ans = -1; while (l <= r) { int mid = (l + r) / 2; if (get(cur[mid]) == 2) { l = mid + 1; } else { r = mid - 1; ans = mid; } } cur[ans].push_back(i); } for (int i = 1; i <= m; i++) { Answer(cur[i]); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...