# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
436193 | AmineTrabelsi | Library (JOI18_library) | C++14 | 1053 ms | 1044 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 <bits/stdc++.h>
#include "library.h"
using namespace std;
void Solve(int N){
vector<int> M(N);
vector<int> res(N);
vector<deque<int>> curr;
vector<bool> rem;
curr.push_back({1});
rem.push_back(0);
int prev = 1;
M[0] = 1;
for(int i=2;i<=N;i++){
//cerr << i<<": \n";
// insert book
M[i-1] = 1;
int q = Query(M);
if(q > prev){
//cerr << i<<": \n";
curr.push_back({i}); // new group
rem.push_back(0);
prev = q;
}else{
cerr << i<<": "<<q<<"\n";
// consider storing tables
vector<int> side;
for(int c=0;c<(int)curr.size();c++){
if(rem[c])continue;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |