# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
893687 | AverageAmogusEnjoyer | Regions (IOI09_regions) | C++17 | 8074 ms | 28764 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;
using ll = long long;
template<class T> bool cmin(T &i, T j) { return i > j ? i=j,true:false; }
template<class T> bool cmax(T &i, T j) { return i < j ? i=j,true:false; }
const int nax = 2e5, rax = 25000;
int st[4*nax];
int n;
vector<int> adj[nax];
vector<int> nodes[rax];
int tin[nax],tout[nax],color[nax],timer=0;
map<pair<int,int>,ll> computed;
void upd(int p,int nw,int u=1,int tl=0,int tr=n-1) {
if (tl == tr) {
st[u] = nw;
return;
}
int mid = (tl+tr)/2;
if (p <= mid) {
upd(p,nw,2*u,tl,mid);
} else {
upd(p,nw,2*u+1,mid+1,tr);
}
st[u] = st[2*u] + st[2*u+1];
}
int qry(int l,int r,int u=1,int tl=0,int tr=n-1) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |