# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
776402 | Hacv16 | Sterilizing Spray (JOI15_sterilizing) | C++98 | 236 ms | 14972 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;
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
typedef long long ll;
const int MAX = 2e5 + 10;
struct Node{
ll sum, mx;
Node(ll a = 0, ll b = 0) : sum(a), mx(b) { }
Node operator + (Node other){
return Node(sum + other.sum, max(mx, other.mx));
}
} seg[4 * MAX];
ll n, q, k, v[4 * MAX];
void build(int p, int l, int r){
if(l == r){
seg[p] = Node(v[l], v[l]);
return;
}
int m = (l + r) >> 1, e = 2 * p, d = e + 1;
build(e, l, m); build(d, m + 1, r);
# | 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... |