# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
485642 | tibinyte | Cambridge (info1cup18_cambridge) | C++14 | 549 ms | 19548 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 mod 1000000007
#define inf 1e14
using namespace std;
struct aint {
vector<long long> a;
vector<long long> lazy;
void prop(int node, int left, int right) {
a[node] += lazy[node];
if (left != right) {
lazy[2 * node] += lazy[node];
lazy[2 * node + 1] += lazy[node];
}
lazy[node] = 0;
}
void build(vector<long long>& b, int node, int left, int right) {
if ((int)a.size() == 0) {
int n = b.size() - 1;
a = vector<long long>(4 * n);
lazy = vector<long long>(4 * n);
}
if (left == right) {
a[node] = b[left];
}
else {
int mid = (left + right) / 2;
build(b, 2 * node, left, mid);
build(b, 2 * node + 1, mid + 1, right);
a[node] = min(a[2 * node], a[2 * node + 1]);
}
# | 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... |