# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
211754 | nafis_shifat | Building 4 (JOI20_building4) | C++14 | 1288 ms | 34920 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>
#define pii pair<int,int>
#define ll long long
using namespace std;
int main()
{
int n;
cin>>n;
int dp1[2*n+1][2]={};
int dp2[2*n+1][2]={};
for(int i=0;i<=2*n;i++)dp1[i][0]=dp1[i][1]=1e9+9;
memset(dp2,-1,sizeof(dp2));
int a[2*n+1],b[2*n+1];
for(int i=1;i<=2*n;i++)cin>>a[i];
for(int i=1;i<=2*n;i++)cin>>b[i];
dp1[1][0]=dp2[1][0]=1;
dp1[1][1]=dp2[1][1]=0;
for(int i=2;i<=2*n;i++)
{
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |