# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
991057 | grt | Fish 3 (JOI24_fish3) | C++17 | 341 ms | 66336 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 ST first
#define ND second
#define PB push_back
using namespace std;
using ll = long long;
using pi = pair<int, int>;
using vi = vector<int>;
const int nax = 300 * 1000 + 10;
struct SegTree {
ll T[(1 << 20)];
int R;
void upd(int a, ll x) {
a += R;
T[a] += x;
while (a > 1) {
a >>= 1;
T[a] += x;
}
}
ll qr(int a, int b) {
a += R; b += R;
if (a > b) return 0LL;
ll w = T[a] + (a != b ? T[b] : 0LL);
while (a/2 != b/2) {
if (a % 2 == 0) w += T[a + 1];
if (b % 2 == 1) w += T[b - 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |