# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
47183 | szawinis | Palembang Bridges (APIO15_bridge) | C++17 | 945 ms | 68580 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>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
using ll = long long;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
vector<pair<ll, ll> > f;
void update(int i, ll v) {
++i;
while(i < f.size()) {
f[i].first += v;
++f[i].second;
i += i & -i;
}
}
pair<ll, ll> query(int l, int r) {
pair<ll, ll> ret = {0, 0};
if(l > r) return ret;
for(int i = r+1; i > 0; i -= i & -i)
ret.first += f[i].first, ret.second += f[i].second;
for(int i = l; i > 0; i -= i & -i)
ret.first -= f[i].first, ret.second -= f[i].second;
return ret;
}
int k, n;
ll ans;
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... |