# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
436608 | 2fat2code | Distributing Candies (IOI21_candies) | C++17 | 531 ms | 43544 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 <bits/stdc++.h>
#define fr first
#define sc second
#define ll long long
#define all(s) s.begin(), s.end()
using namespace std;
const int nmax = 200005;
int n, q;
struct item{
ll maxi, mini, sum;
item(){
maxi = mini = sum = 0;
}
};
vector<item>tree(4*nmax);
vector<pair<int,int>>RangeL[nmax], RangeR[nmax];
void update(int l, int r, int indx, ll val, int nod){
if(l == r){
tree[nod].maxi = tree[nod].mini = tree[nod].sum = val;
}
else{
int mid = l + (r - l) / 2;
if(indx <= mid){
# | 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... |