# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1175407 | 12345678 | Event Hopping (BOI22_events) | C++20 | 211 ms | 97212 KiB |
#include <bits/stdc++.h>
using namespace std;
const int nx=1e5+5, kx=17, inf=1e9;
struct segtree
{
struct node
{
pair<int, int> mn;
node *l, *r;
node(pair<int, int> mn=make_pair(2e9, 0)): mn(mn), l(0), r(0) {}
};
typedef node* pnode;
pnode rt;
void update(int l, int r, pnode &k, int idx, pair<int, int> vl)
{
if (!k) k=new node();
if (idx<l||r<idx) return;
//cout<<"debug "<<l<<' '<<r<<'\n';
if (l==r) return k->mn=min(k->mn, vl), void();
int md=(l+r)/2;
update(l, md, k->l, idx, vl);
update(md+1, r, k->r, idx, vl);
k->mn=min(k->l->mn, k->r->mn);
}
pair<int, int> query(int l, int r, pnode k, int ql, int qr)
{
if (qr<l||r<ql||!k) return {2e9, 0};
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |