BanazadehAria's blog

By BanazadehAria, history, 5 years ago, In English

Hi this is my submission https://codeforces.net/contest/538/submission/55094041 code for 538C but it gets WA for test case 22. Are there any points that I have not mentioned in my code? Thanks in advance.

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

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

I think you forgot to calculate what was the maximum height he could start with. I added this line to your code:

maxs=max(maxs,(ll)(a[0].first+a[0].second-1));

and it worked on test 22.

  • »
    »
    5 years ago, # ^ |
    Rev. 2   Vote: I like it +3 Vote: I do not like it

    I didn't really understand why are you adding this? We must start from a[0] .first? am i right?