# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
919655 | OAleksa | Building 4 (JOI20_building4) | C++14 | 197 ms | 100428 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;
#define int long long
#define f first
#define s second
const int N = 1e6 + 69;
const int inf = 1e9;
int n, a[N], b[N];
int mna1[N], mxa1[N], mna2[N], mxa2[N];
int mnb1[N], mxb1[N], mnb2[N], mxb2[N];
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int tt = 1;
//cin >> tt;
while (tt--) {
cin >> n;
n *= 2;
for (int i = 1;i <= n;i++)
cin >> a[i];
for (int i = 1;i <= n;i++)
cin >> b[i];
for (int i = 1;i <= n;i++) {
mna1[i] = mna2[i] = mnb1[i] = mnb2[i] = inf;
mxa1[i] = mxa2[i] = mxb1[i] = mxb2[i] = -inf;
}
mna1[1] = mxa1[1] = mnb2[1] = mxb2[1] = 1;
mna2[1] = mxa2[1] = mnb1[1] = mxb1[1] = 0;
for (int i = 2;i <= n;i++) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |