# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
36051 | ToMoClone | Fortune Telling 2 (JOI14_fortune_telling2) | C++14 | 1969 ms | 93432 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.
/*input
5 3
4 6
9 1
8 8
4 2
3 7
8 2 9
*/
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const int N = 600005;
int bit[N], Last[N], On[N], Arr[N][20], n, k;
pair<int, int> Query[N], a[N];
map<int, int> Label;
void update(int index, int val){
while(index < N) bit[index] += val, index += index & (-index);
}
int get(int index){
int res = 0;
while(index > 0) res += bit[index], index -= index & (-index);
return res;
}
int Rmq(int l, int 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... |