# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
885639 | peterandvoi | Cake 3 (JOI19_cake3) | C++17 | 449 ms | 8988 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>
using namespace std;
#define db(...) " [" << #__VA_ARGS__ << " : " << (__VA_ARGS__) << "] "
const int N = 200005;
const int LOG = 17;
#define MASK(x) (1LL << (x))
template<class T>
struct fenwick_tree {
T s[N];
void update(int i, T x) {
for (; i <= 200000; i += i & -i) {
s[i] += x;
}
}
T get(int i) {
T res = 0;
for (; i > 0; i -= i & -i) {
res += s[i];
}
return res;
}
T get(int l, int r) {
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... |