# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
46433 | RezwanArefin01 | Sterilizing Spray (JOI15_sterilizing) | C++17 | 5031 ms | 39832 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.
#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
const int maxn = 1e5 + 10;
ll t[maxn << 2], mx[maxn << 2];
int a[maxn], lazy[maxn << 2], n, q, k;
void build(int node, int l, int r) {
if(l == r) {
t[node] = a[l];
mx[node] = a[l];
return;
} int m = l + r >> 1;
build(node << 1, l, m);
build(node << 1 | 1, m + 1, r);
t[node] = t[node << 1] + t[node << 1 | 1];
mx[node] = max(mx[node << 1], mx[node << 1 | 1]);
}
void shift(int node) {
if(!lazy[node]) return;
t[node << 1] = mx[node << 1] = 0;
t[node << 1 | 1] = mx[node << 1 | 1] = 0;
lazy[node << 1] = lazy[node << 1 | 1] = 1;
Compilation message (stderr)
# | 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... |