# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
386365 | Mamnoon_Siam | Road Construction (JOI21_road_construction) | C++17 | 5973 ms | 18344 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>;
#define all(v) begin(v), end(v)
#define sz(v) (int)(v).size()
#define fi first
#define se second
#define x first
#define y second
typedef pair<ll, ll> pt;
const int N = 250005;
int n, k;
pt a[N];
vi byX;
ll Ys[N]; int Ysz;
int lessY(ll y) {
return int(lower_bound(Ys, Ys+Ysz, y) - Ys);
}
int ft[N];
void update(int pos, int val) {
for(; pos < N; pos += pos & -pos) ft[pos] += val;
}
int query(int l, int r, int ret = 0) {
for(l--; l > 0; l -= l & -l) ret -= ft[l];
for(; r > 0; r -= r & -r) ret += ft[r];
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |