Please, if anyone can see what is wrong in my submission it is failing on the fourth test case of https://codeforces.me/contest/1749/problem/C. I have used the trick that atleast one 1 must be present so the answer cant be greater than the number of 1 and also for each stage if I have a number less than or equal to it. Then if p are the stages in which we won't need help of 1s then the left k-p are the ones that will make 1s get away as they will be used by Alice.So, my answer is p+(k-p+1)/2. This is my approach, please tell me where am I wrong. https://codeforces.me/contest/1749/submission/213695901