# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
532813 | couplefire | Port Facility (JOI17_port_facility) | C++17 | 0 ms | 204 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;
#define pii pair<int, int>
#define f first
#define s second
const int N = 1<<20;
const int MOD = 1000000007;
int n; pii arr[N];
int id[N<<1];
int fa[N], siz[N];
pii seg[N<<2];
void init(int v = 1, int tl = 0, int tr = 2*N-1){
if(tl==tr){
seg[v] = {0, tl};
return;
}
int tm = (tl+tr)>>1;
init(v<<1, tl, tm);
init(v<<1|1, tm+1, tr);
seg[v] = max(seg[v<<1], seg[v<<1|1]);
}
void upd(int pos, int val, int v = 1, int tl = 0, int tr = 2*N-1){
if(tr<pos || tl>pos) return;
if(tl==tr){
seg[v] = {val, pos};
return;
# | 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... |