Submission #971690

#TimeUsernameProblemLanguageResultExecution timeMemory
97169012345678Super Dango Maker (JOI22_dango3)C++17
7 / 100
1766 ms932 KiB
#include "dango3.h" #include <bits/stdc++.h> using namespace std; const int nx=1e4+5; int used[nx], n, m; int query() { vector<int> qrs; for (int i=1; i<=n*m; i++) if (!used[i]) qrs.push_back(i); return Query(qrs); } void Solve(int N, int M) { n=N, m=M; for (int i=M; i>=2; i--) { vector<int> res; for (int j=1; j<=N*M; j++) { if (res.size()==N) break; if (used[j]) continue; used[j]=1; if (query()==i-1) res.push_back(j); else used[j]=0; } Answer(res); } vector<int> res; for (int i=1; i<=N*M; i++) if (!used[i]) res.push_back(i); Answer(res); }

Compilation message (stderr)

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