# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
200156 | dennisstar | Matryoshka (JOI16_matryoshka) | C++17 | 683 ms | 36068 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>
#define fi first
#define se second
#define eb emplace_back
#define all(V) (V).begin(), (V).end()
#define unq(V) (V).erase(unique(all(V)), (V).end())
using namespace std;
typedef vector<int> vim;
typedef pair<int, int> pii;
struct Seg {
int ar[(1<<19)];
void upd(int i, int s, int e, int t, int v) {
if (s==e) { ar[i]=max(ar[i], v); return ; }
int md=(s+e)/2;
if (t<=md) upd(i*2, s, md, t, v);
else upd(i*2+1, md+1, e, t, v);
ar[i]=max(ar[i*2], ar[i*2+1]);
}
int get(int i, int s, int e, int ts, int te) {
if (e<ts||te<s) return 0;
if (ts<=s&&e<=te) return ar[i];
int md=(s+e)/2;
return max(get(i*2, s, md, ts, te), get(i*2+1, md+1, e, ts, te));
}
}S;
int N, Q, A[200010], B[200010], ans[200010];
pii P[200010];
vim cp1, cp2, pn[200010]; vector<pii> qu[200010];
Compilation message (stderr)
# | 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... |