# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
444644 | shrimb | Fountain (eJOI20_fountain) | C++17 | 391 ms | 55732 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include"bits/stdc++.h"
#define int long long
#define endl '\n'
using namespace std;
int N, Left, Right, Value;
int seg[2000001];
int Query (int l = 1, int r = N, int ind = 1) {
if (l > Right || r < Left) return INT_MAX;
if (l >= Left and r <= Right) return seg[ind];
int mid = (l + r) / 2;
return min(Query(l, mid, ind * 2), Query(mid + 1, r, ind * 2 + 1));
}
void Update () {
int ind = Left + N - 2;
seg[ind] = Value;
ind /= 2;
while (ind) {
seg[ind] = min(seg[ind * 2], seg[ind * 2 + 1]);
ind /= 2;
}
}
pair<int,int> sparse[100001][20]; // {node, capacity}
signed main () {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(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... |