Submission #627739

#TimeUsernameProblemLanguageResultExecution timeMemory
627739flappybirdSuper Dango Maker (JOI22_dango3)C++17
100 / 100
996 ms732 KiB
#include "dango3.h" #include <bits/stdc++.h> using namespace std; namespace { int N, M; } // namespace void solve(vector<int>& v) { int sz = v.size(); sz /= N; if (sz == 1) { Answer(v); return; } int lim = sz / 2; int i; vector<int> rem, sub; while (v.size()) { int t = v.back(); int c = 0; v.pop_back(); for (auto x : v) rem.push_back(x); if (Query(rem) < lim) c = 1; rem.resize(rem.size() - v.size()); if (c) rem.push_back(t); else sub.push_back(t); } solve(rem); solve(sub); } void Solve(int _N, int _M) { N = _N; M = _M; int i; vector<int> all; for (i = 1; i <= N * M; i++) all.push_back(i); solve(all); }

Compilation message (stderr)

dango3.cpp: In function 'void solve(std::vector<int>&)':
dango3.cpp:20:6: warning: unused variable 'i' [-Wunused-variable]
   20 |  int i;
      |      ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...