diff --git a/day5/perfect/fix.cpp b/day5/perfect/fix.cpp new file mode 100644 index 0000000..e9481e8 --- /dev/null +++ b/day5/perfect/fix.cpp @@ -0,0 +1,28 @@ +#include +using namespace std; + +const int MAX_N = 3e5+5; +const int MAX_K = 19; +int sMin[MAX_N][MAX_K]; +int sMax[MAX_N][MAX_K]; +int l[MAX_N]; + + +int main(){ + cin.sync_with_stdio(false); + cin.tie(0); + l[1]=0; + int n; + cin>>n; + for(int i=1;i<=n;i++){ + cin>>sMin[i][0]; + sMax[i][0]=sMin[i][0]; + if(i!=1)l[i]=l[(i>>1)]+1; + } + int k=l[n]+1; + for(int j=1;j<=k;j++){ + for(int i=1;i+(1< +using namespace std; + +string s1,s2,s3,s4,s5,s6; + +/* +1.B 2.B + +*/ + +int main() { + s1 = "ABCDABCDABCDABC"; + s2 = "TFTFAB"; + s3 = "TFTABC"; + s4 = "TFTABC"; + s5 = "ABCDA"; + s6 = "ABCDA"; + + string ans = s1 + s2 + s3 + s4 + s5 + s6; + assert(ans.length() == 43); + cout<