# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
277974 | groeneprof | Bridges (APIO19_bridges) | C++14 | 1189 ms | 6404 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 P(a) do{if(debug) cout<<a<<endl;} while(false)
#define H(a) P(#a<<": "<<a)
#define FR(i,a,b) for(int i = (a); i<(b); i++)
#define F(i,n) FR(i,0,n)
const int debug = 0;
const int inf = 2e9;
using namespace std;
vector<int> st;
int n, m,q;
vector<pair<int,int> > edges;
vector<int> weights;
int update(int i, int v, int u, int L, int R){
H(i);
H(v);
H(u);
H(L);
H(R);
if(L>i || R < i) {P("out of bounds"); return st[u];}
if(L==R){P("leaf found"); return st[u] = v;}
st[u] = min(update(i,v,u*2+1,L,(L+R)/2),update(i,v,u*2+2,(L+R)/2+1,R));
H(i);
H(v);
H(u);
H(L);
H(R);
# | 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... |