No idea why RTE

Правка en1, от ahshafi, 2022-05-24 04:40:49

In 1681C - Double Sort of last Educational , I sorted the vector {0, 1, .... n-1} using the following comparison function

bool comp(int &i, int &j)
{
	return a[i]<=a[j] and b[i]<=b[j];
}

This resulted in RTE. Submission link

Then I used a tuple vector of (a[i], b[i] , i) instead and sorted it with default STL comparator which however gave AC. Submission link Has it something to do with the comparator?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский ahshafi 2022-05-24 04:40:49 568 Initial revision (published)