Strange behavior of lambda-function in sort()

Revision ru1, by rurixx, 2022-05-20 18:11:57

I was solving 1684D - Ловушки of recent contest and have faced with strange thing.

Pls look at two pairs of submissions. (There are very simple code)

  1. 157815234 — OK, 157815120 — Time limit

  2. 157814018 — OK, 157813947 — Run-time error

In both pairs codes' difference is the same: 'wrong' submission uses lambda function with operator >= instead of > in 'good' submission.

Can it be explained?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
ru1 Russian rurixx 2022-05-20 18:11:57 541 Первая редакция (опубликовано)