# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1000353 | MarwenElarbi | Building 4 (JOI20_building4) | C++17 | 5 ms | 4700 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 fi first
#define se second
#define ll long long
#define pb push_back
#define ii pair<int,int>
const int nax=5e5+5;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int dp[2][nax][2];
int tab[2][nax];
int main() {
int n;
cin>>n;
n*=2;
for (int i = 0; i < 2; ++i)
{
for (int j = 1; j <= n; ++j)
{
cin>>tab[i][j];
}
}
for (int i = 1; i <= n; ++i)
{
for (int j = 0; j < 2; ++j)
{
dp[j][i][0]=n+1;
dp[j][i][1]=-1;
for (int k = 0; k < 2; ++k)
{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |