# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1171741 | fryingduc | Floppy (RMI20_floppy) | C++20 | 56 ms | 6564 KiB |
#include <stdlib.h>
#include <string.h>
#include "floppy.h"
#include "bits/stdc++.h"
using namespace std;
#ifdef duc_debug
#include "bits/debug.h"
#else
#define debug(...)
#endif
const int maxn = 4e4 + 4;
const int LG = 15;
int n, st[maxn][LG + 1];
string send;
vector<int> vl;
void calc(int l, int r) {
if (l > r) return;
auto get = [&](int l, int r) {
int p = 31 - __builtin_clz(r - l + 1);
return vl[st[l][p]] > vl[st[r - (1 << p) + 1][p]] ? st[l][p] : st[r - (1 << p) + 1][p];
};
int mid = get(l, r);
if (l <= mid - 1) {
send += '1';
calc(l, mid - 1);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |