Submission #1037257

#TimeUsernameProblemLanguageResultExecution timeMemory
1037257juicySuper Dango Maker (JOI22_dango3)C++17
100 / 100
672 ms996 KiB
#include <bits/stdc++.h> #include "dango3.h" using namespace std; #ifdef LOCAL #include "debug.h" #else #define debug(...) 42 #endif void dc(vector<int> cands, int lay) { if (lay == 1) { Answer(cands); return; } int md = lay / 2; vector<bool> vs(cands.size()); vector<int> lt, rt; for (int i = 0; i < cands.size(); ++i) { vector<int> nw; for (int j = 0; j < cands.size(); ++j) { if (!vs[j] && i != j) { nw.push_back(cands[j]); } } if (Query(nw) >= md) { vs[i] = 1; rt.push_back(cands[i]); } else { lt.push_back(cands[i]); } } dc(lt, md); dc(rt, lay - md); } void Solve(int N, int M) { vector<int> res(N * M); iota(res.begin(), res.end(), 1); dc(res, M); }

Compilation message (stderr)

dango3.cpp: In function 'void dc(std::vector<int>, int)':
dango3.cpp:21:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   21 |   for (int i = 0; i < cands.size(); ++i) {
      |                   ~~^~~~~~~~~~~~~~
dango3.cpp:23:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   23 |     for (int j = 0; j < cands.size(); ++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...