# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1135841 | Thanhs | Building 4 (JOI20_building4) | C++20 | 15 ms | 31812 KiB |
#include <bits/stdc++.h>
using namespace std;
#define name "TENBAI"
#define fi first
#define se second
#define int long long
#define endl '\n'
#define setmin(x, y) x = min((x), (y))
#define setmax(x, y) x = max((x), (y))
#define sqr(x) ((x) * (x))
mt19937 hdp(chrono::high_resolution_clock::now().time_since_epoch().count());
int rand(int l, int r){return l + ((hdp() % (r - l + 1)) + r - l + 1) % (r - l + 1);}
const int NM = 1e6 + 5;
int n, dp[NM][2][2], a[NM][2];
void solve()
{
memset(dp, -1, sizeof dp);
cin >> n;
for (int i = 0; i < 2; i++)
for (int j = 1; j <= 2 * n; j++)
cin >> a[j][i];
dp[1][0][0] = dp[1][0][1] = 1;
dp[1][1][0] = dp[1][1][1] = 0;
for (int i = 1; i < 2 * n; i++)
for (int j = 0; j < 2; j++)
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |