# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
120911 | youngyojun | Cake 3 (JOI19_cake3) | C++11 | 1173 ms | 15180 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 eb emplace_back
#define sz(V) ((int)(V).size())
#define allv(V) ((V).begin()),((V).end())
#define sorv(V) sort(allv(V))
#define upmax(a,b) (a)=max((a),(b))
#define INFLL (0x3f3f3f3f3f3f3f3fll)
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
const bool debug = 0;
const int MAXN = 200055;
struct SEG {
ll ds[MAXN*4];
int dc[MAXN*4];
void push(int i, int s, int e, int x, ll r) {
ds[i] += r; dc[i]++;
if(s == e) return;
int m = (s+e) >> 1;
if(x <= m) push(i<<1, s, m, x, r);
else push(i<<1|1, m+1, e, x, r);
}
void pop(int i, int s, int e, int x, ll r) {
ds[i] -= r; dc[i]--;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |