# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
991057 | grt | Fish 3 (JOI24_fish3) | C++17 | 341 ms | 66336 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |