Need help on problem 1374E1 (WA)

Правка en4, от GoldenShadow, 2020-12-30 10:07:32

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

Теги greedy, help, 1374e1, question, wa, wrong answer

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский GoldenShadow 2020-12-30 10:07:32 2655
en3 Английский GoldenShadow 2020-12-30 08:50:06 14
en2 Английский GoldenShadow 2020-12-30 08:49:09 2705
en1 Английский GoldenShadow 2020-12-30 08:48:04 384 Initial revision (published)