# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
860311 | pctirziu | Deda (COCI17_deda) | C++17 | 451 ms | 6196 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 <iostream>
using namespace std;
const int nmax = 3e5 + 5;
const int valmax = 2e9 + 5;
int aint[nmax * 4];
void update(int node, int st, int dr, int l, int r, int val)
{
if(st > r or dr < l)
return ;
if(st == dr){
aint[node] = val;
return;
}
int mid = (st + dr) / 2;
update(node * 2, st, mid, l, r, val);
update(node * 2 + 1, mid + 1, dr, l, r, val);
aint[node] = min(aint[2 * node], aint[2 * node + 1]);
}
int query(int node, int st, int dr, int l, int r, int val)
{
if(st > r or dr < l)
return -1;
if(l <= st and dr <= r){
if(aint[node] > val)
return -1;
int rasp;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |