# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
598135 | cadmiumsky | 별자리 3 (JOI20_constellation3) | C++14 | 710 ms | 77000 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define int ll
using ll = long long;
using pii = pair<int,int>;
const int nbit = 17, nmax = 2e5 + 5;
#define lsb(x) (x & -x)
struct AIB {
vector<ll> tree; int len;
void init(int n) {
len = n;
tree.clear(), tree.resize(n + 1, 0);
}
void upd(int x, int val) {
while(x <= len)
tree[x] += val,
x += lsb(x);
return;
}
void upd(int l, int r, int val) {
upd(l, val);
upd(r + 1, -val);
}
int query(int x) {
int sum = 0;
while(x > 0) sum += tree[x], x -= lsb(x);
return sum;
}
컴파일 시 표준 에러 (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... |