# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1123161 | crafticat | The short shank; Redemption (BOI21_prison) | C++20 | 1 ms | 324 KiB |
#include <bits/stdc++.h>
using namespace std;
#define F0R(i, n) for (ll i = 0; i < n;i++)
#define FOR(i, j, n) for (ll i = j;i < n;i++)
using ll = long long;
template<typename T>
using V = vector<T>;
using vi = V<ll>;
constexpr ll INF = 1e9 + 7;
using pi = pair<ll,ll>;
ll T;
struct Seg {
Seg *left = nullptr, *right = nullptr;
ll l, r, mid;
pi v = {-INF, -INF};
ll lazy = 0;
void push() {
if (lazy == 0) return;
if (r -l >1) {
left->lazy += lazy;
right->lazy += lazy;
}
v.first += lazy;
lazy = 0;
}
# | 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... |