BanazadehAria's blog

By BanazadehAria, history, 7 years ago, In English

Hi this is my submission https://codeforces.me/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

»
7 years ago, hide # |
 
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.