Hello, what's up ?!
I prepared another problem, but this time, some part of the problem is similar to one on codechef, which I of course came to know later. Anyways : try this -> https://mirror.codeforces.com/contestInvitation/bbf072a86e816262a0c0bb3ed00f595c168d0276.
I hope you will find the problem new! XD
Edit: Solution code : https://ideone.com/hhbkjX
Thank you!








Neat, had to think about this for a good bit. Curious as to what the "official" solution/proof is since mine was rather Guessforces lmao
No proofs, just the loads of casework XD. Thank you for investing your time and making a correct submission!
Bruh the test 15 is killing me :(
Hint: Where should 1 occur in original array A according to the pref and suf arrays ?!
1 must occur at first position and last position as well (which is impossible).
Thank you for making submission(s)!