# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
697729 | flappybird | Dungeon 3 (JOI21_ho_t5) | C++17 | 614 ms | 71448 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;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
#define MAX 201010
#define MAXS 20
#define INF 1000000000000000001
#define bb ' '
#define ln '\n'
#define Ln '\n'
#define MOD 1000000007
typedef pair<ll, int> pli;
pll operator+(pll p1, pll p2) {
return pll(p1.first + p2.first, p1.second + p2.second);
}
pll operator-(pll p1) {
return pll(-p1.first, -p1.second);
}
struct fenwick {
vector<pll> tree;
int N;
fenwick(int N = 0) :N(N) { tree.resize(N + 1); }
void upd(int i, pll x) { while (i <= N) { tree[i] = tree[i] + x, i += i & -i; } }
pll get(int i) { pll ans = pll(0, 0); while (i) { ans = ans + tree[i], i -= i & -i; } return ans; }
void update(int l, int r, pll x) {
if (r <= 0) return;
if (l > r) return;
upd(l, x);
if (r <= N) upd(r + 1, -x);
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |