# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
44295 | JustInCase | Deda (COCI17_deda) | C++17 | 229 ms | 17224 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 endl '\n'
using namespace std;
const int32_t MAX_N = 2e5 + 5;
const int32_t INF = 1e9 + 5;
class SegmentTree {
private:
int32_t treeSize, data[4 * MAX_N];
void Build(int32_t node, int32_t low, int32_t high) {
if(low == high) {
data[node] = INF;
return;
}
int32_t mid = (low + high) / 2;
Build(2 * node, low, mid);
Build(2 * node + 1, mid + 1, high);
data[node] = min(data[2 * node], data[2 * node + 1]);
}
void Update(int32_t node, int32_t low, int32_t high, int32_t qInd, int32_t qVal) {
if(low > qInd || high < qInd) {
return;
}
else if(low == qInd && high == qInd) {
data[node] = qVal;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |