mridul1809's blog

By mridul1809, history, 5 years ago, In English

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!

My Solution.

Can you help?

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
5 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

x = (1LL << i). Have you considered what happens when $$$i >= 64$$$? My code follows the same idea. Maybe it can help.