# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
641601 | andreast12 | Bigger segments (IZhO19_segments) | C++17 | 149 ms | 19264 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 <bits/stdc++.h>
using namespace std;
#define ll long long
#define fi first
#define se second
#define pb push_back
const int mod=998244353, maxn=5e5+5;
int n, a, dp[maxn], prv;
ll pf[maxn], tree[4*maxn], inf=1e18;
void build(int now, int tl, int tr) {
if(tl==tr) {
tree[now]=(tl)?inf:0;
return;
}
int mid=(tl+tr)/2;
build(now*2, tl, mid);
build(now*2+1, mid+1, tr);
tree[now]=min(tree[now*2], tree[now*2+1]);
}
int query(int now, int tl, int tr, ll val) {
if(tl==tr) return tl;
int mid=(tl+tr)/2;
if(tree[now*2+1]<=val) return query(now*2+1, mid+1, tr, val);
return query(now*2, tl, mid, val);
}
void update(int now, int tl, int tr, int pos, ll val) {
if(tl==tr) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |