Submission #926711

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9267112024-02-13 14:31:28hotboy2703Floppy (RMI20_floppy)C++14
Compilation error
0 ms0 KiB
#include "floplib.h" // DO NOT CHANGE THIS LINE
#include<bits/stdc++.h>
using namespace std;
const int MAXK = 16;
int sp[MAXK][40100];
string ansss;
vector <int> a;
int best(int x,int y){
if (a[x] > a[y])return x;
return y;
}
int lg[40100];
int id=0;
void solve(int l,int r,int node = id++){
if (l > r)return;
int sz = lg[r-l+1];
int mid = best(sp[sz][l],sp[sz][r-(1<<sz)+1]);
ansss[node<<1] = ansss[node<<1|1] = '0';
if (mid > l){
solve(l,mid-1);
ansss[node<<1] = '1';
}
if (mid < r){
ansss[node<<1|1] = '1';
solve(mid+1,r);
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

floppy.cpp:1:10: fatal error: floplib.h: No such file or directory
    1 | #include "floplib.h" // DO NOT CHANGE THIS LINE
      |          ^~~~~~~~~~~
compilation terminated.
stub.cpp: In function 'void run2()':
stub.cpp:101:30: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  101 |     if (query_answers.size() != M) {
      |         ~~~~~~~~~~~~~~~~~~~~~^~~~