# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
372904 | Ahoora | Fortune Telling 2 (JOI14_fortune_telling2) | C++14 | 2697 ms | 165588 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>
#define indexed_set tree<int, null_type, less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>
using namespace __gnu_pbds;
using namespace std;
const int N = 3 * 2 * 1000 * 100 + 10, LG = 20;
int n, k, a[N], b[N], t[N], kol[N];
indexed_set fen[N];
void UPD(int id, int x) {
kol[id]++;
fen[id].insert(x);
}
void upd(int x, int y) {
for (++x; x < N; x += x & -x)
UPD(x, y);
}
int GET(int id, int x) {
return fen[id].order_of_key(x);
}
int get(int x, int y) {
int res = 0;
for (; x; x -= x & -x)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |