# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
698015 | Elvin_Fritl | 사탕 분배 (IOI21_candies) | C++17 | 569 ms | 38100 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
struct Seg {
struct Item {
long long min = 0, max = 0;
long long lazy = 0;
constexpr friend Item merge(Item l, Item r) {
return { std::min(l.min, r.min), std::max(l.max, r.max), l.lazy + r.lazy };
}
};
int size;
std::vector <Item> v;
Seg(int s) {
size = 1;
while (size < s) {
size <<= 1;
}
v.resize(size << 1);
}
inline void push(int now, int l, int r) {
v[now].min += v[now].lazy;
v[now].max += v[now].lazy;
if (r - l - 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... |