# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
467333 | apostoldaniel854 | Holiday (IOI14_holiday) | C++14 | 1002 ms | 8120 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 "holiday.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define dbg(x) cerr << #x << " " << x << "\n"
const int MAX_N = 1e5;
pair <int, int> a[1 + MAX_N];
class switch_max {
public:
struct node_state {
int cnt_on;
ll sum;
};
vector <node_state> seg;
int n;
switch_max(int n) {
this->n = n;
seg.resize(1 + 4 * n, {0, 0});
}
node_state join(node_state L, node_state R) {
node_state RES;
RES.cnt_on = L.cnt_on + R.cnt_on;
RES.sum = L.sum + R.sum;
return RES;
# | 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... |