Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link ×

levi.ackerman1732's blog

By levi.ackerman1732, history, 12 days ago, In English,

Hello all,

1301B - Motarack's Birthday

I have read the editorial and implemented the same. My code fails in some hidden test case. If any of you could provide some insight as to what I am doing wrong I would be grateful.

My submission: 71058284

I am extremely sorry if I am asking something that is fairly obvious. Thank you for your time.

  • Vote: I like it
  • +1
  • Vote: I do not like it

12 days ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

You didn't read the editorial correctly

You are supposed to consider only numbers adjacent to -1 (since they are the ones that your choice of k affects) and NOT every number that is not -1.