Submission #826317

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8263172023-08-15 12:49:3412345678Deda (COCI17_deda)C++17
140 / 140
81 ms7892 KiB
#include <bits/stdc++.h>
using namespace std;
const int nx=2e5+5;
int n, q, x, y;
char opr;
struct segtree
{
int d[4*nx];
void update(int l, int r, int i, int idx, int val)
{
if (idx<l||r<idx) return;
if (l==r) return void(d[i]=val);
int md=(l+r)/2;
update(l, md, 2*i, idx, val);
update(md+1, r, 2*i+1, idx, val);
d[i]=min(d[2*i], d[2*i+1]);
}
int query(int l, int r, int i, int B, int Y)
{
if (r<B||d[i]>Y) return -1;
if (l==r) return l;
int md=(l+r)/2, lf=query(l, md, 2*i, B, Y);
if (lf!=-1) return lf;
return query(md+1, r, 2*i+1, B, Y);
}
} s;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...