# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
33062 | aome | Fortune Telling 2 (JOI14_fortune_telling2) | C++14 | 299 ms | 33488 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;
typedef pair<int, int> ii;
const int N = 200005;
int n, k, a[N], b[N], t[N];
int lg2[N], rmq[20][N];
int bit[N], res[N];
vector<ii> go, query[N];
int get(int l, int r) {
int k = lg2[r - l + 1];
return max(rmq[k][l], rmq[k][r - (1 << k) + 1]);
}
void upd(int x) {
for (x; x > 0; x -= x & -x) bit[x]++;
}
int get(int x) {
int ret = 0; for (x; x <= k; x += x & -x) ret += bit[x]; return ret;
}
int main() {
ios::sync_with_stdio(false);
cin >> n >> k;
for (int i = 1; i <= n; ++i) {
cin >> a[i] >> b[i];
}
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... |