# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1114917 | Younis_Dwai | Building 4 (JOI20_building4) | C++14 | 10 ms | 8784 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.
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#include <bits/stdc++.h>
#define endl "\n"
#define F first
#define S second
#define pb push_back
//#define int long long
#define in insert
#define mid (l+r)/2
#define in insert
using namespace std;
const int N=2e3+5;
bool dp[2*N][N][2];
int b[N],a[N],n;
//string ans="";
void get(int id ,int done ,int cur){
if(id==0) return ;
if(cur==0){
if(dp[id-1][done-1][0] && a[id-1]<=a[id]) get(id-1,done-1,0);
else get(id-1,done-1,1);
cout<<'A';
}
else{
if(dp[id-1][done][0] && a[id-1]<=b[id]) get(id-1,done,0);
else get(id-1,done,1);
cout<<'B';
}
return ;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |