# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
156535 | Saboon | 운세 보기 2 (JOI14_fortune_telling2) | C++14 | 601 ms | 23616 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define F first
#define S second
#define PB push_back
#define PF push_front
#define MP make_pair
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
const int maxn = 2e5 + 4;
const int maxl = 23;
int seg[maxl][4 * maxn], t[maxn], a[maxn], b[maxn];
int get2 (int id, int L, int R, int l, int r, int lb, int h = 0) {
if (L == l and R == r) {
int fi = lower_bound (seg[h] + L, seg[h] + R, lb) - seg[h];
return R - fi;
}
int mid = (L + R) >> 1, ret = 0;
if (mid > l)
ret += get2 (2 * id + 0, L, mid, l, min (mid, r), lb, h + 1);
if (mid < r)
ret += get2 (2 * id + 1, mid, R, max (l, mid), r, lb, h + 1);
return ret;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |