Submission #988649

#TimeUsernameProblemLanguageResultExecution timeMemory
988649vjudge1Super Dango Maker (JOI22_dango3)C++17
100 / 100
1960 ms808 KiB
#include<bits/stdc++.h> #include "dango3.h" using namespace std; vector<int> ans, v2, x; bool mark[100005]; vector<int> dango[100]; void Solve(int n, int m) { for (int i = 1; i <= n * m; i++) { int l = -1, r = m - 1, mid; while(l + 1 != r) { mid = (l + r) / 2; for (int j = 1; j <= n * m; j++) mark[j] = true; for (int i = 0; i <= mid; i++) { for (int j: dango[i]) mark[j] = false; } mark[i] = false; x.clear(); for (int j = 1; j <= n * m; j++) if(mark[j]) x.push_back(j); int dm = Query(x); if(dm == m - mid - 2) l = mid; else r = mid; } dango[r].push_back(i); } for (int i = 0; i < m; i++) Answer(dango[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...