# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
874151 | abczz | Street Lamps (APIO19_street_lamps) | C++14 | 854 ms | 135112 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 <iostream>
#include <map>
#include <vector>
#include <array>
#include <algorithm>
#define ll long long
using namespace std;
vector <ll> V;
vector <array<ll, 4>> Q;
map <ll, array<ll, 2> > mp;
array <ll, 2> bit[300001];
vector <ll> U;
ll n, q, a, b, t, F[300001];
void update(ll x, array<ll, 2> y) {
while (x <= n) {
U.push_back(x);
bit[x] = {bit[x][0]+y[0], bit[x][1]+y[1]};
x += x&-x;
}
}
array<ll, 2> query(ll x) {
array<ll, 2> ret = {0, 0};
while (x) {
ret = {ret[0]+bit[x][0], ret[1]+bit[x][1]};
x -= x&-x;
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |