# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
431723 | faresbasbs | 운세 보기 2 (JOI14_fortune_telling2) | C++14 | 820 ms | 41356 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int MXN = 700 * 1000 + 3;
int tree[MXN << 2], a[MXN], b[MXN], t[MXN], oga[MXN], ogb[MXN];
vector<int> coord, q[MXN];
int n, k, sz;
function<int(int, int)> comb = [] (int x, int y) {
return max(x, y);
};
void update(int v, int tl, int tr, int pos, int x) {
if(tl == tr)
tree[v] = comb(tree[v], x);
else {
int tm = (tl + tr) >> 1;
if(pos <= tm)
update(v << 1, tl, tm, pos, x);
else
update(v << 1|1, tm + 1, tr, pos, x);
tree[v] = comb(tree[v << 1], tree[v << 1|1]);
}
}
void upd(int pos, int x) {
update(1, 1, MXN - 2, pos, x);
}
int query(int v, int tl, int tr, int l, int r) {
if(l > r)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |