# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1038144 | juicy | Railway Trip 2 (JOI22_ho_t4) | C++17 | 277 ms | 233556 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;
#ifdef LOCAL
#include "debug.h"
#else
#define debug(...) 42
#endif
const int N = 1e5 + 5, LG = 17;
int n, k, m, q;
int lg[N], a[2 * N], b[2 * N];
array<int, 2> spt[LG][LG][N], A[N];
vector<int> add[N], del[N];
array<int, 2> operator + (const array<int, 2> &a, const array<int, 2> &b) {
return {min(a[0], b[0]), max(a[1], b[1])};
}
array<int, 2> qry(int k, int l, int r) {
int f = lg[r - l + 1];
return spt[k][f][l] + spt[k][f][r - (1 << f) + 1];
}
void init(array<int, 2> spt[LG][N]) {
for (int i = 1; i <= n; ++i) {
spt[0][i] = A[i];
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |