# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
899104 | d4xn | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++17 | 3061 ms | 262144 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math,inline")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,lzcnt,mmx,abm,avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define all(x) x.begin(), x.end()
#define tp3 tuple<int, int, int>
const int N = 1e6, L = 20, inf = INT_MAX;
int n, m, mnA, mxK, a[N], b[N], mxL[N], lg[N], st[L][N], seg[N*4];
vector<int> lf[N];
vector<tp3> q[N];
bitset<N> ans;
void build(int p=1, int l=0, int r=n-1) {
if (l == r) {
seg[p] = (b[l] == -1 ? 0 : (a[l] + a[b[l]]));
return;
}
int mid = (l+r) >> 1;
build(p*2, l, mid);
build(p*2+1, mid+1, r);
seg[p] = max(seg[p*2], seg[p*2+1]);
}
void update(int x, int p=1, int l=0, int r=n-1) {
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |