# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
317641 | Saacoota | Fortune Telling 2 (JOI14_fortune_telling2) | C++14 | 326 ms | 27516 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>
#define fi first
#define se second
#define ii pair < int , int >
#define pb push_back
#define eb emplace_back
using namespace std;
int f[200010][20] , BIT[200010] , c[200010];
ii a[200010];
void upl(int x) {
for ( ; x > 0 ; x -= (-x & x))
BIT[x]++;
}
int dwl(int x) {
int tmp = 0;
for ( ; x <= 200000 ; x += (-x & x))
tmp += BIT[x];
return tmp;
}
int get(int l,int r) {
if (l > r) return 0;
int k = __lg(r - l + 1);
return max(f[l][k] , f[r - (1 << k) + 1][k]);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |