# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
72448 | 김동현보다 잘함 (#118) | Easy Data Structure Problem (FXCUP3_easy) | C++17 | 190 ms | 10396 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;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<pii,int> piii;
typedef pair<ll,ll> pll;
int INF = 1e8;
int n, m;
int tree[270000], key;
int st[270000], en[270000];
vector<int> lis[100100];
void init() {
int i;
for (key=1;key<n;key*=2);
for (i=1;i<key*2;i++) tree[i] = INF;
for (i=key;i<key*2;i++) st[i] = en[i] = i-key;
for (i=key-1;i;i--) {
st[i] = min(st[i*2],st[i*2+1]);
en[i] = max(en[i*2],en[i*2+1]);
}
}
void upd(int idx, int val) {
idx += key;
while(idx) {
tree[idx] = min(tree[idx],val);
idx/=2;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |