# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
372358 | LucaDantas | Sterilizing Spray (JOI15_sterilizing) | C++17 | 224 ms | 5740 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
constexpr int maxn = 1e5+10;
struct SegmentTree
{
long long tree[4*maxn]; int k, a[maxn];
void build(int node, int i, int j) {
if(i == j) return (void)(tree[node] = a[i]);
int m = (i+j) >> 1;
build(2*node, i, m); build(2*node+1, m+1, j);
tree[node] = tree[2*node] + tree[2*node+1];
}
void upd(int node, int i, int j, int pos, int v) {
if(i == j) return (void)(tree[node] = v);
int m = (i+j) >> 1;
if(pos <= m) upd(2*node, i, m, pos, v);
else upd(2*node+1, m+1, j, pos, v);
tree[node] = tree[2*node] + tree[2*node+1];
}
void apply(int node, int i, int j, int l, int r) {
if(i > r || j < l || !tree[node]) return;
if(i == j) return (void)(tree[node] /= k);
int m = (i+j) >> 1;
apply(2*node, i, m, l, r);
apply(2*node+1, m+1, j, l, r);
tree[node] = tree[2*node] + tree[2*node+1];
}
long long query(int node, int i, int j, int l, int r) {
컴파일 시 표준 에러 (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... |