# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
128065 | mirbek01 | Sterilizing Spray (JOI15_sterilizing) | C++11 | 336 ms | 7816 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
# include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 2;
int n, q, k, a[N];
long long t[N * 4], mx[N * 4];
void upd(int pos, int val, int v = 1, int tl = 1, int tr = n){
if(tl == tr){
t[v] = val;
mx[v] = val;
} else {
int tm = (tl + tr) >> 1;
if(pos <= tm)
upd(pos, val, v << 1, tl, tm);
else
upd(pos, val, v << 1 | 1, tm + 1, tr);
t[v] = t[v << 1] + t[v << 1 | 1];
mx[v] = max(mx[v << 1], mx[v << 1 | 1]);
}
}
void upd1(int l, int r, int v = 1, int tl = 1, int tr = n){
if(l > tr || tl > r || mx[v] < 1)
return ;
if(tl == tr){
t[v] = t[v] / k;
mx[v] = t[v];
컴파일 시 표준 에러 (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... |