# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
696110 | 2023-02-05T13:34:19 Z | hpesoj | Super Dango Maker (JOI22_dango3) | C++17 | 1924 ms | 548 KB |
#include <bits/stdc++.h> #include "dango3.h" #define pi pair <int, int> #define ppi pair <pi, int> #define fi first #define se second #define pb push_back using namespace std; void Solve(int n, int m) { vector <int> v; for(int i = 1; i <= n * m; i++) v.pb(i); vector <int> sticks[m+1]; sticks[1].pb(1); for(int i = 2; i <= n * m; i++){ int lo = 1, hi = m; while(lo < hi){ int mid = (lo + hi) >> 1; for(int j = 0; j < sticks[mid].size(); j++) v.erase(find(v.begin(), v.end(), sticks[mid][j])); v.erase(find(v.begin(), v.end(), i)); if(Query(v) == m-2) hi = mid; else lo = mid + 1; v.pb(i); for(int j = 0; j < sticks[mid].size(); j++) v.pb(sticks[mid][j]); } sticks[lo].pb(i); } for(int i = 1; i <= m; i++) Answer(sticks[i]); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 340 KB | Wrong Answer [4] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 17 ms | 372 KB | Wrong Answer [4] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 535 ms | 444 KB | Wrong Answer [4] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1924 ms | 548 KB | Wrong Answer [4] |
2 | Halted | 0 ms | 0 KB | - |