Need help with Codeforces Round 865 (Div. 1), A. Ian and Array Sorting

Revision en1, by lucius_fox, 2023-12-18 14:04:43

This was my initial submission for the problem:

However just changing the value of arr[0] to something a lot lesser, the code becomes accepted:

The algorithm is pretty straightforward (as seen from my code) but why should the value of arr[0] be so less? isn't -(1e9 + 1) small enough for it? If you can help, perhaps by giving a test case which fails for the initial submission I will be grateful

Tags help


  Rev. Lang. By When Δ Comment
en1 English lucius_fox 2023-12-18 14:04:43 586 Initial revision (published)