# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
783018 | RushB | LIS (INOI20_lis) | C++17 | 933 ms | 50864 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>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
using ar = array<int, 2>;
const int INF = 1ll << 30;
const int N = 1e6 + 6;
const int SQ = 3000;
const int SQQ = 2000 + 5;
int n, x[N], p[N], q, ans[N], mx, X[N], tmp[N], S[4 * N], delta[4 * N];
vector<int> V[N / SQ + 5];
ar M[SQQ], a[N], b[N];
void build(int v, int l, int r) {
if (l + 1 == r) {
S[v] = p[l];
return;
}
int m = l + r >> 1;
build(v << 1, l, m);
build(v << 1 | 1, m, r);
S[v] = min(S[v << 1], S[v << 1 | 1]);
}
void add(int v, int l, int r, int L, int R) {
if (R <= l || r <= L) return;
if (L <= l && r <= R) {
delta[v]--;
S[v]--;
return;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |