# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
237069 | MrRobot_28 | Deda (COCI17_deda) | C++17 | 139 ms | 8056 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;
vector <int> tree;
void update(int v, int l, int r, int ind, int val)
{
if(l == r)
{
tree[v] = val;
return;
}
if(ind <= (r + l) / 2)
{
update(v * 2, l, (r + l) / 2, ind, val);
}
else
{
update(v * 2 + 1, (r + l) / 2 + 1, r, ind, val);
}
tree[v] = min(tree[v * 2], tree[v * 2 + 1]);
}
int ans(int v, int l, int r, int al, int ar, int y)
{
if(l >= al && r <= ar)
{
if(tree[v] > y)
{
return -1;
}
if(l == r)
{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |