# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1135697 | blackslex | 사탕 분배 (IOI21_candies) | C++20 | 390 ms | 58064 KiB |
#include "candies.h"
#include <vector>
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<ll, ll>;
const int MxN = 2e5 + 5;
int n, q;
ll lz[MxN * 4];
struct node {
ll val;
pii mx, mn;
node() : val(0), mx({0, -1}), mn({0, -1}) {}
node(ll val, ll idx) : val(val), mx({val, idx}), mn({val, idx}) {}
friend node operator + (const node &l, const node &r) {
node res = node();
res.val = l.val + r.val;
res.mx = max(l.mx, r.mx);
res.mn = min(l.mn, r.mn);
return res;
}
} segm[MxN * 4];
using pni = pair<node, ll>;
pni operator + (pni c, node o) {
c.first = c.first + o;
# | 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... |