# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
168129 | 2019-12-11T13:14:27 Z | dimash241 | Wild Boar (JOI18_wild_boar) | C++17 | 0 ms | 0 KB |
#include "library.h" #include<bits/stdc++.h> #define pb push_back using namespace std; int Query (const vector < int > &m) {}; void Answer(const vector < int > &m) {}; void Solve(int n) { vector <int> m(n); m[0] = 1; int mx = 0, p = 0; for(int i = 1; i < n; i ++) { m[i] = 1; int x; x = Query(m); if (x > mx) { mx = x; p = i; } m[i] = 0; } vector < pair < int, int > > res; m[0] = 0; //m[p] = 1; for (int i = 0; i < n; i ++) { m[p] = 1; m[i] = 1; res.pb({Query(m), i}); m[p] = 0; m[i] = 0; } sort(res.begin(), res.end()); vector < int > ans; for (int i = 0; i < n; i ++) ans.pb(res[i].second); Answer(ans); } // B...a