# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
392436 | bayemirov | Snowball (JOI21_ho_t2) | C++17 | 502 ms | 10628 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 ll long long
#define all(x) x.begin(), x.end()
#define pb push_back
#define pii pair<int, int>
#define fr first
#define sc second
using namespace std;
const int N = 2e5;
int n, q;
ll a[N], d[N], p[N], pref[N], pos2[N], qr[N], pos1[N];
int t[N * 4], shift = 1;
vector<ll> all;
void update(int u, int val) {
t[u] = min(t[u], val);
while (u >>= 1) t[u] = min(t[u + u], t[u + u + 1]);
}
int get(int l, int r) {
int res = 1e9;
while (l <= r) {
if (l & 1) res = min(res, t[l++]);
if (!(r & 1)) res = min(res, t[r--]);
l >>= 1;
r >>= 1;
}
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |