# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
809032 | puppy | Distributing Candies (IOI21_candies) | C++17 | 1428 ms | 41516 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 <cmath>
//#include <iostream>
#define int long long
using namespace std;
const int inf = 1e18;
struct Node
{
int mx, mn;
Node operator+(const Node &nd) const {
return {max(mx, nd.mx), min(mn, nd.mn)};
}
};
const Node zero = {-inf, inf};
struct SegTree
{
vector<Node> tree;
vector<int> lazy;
SegTree(int N)
{
int sz = 1 << ((int)ceil(log2(N+1)) + 1);
tree.resize(sz); lazy.resize(sz);
}
void push(int s, int e, int node)
{
tree[node].mx += lazy[node];
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |