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!