# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
469211 | Millad | LIS (INOI20_lis) | C++14 | 2518 ms | 217964 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.
/// In the name of god
#include <bits/stdc++.h>
#pragma GCC target ("avx2")
#define F first
#define S second
#define pb push_back
#define debug(x) cerr << #x << " : " << x << '\n'
using namespace std;
typedef int ll;
typedef long double ld;
typedef pair<ll, ll> pll;
const ll maxn = 1e6 + 5;
ll q, x[maxn], p[maxn], b[maxn], ind[maxn], seg[maxn * 4], dp[maxn], lis;
set <ll> A[maxn], B[maxn];
vector <ll> Qu;
inline ll get_ind(ll id, ll ps = 0, ll v = 1, ll s = 0, ll e = q){
if(e - s == 1){
seg[v] = 1;
return s;
}
ll mid = (e + s) >> 1, lc = v << 1, rc = lc | 1, ind;
if(ps + (mid - s) - seg[lc] < id)ind = get_ind(id, ps + (mid - s) - seg[lc], rc, mid, e);
else ind = get_ind(id, ps, lc, s, mid);
seg[v] = seg[lc] + seg[rc];
return ind;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |