Ques: https://hack.codingblocks.com/contests/c/547/1156
Code:
https://ide.codingblocks.com/s/55525
WA in last 3 test cases
Refer my code:
https://ide.codingblocks.com/s/55783
Very little mistakes in your code
you can easily compare both of our codes
Hit like if u get it
1 Like
you are doing loop from 1 to n
Make it from 0 to n-1
As grundy concept start from 0
oopsie, I thought, we would have to ignore the 1st block to get the ans for the remaining