Submission #1037255

#TimeUsernameProblemLanguageResultExecution timeMemory
1037255juicySuper Dango Maker (JOI22_dango3)C++17
0 / 100
454 ms600 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(i); } else { lt.push_back(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...