Submission #436193

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4361932021-06-24 10:16:00AmineTrabelsiLibrary (JOI18_library)C++14
19 / 100
1053 ms1044 KiB
#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;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...