Hey!
I was trying to solve the problem WARRIORS from August Cook Off.
I came up with a solution and implemented it but got a Wrong Answer! After hours of debugging I decided to have a look at another participant's solution. To my amaze , our solutions were almost identical!
I am still unable to understand where is my code failing!
Can you help?
x = (1LL << i)
. Have you considered what happens when $$$i >= 64$$$? My code follows the same idea. Maybe it can help.