# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
934404 | thinknoexit | Sails (IOI07_sails) | C++17 | 406 ms | 4724 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
pair<int, int> a[100100];
int tree[400400], lazy[400400];
ll ans = 0;
void lzy(int now, int l, int r) {
if (lazy[now] == 0) return;
tree[now] += lazy[now];
if (l != r) {
lazy[2 * now] += lazy[now];
lazy[2 * now + 1] += lazy[now];
}
lazy[now] = 0;
}
void update(int ql, int qr, int now = 1, int l = 1, int r = 100000) {
lzy(now, l, r);
if (l > qr || r < ql) return;
if (ql <= l && r <= qr) {
lazy[now]++;
lzy(now, l, r);
return;
}
int mid = (l + r) / 2;
update(ql, qr, 2 * now, l, mid), update(ql, qr, 2 * now + 1, mid + 1, r);
tree[now] = max(tree[2 * now], tree[2 * now + 1]);
}
int query(int v, int now = 1, int l = 1, int r = 100000) {
lzy(now, l, r);
if (l == r) return tree[now];
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |