# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
229660 | vee_nits123 | Deda (COCI17_deda) | C++14 | 117 ms | 7928 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>
#include <climits>
#include <cstring>
using namespace std;
#define int long long int
#define endl '\n'
const int N = 2e5 + 5;
//const int M = 1e9 + 1;
int tree[4 * N];
void update(int ind, int val, int st, int end, int pos) {
if (st > end || ind > end || ind < st) return ;
if (st == end && st == ind) {
tree[pos] = val;
return ;
}
int mid = (st + end) / 2;
//if(ind<=mid)
update(ind, val, st, mid, 2 * pos);
//else
update(ind, val, mid + 1, end, 2 * pos + 1);
tree[pos] = min(tree[2 * pos], tree[2 * pos + 1]);
return ;
}
int query(int l, int r, int val, int st, int end, int pos) {
if (st > end) return INT_MAX;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |