# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
296578 | emil_physmath | Holiday (IOI14_holiday) | C++17 | 1361 ms | 9472 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 <iostream>
#include <algorithm>
#include"holiday.h"
using namespace std;
using llong = long long;
#define BUGO(x) cerr << #x << ": " << x << '\n';
const int pool = 1000'000;
int nodes = 1;
int lson[pool], rson[pool], cnt[pool];
llong sum[pool];
int cnt2[101];
void Upd(int v, int vl, int vr, int i, bool add)
{
if (i <= 100)
{
if (add) ++cnt2[i];
else --cnt2[i];
}
if (vl == vr)
{
if (add)
sum[v] += i, ++cnt[v];
else
sum[v] -= i, --cnt[v];
return;
}
if (lson[v] == -1)
# | 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... |