# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
204925 | extraterrestrial | Long Mansion (JOI17_long_mansion) | C++14 | 2842 ms | 119408 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>
typedef long long ll;
typedef long double ld;
using namespace std;
#define F first
#define S second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define SZ(x) (int)(x).size()
//#define int ll
const int N = 5e5 + 10;
const int INF = 1e9 + 10;
struct ST {
vector<int> mn, mx, a;
ST(int n, vector<int> _a) {
a = _a;
mn.resize(4 * n + 10);
mx.resize(4 * n + 10);
build(1, 1, n);
}
void build(int v, int l, int r) {
if (l == r) {
mn[v] = mx[v] = a[l];
return;
}
int mid = (l + r) / 2;
build(2 * v, l, mid);
build(2 * v + 1, mid + 1, r);
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... |