# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
637990 | devariaota | Fountain (eJOI20_fountain) | C++17 | 394 ms | 63828 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>
using namespace std;
typedef long long ll;
typedef long double ld;
#define ff first
#define ss second
#define pb push_back
const ll nax = 1e5 + 5;
const ll inf = 1e13;
ll n, q;
ll d[nax], k[nax], seg[4*nax];
ll par[nax][35], pref[nax][35];
void built(ll l, ll r, ll pos){
if(l == r){
seg[pos] = d[l];
}
else{
ll mid = (l + r) / 2;
built(l, mid, 2*pos);
built(mid + 1, r, 2*pos+1);
seg[pos] = max(seg[2*pos], seg[2*pos+1]);
}
}
void upd(ll l, ll r, ll pos, ll fp, ll val){
if(l == fp && r == fp){
seg[pos] = val;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |