Unexplained Runtime error on Test Case 8 due to slight variation of sorting comparator function

Revision en1, by debdhriti, 2021-12-28 23:07:08

In the problem B, round #763(Div 2) is submitted the following code during the contest: Incorrect Submission: [https://codeforces.net/contest/1623/submission/140919117] It resulted in "Runtime error on Test 8" after System Testing, later after the contest, I resubmitted after just a minor variation. Correct Solution: [https://codeforces.net/contest/1623/submission/140962533 The only difference between the two codes is the comparator function just declared above int main(), called psort. In the one giving Runtime error, it has a "<=" comparator, and in the correct one it has "<" comparator. Could anyone please tell the difference.

Tags sorting, comparators, runtime error

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English debdhriti 2021-12-28 23:08:46 13
en2 English debdhriti 2021-12-28 23:07:39 0 (published)
en1 English debdhriti 2021-12-28 23:07:08 738 Initial revision (saved to drafts)