Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

2 simple ambiguous doubts...

Правка en1, от AmanAgr2509, 2021-07-12 01:27:55

1st: In yesterday's contest I got FST on B on T.C-11, and after I reviewed it I found out that I was mistakenly running loop till n where I should run it till n-1 only, but ironically protests passed without RTE, so could anyone explain why RTE didn't occur...

2nd: As per the blog, the comparator should return false, and as per my code:

bool cmp(pair<int, int> p1, pair<int, int> p2) { return p2.second > p1.second; } it would be returning false, but doing this showed WA on CSES Projects DP question and as I entered (>=) it got AC. So, what's the logic behind this flaw, or is it due to my false understanding.

Thanks for your help!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский AmanAgr2509 2021-07-12 09:55:13 67
en3 Английский AmanAgr2509 2021-07-12 01:30:33 2 Tiny change: 'nically protests pass' -> 'nically pretests pass'
en2 Английский AmanAgr2509 2021-07-12 01:29:38 110
en1 Английский AmanAgr2509 2021-07-12 01:27:55 852 Initial revision (published)