# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
435333 | jangwonyoung | Distributing Candies (IOI21_candies) | C++17 | 608 ms | 31500 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 "candies.h"
#include <vector>
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
const int N=2e5+5;
#define fi first
#define se second
int n,q;
vector<pair<int,int> >qr[N];
const int ts=1<<19;
ll mx[ts];
ll mn[ts];
ll sum[ts];
void pull(int id){
sum[id]=sum[id*2]+sum[id*2+1];
mx[id]=max(mx[id*2],mx[id*2+1]+sum[id*2]);
mn[id]=min(mn[id*2],mn[id*2+1]+sum[id*2]);
}
void upd(int id,int l,int r,int p,ll v){
if(l==r){
mx[id]=0;
mn[id]=0;
sum[id]=v;
if(v>0) mx[id]=v;
else mn[id]=v;
return;
# | 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... |