Why stable_sort() worked, but sort() didn't?

Revision en2, by CS_alpha, 2025-06-19 22:14:17

I used sort() in https://mirror.codeforces.com/contest/2056/submission/325199850 and got runtime error verdict, but used stable_sort() in https://mirror.codeforces.com/contest/2056/submission/325199048 and got accepted verdict.

Can someone please explain the reason? The rest of the code is unchanged.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English CS_alpha 2025-06-19 22:14:17 34 Tiny change: 'e reason? ' -> 'e reason? The rest of the code is unchanged.'
en1 English CS_alpha 2025-06-19 22:13:28 302 Initial revision (published)