# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
313239 | edsa | Port Facility (JOI17_port_facility) | C++17 | 1 ms | 384 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;
using ll = long long;
using ii = pair<int, int>;
using vi = vector<int>;
using vll = vector<ll>;
using vii = vector<ii>;
const ll MOD = 1e9+7;
const int INF = 1e9+9;
const int MAXN = 1000006;
template <class T, class Oper>
struct LzySegTree {
int n, h; vector<T> st;
Oper op;
LzySegTree(const vector<T> &A)
: n(A.size()), h(sizeof(int)*8-__builtin_clz(n)),
st(n<<1), op(*this) {
copy(A.begin(), A.end(), st.begin()+n);
build(0, n);
}
void build(int L, int R) {
int len = 2;
for (L += n, R += n-1; L > 1; len <<= 1) {
L >>= 1, R >>= 1;
for (int i = R; i >= L; --i) op.calc(i, len);
}
# | 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... |