Submission #964428

#TimeUsernameProblemLanguageResultExecution timeMemory
964428marinalucaSuper Dango Maker (JOI22_dango3)C++17
Compilation error
0 ms0 KiB
#include "dango3.h" #include <bits/stdc++.h> using namespace std; namespace{ int asa = 1; void solve (vector <int> v, int x){ if (x == 1){ Answer(v); return; } int mijl = x / 2; vector <int> rez; for (int i = v.size(); -- i;){ swap (v[i], v.back()); int y = v.back(); v.pop_back(); if (Query(v) < mijl) v.push_back(y); else rez.push_back(y); } solve (v, mijl); solve(rez, x - mijl); } } // namespace void Solve (int N, int M){ vector <int> v; for (int i = 0; i < N * M; ++ i) v.push_back(1 + i); Solve(v, M); }

Compilation message (stderr)

dango3.cpp: In function 'void Solve(int, int)':
dango3.cpp:34:11: error: cannot convert 'std::vector<int>' to 'int'
   34 |     Solve(v, M);
      |           ^
      |           |
      |           std::vector<int>
dango3.cpp:30:17: note:   initializing argument 1 of 'void Solve(int, int)'
   30 | void Solve (int N, int M){
      |             ~~~~^
dango3.cpp: At global scope:
dango3.cpp:8:5: warning: '{anonymous}::asa' defined but not used [-Wunused-variable]
    8 | int asa = 1;
      |     ^~~