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

Автор GoldenShadow, история, 4 года назад, По-английски

I recently submitted a (greedy) solution to problem 1374E1. However, the algorithm received a wrong answer verdict on testcase 5, which had such large numbers that I was unable to access the entirety of the testcase. Could someone please tell me what the problem is in the code, or why it failed the fifth testcase? Any assistance would be appreciated.

[update] found the issue, need to do the greedy checking from the beginning instead of the end.

WA submisson: https://codeforces.me/contest/1374/submission/102733730

AC submission: https://codeforces.me/contest/1374/submission/102739800

Полный текст и комментарии »

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