Submission #859112

#TimeUsernameProblemLanguageResultExecution timeMemory
859112HanksburgerSuper Dango Maker (JOI22_dango3)C++17
100 / 100
2141 ms860 KiB
#include "dango3.h" #include <bits/stdc++.h> using namespace std; vector<int> v[30], tmp; void Solve(int n, int m) { for (int i=1; i<=n*m; i++) { int l=1, r=m; while (l<r) { int mid=(l+r)/2, ind=0; tmp.clear(); for (int j=1; j<=n*m; j++) { if (ind<v[mid].size() && v[mid][ind]==j) ind++; else if (j!=i) tmp.push_back(j); } if (Query(tmp)==m-1) r=mid; else l=mid+1; } v[l].push_back(i); } for (int i=1; i<=m; i++) Answer(v[i]); }

Compilation message (stderr)

dango3.cpp: In function 'void Solve(int, int)':
dango3.cpp:16:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |                 if (ind<v[mid].size() && v[mid][ind]==j)
      |                     ~~~^~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...