# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
17891 | Elibay | Weighting stones (IZhO11_stones) | C++14 | 81 ms | 11096 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 Fname ""
using namespace std;
const int MaxN = 8e5 + 17, INF = 1e9 + 17, Mod = 1e9 + 7;
int n, x, y;
struct node
{
int Max;
int Min;
int add;
node (int X = 0)
{
Max = -X;
Min = X;
add = 0;
}
} t[MaxN];
void push (int v, int l, int r)
{
if (t[v].add)
{
t[v].Max += t[v].add;
t[v].Min += t[v].add;
if (l != r)
{
t[v + v].add += t[v].add;
t[v + v + 1].add += t[v].add;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |