Изменения рейтингов за последние раунды временно удалены. Скоро они будут возвращены. ×

Блог пользователя irajdeep

Автор irajdeep, история, 9 лет назад, По-английски

So I made two submissions to this problem.

While this solution gets WA at test case 39, this onegets Accepted. While the only difference between them is in the order of calculating a1 and a2. Can anyone help me with the reason as why does the order make a difference? Thanks

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
9 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I'm not quite sure, but I believe actually both solutions are incorrect. Because, the memo should take into consideration the "flag" state as well. Answers can differ depending if it's 1 or 0. I just modified that and I got AC : http://codeforces.net/contest/577/submission/12962910.