# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
47857 | mirbek01 | Library (JOI18_library) | C++17 | 515 ms | 656 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <cstdio>
#include <vector>
#include "library.h"
using namespace std;
void Solve(int N){
vector <int> res(N), M(N), used(N), a(N), b(N);
int cur = 0, p1 = 0;
a[0] = 0;
b[0] = 0;
used[0] = 1;
while(1){
vector <int> v;
for(int i = 0; i < N; i ++)
if(!used[i])
v.emplace_back(i);
if(!v.size()) break;
for(int i = 0; i < v.size(); i ++)
M[v[i]] = 1;
int A = Query(M);
M[cur] = 1;
int B = Query(M);
M[cur] = 0;
for(int i = 0; i < v.size(); i ++)
M[v[i]] = 0;
if(A < B) break;
int lo = 0, hi = v.size() - 1, rs;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |