Submission #1060445

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10604452024-08-15 14:32:29vjudge1LIS (INOI20_lis)C++14
100 / 100
1313 ms152508 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define pb push_back
#define pf push_front
#define fi first
#define se second
const ll mod = 1e9+7, mxn = 1e6+7;
ll n, st[mxn<<2], dp[mxn], a[mxn], ans = 0;
vector<pair<ll,ll>> qx;
vector<set<ll>> opt(mxn);
void build(ll id, ll l, ll r)
{
st[id] = r-l+1;
if (l == r) {return;}
ll m = (r+l)>>1;
build(id<<1,l,m); build(id<<1|1,m+1,r);
}
void upd(ll id, ll l, ll r, ll i)
{
if (r < i || i < l) return;
if (l == r) {st[id] = 0; return;}
ll m = (r+l)>>1;
upd(id<<1,l,m,i); upd(id<<1|1,m+1,r,i);
st[id] = st[id<<1]+st[id<<1|1];
}
ll walk(ll id, ll l, ll r, ll x)
{
if (l == r) return l;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...