Submission #754865

#TimeUsernameProblemLanguageResultExecution timeMemory
754865definitelynotmeeSuper Dango Maker (JOI22_dango3)C++17
100 / 100
3571 ms832 KiB
#include "dango3.h" #include<bits/stdc++.h> #define ff first #define ss second #define all(x) x.begin(), x.end() using namespace std; using ll = long long; using pii = pair<int,int>; using pll = pair<ll,ll>; template<typename T> using matrix = vector<vector<T>>; namespace { int variable_example = 1; } // namespace void Solve(int N, int M) { matrix<int> resp(M); for(int i = 1; i <= N*M; i++){ int ini = 0, fim = M-1; while(ini!=fim){ int m = (ini+fim)>>1; vector<int> ban(N*M); for(int i = m+1; i < M; i++){ for(int j : resp[i]) ban[j] = 1; } ban[i] = 1; vector<int> qry; for(int i = 1; i <= N*M; i++){ if(!ban[i]) qry.push_back(i); } if(Query(qry) <= m) fim = m; else ini = m+1; } resp[ini].push_back(i); } // for(int i = 0; i < M; i++){ // for(int j : resp[i]) // cout << j << ' '; // cout << '\n'; // } for(int i = 0; i < M; i++) Answer(resp[i]); }

Compilation message (stderr)

dango3.cpp:15:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
   15 | int variable_example = 1;
      |     ^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...