# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
617965 | Bench0310 | Shortcut (IOI16_shortcut) | C++17 | 1 ms | 300 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>
#include "shortcut.h"
using namespace std;
typedef long long ll;
struct ST
{
int n;
vector<ll> val;
vector<array<ll,2>> tree;
ST(vector<ll> &d)
{
n=d.size();
val=d;
tree.resize(4*n);
build(1,0,n-1);
}
void build(int idx,int l,int r)
{
if(l==r) tree[idx]={val[l],l};
else
{
int m=(l+r)/2;
build(2*idx,l,m);
build(2*idx+1,m+1,r);
tree[idx]=max(tree[2*idx],tree[2*idx+1]);
}
}
void update(int idx,int l,int r,int pos,ll x)
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |