# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
380054 | vishesh312 | Deda (COCI17_deda) | C++17 | 127 ms | 8044 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;
/*
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using ordered_set = tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>;
*/
#define all(x) begin(x), end(x)
#define sz(x) (int)x.size()
using ll = long long;
const int mod = 1e9+7;
struct SegTree {
int n;
vector<int> t;
SegTree(int _n) {
n = _n;
t.resize(4*n, 1e9+5);
}
void update(int v, int tl, int tr, int pos, int val) {
if (tl == tr) {
t[v] = val;
} else {
int tm = (tl + tr) / 2;
if (pos <= tm) {
update(v*2, tl, tm, pos, val);
} else {
update(v*2+1, tm+1, tr, pos, val);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |