# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1150051 | CodeLakVN | Dynamic Diameter (CEOI19_diameter) | C++20 | 58 ms | 42248 KiB |
#include <bits/stdc++.h>
using namespace std;
#define task "DIAMETER"
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define FOD(i, a, b) for (int i = (a); i >= (b); i--)
#define F first
#define S second
#define ll long long
typedef pair<int, ll> il;
typedef pair<int, int> ii;
const int N = 1e5 + 5;
struct IT {
vector<ll> tree, lazy;
int n;
void init(int _n) {
n = _n;
tree.assign(4 * n + 3, 0);
lazy.assign(4 * n + 3, 0);
}
void down(int id) {
if (lazy[id] == 0) return;
ll s = lazy[id];
tree[2 * id] += s;
lazy[2 * id] += s;
Compilation message (stderr)
# | 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... |