# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1101299 | tsengang | Sterilizing Spray (JOI15_sterilizing) | C++14 | 872 ms | 11908 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>
#define ll long long
#define ff first
#define ss second
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
using namespace std;
ll n,q,k;
struct segtree{
int n;
vector<ll>d;
segtree(ll n){
d.resize(4*n);
build(1,1,n);
}
void build(ll v,ll l,ll r){
if(l==r){
d[v]=0;
return;
}
ll m=(l+r)/2;
build(v*2,l,m);
build(v*2+1,m+1,r);
d[v]=d[v*2]+d[v*2+1];
}
ll query(ll v,ll l,ll r,ll L,ll R){
if(L>R||l>R||L>r) return 0;
if(L<=l&&r<=R){
return d[v];
}
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... |