# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
390293 | apostoldaniel854 | 푸드 코트 (JOI21_foodcourt) | C++14 | 464 ms | 52340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define dbg(x) cerr << #x << " " << x << "\n"
struct node_t {
ll sum_max;
ll sum;
};
class segtree {
public:
vector <node_t> seg;
int n;
segtree (int n) {
this->n = n;
seg.resize (1 + 4 * n);
}
node_t combine (node_t lnode, node_t rnode) {
return {
max (rnode.sum_max, rnode.sum + lnode.sum_max),
lnode.sum + rnode.sum
};
}
void update (int node, int lb, int rb, int pos, ll val) {
if (lb == rb) {
seg[node] = {max (0ll, val), val};
return;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |