# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1012607 | vjudge1 | Sterilizing Spray (JOI15_sterilizing) | C++14 | 867 ms | 11052 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;
int n, q, k;
int a[100005];
long long st[4 * 100005];
set<int> S[15];
void build(int id = 1, int l = 1, int r = n) {
if (l == r) {
st[id] = a[l];
return;
}
int mid = (l + r) / 2;
build(id * 2, l, mid);
build(id * 2 + 1, mid + 1, r);
st[id] = st[id * 2] + st[id * 2 + 1];
}
void upd(int i, int v) {
int id = 1, l = 1, r = n;
while (l < r) {
int mid = (l + r) / 2;
id *= 2;
if (i <= mid) {
r = mid;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |