Submission #580733

#TimeUsernameProblemLanguageResultExecution timeMemory
580733otonozadzeSuper Dango Maker (JOI22_dango3)C++17
100 / 100
3955 ms576 KiB
#include "dango3.h" #include<bits/stdc++.h> #define pb push_back using namespace std; // namespace void Solve(int N, int M) { vector<int> qur; vector<int> a[M+1]; for(int i=1; i<=N*M; i++){ int l=1; int r=M; while(l<r){ qur.clear(); int m=(l+r+1)/2; int fix[N*M+1]; for(int j=1; j<=N*M; j++){ fix[j]=0; } fix[i]=1; for(int x=0; x<a[m].size(); x++){ fix[a[m][x]]=1; } for(int j=1; j<=N*M; j++){ if(fix[j]){ continue; } qur.pb(j); } int ans=Query(qur); if(ans==M-1){ l=m; }else{ r=m-1; } } a[l].pb(i); } for(int i=1; i<=M; i++){ Answer(a[i]); } }

Compilation message (stderr)

dango3.cpp: In function 'void Solve(int, int)':
dango3.cpp:25:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   25 |     for(int x=0; x<a[m].size(); x++){
      |                  ~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...