Submission #922153

#TimeUsernameProblemLanguageResultExecution timeMemory
922153huutuanSuper Dango Maker (JOI22_dango3)C++17
22 / 100
141 ms616 KiB
#include "dango3.h" #include <bits/stdc++.h> using namespace std; void Solve(int n, int m){ vector<int> idx; for (int i=1; i<=n*m; ++i) idx.push_back(i); for (int i=0; i<m-1; ++i){ vector<int> cur; int cr=(int)idx.size()-1; while ((int)cur.size()!=n){ int l=0, r=cr; while (l<=r){ int mid=(l+r)>>1; vector<int> query(idx.begin(), idx.begin()+mid+1); query.insert(query.end(), cur.begin(), cur.end()); if (Query(query)>=1) r=mid-1; else l=mid+1; } cur.push_back(idx[l]); cr=l-1; idx.erase(idx.begin()+l); } Answer(cur); } Answer(idx); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...