# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
422479 | iulia13 | Building 4 (JOI20_building4) | C++14 | 970 ms | 44704 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 <iostream>
using namespace std;
const int N = 5e5 + 5;
int a[2 * N], b[2 * N];
struct ura{
int l, r;
};
ura dp[N * 2][2];
void join(ura &x, ura y)
{
x.l = min(x.l, y.l);
x.r = max(x.r, y.r);
}
char s[2 * N];
int cnt[2];
int main()
{
int n, i, ans = -1, j;
cin >> n;
cnt[0] = cnt[1] = n;
for (i = 1; i <= 2 * n; i++)
for (j = 0; j < 2; j++)
dp[i][j].l = 2 * N;
for (i = 1; i <= 2 * n; i++)
cin >> a[i];
for (i = 1; i <= 2 * n; i++)
cin >> b[i];
dp[1][0] = {1, 1};
dp[1][1] = {0, 0};
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |