Submission #155683

#TimeUsernameProblemLanguageResultExecution timeMemory
155683qkxwsmXoractive (IZhO19_xoractive)C++14
6 / 100
2 ms376 KiB
#include "interactive.h" #include <bits/stdc++.h> using namespace std; template<class T, class U> void ckmin(T &a, U b) { if (a > b) a = b; } template<class T, class U> void ckmax(T &a, U b) { if (a < b) a = b; } #define MP make_pair #define PB push_back #define LB lower_bound #define UB upper_bound #define fi first #define se second #define FOR(i, a, b) for (auto i = (a); i < (b); i++) #define FORD(i, a, b) for (auto i = (a) - 1; i >= (b); i--) #define SZ(x) ((int) ((x).size())) #define ALL(x) (x).begin(), (x).end() typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<pii> vpi; typedef vector<pll> vpl; int N; vi ans; int qry(int x) { return ask(x + 1); } vi qry1(vi v) { for (int &x : v) x++; vi res = qry1(v); sort(ALL(res)); res.erase(res.begin(), res.begin() + SZ(v)); vi res1; FOR(i, 0, SZ(res)) { if (i & 1) res1.PB(res[i]); } return res1; } vi guess(int n) { N = n; ans.resize(N); FOR(i, 0, N) { ans[i] = qry(i); } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...