WA in SHUFFLE

Can anyone tell me where this code goes wrong or testcases?
Question Link-SHUFFLE Problem - CodeChef
Solution-CodeChef: Practical coding for everyone
Please help in this, thanks!:slight_smile: