# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
800269 | 1075508020060209tc | Unique Cities (JOI19_ho_t5) | C++14 | 884 ms | 68956 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.
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC targent("avx,popcnt,sse4,abm")
#include <bits/stdc++.h>
using namespace std;
#define int long long
struct SGTR{
int l;int r;
int lz;
int mn;
int f;
}tr[800055];
void buildtr(int nw,int l,int r){
tr[nw].l=l;tr[nw].r=r;
tr[nw].f=r-l+1;
tr[nw].lz=0;
tr[nw].mn=0;
if(l==r){return;}
int mi=(l+r)/2;
buildtr(nw*2,l,mi);buildtr(nw*2+1,mi+1,r);
}
void psh(int nw){
int v=tr[nw].lz;
tr[nw].lz=0;
tr[nw*2].lz+=v;tr[nw*2+1].lz+=v;
tr[nw*2].mn+=v;tr[nw*2+1].mn+=v;
}
int qmn(int nw,int l,int r){
if(r<l){return 1e9;}
if(tr[nw].l>=l&&tr[nw].r<=r){
return tr[nw].mn;
Compilation message (stderr)
# | 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... |