what `s the problem?
does anybody know what the problem with this code? (runtime error!!) Your text to link here...
Auto comment: topic has been updated by Sederam (previous revision, new revision, compare).
https://codeforces.me/blog/entry/70237
Your comparator function cmp currently returns true if the two elements to be compared are equal. C++ requires you to have comparators return false for equal elements. You just need to replace $$$\le$$$ with $$$ \lt $$$ to fix the RTE.
cmp
true
false
Fixing this gives WA2.
thanks!!
Auto comment: topic has been updated by Sederam (previous revision, new revision, compare).
https://codeforces.me/blog/entry/70237
Your comparator function
cmpcurrently returnstrueif the two elements to be compared are equal. C++ requires you to have comparators returnfalsefor equal elements. You just need to replace $$$\le$$$ with $$$ \lt $$$ to fix the RTE.Fixing this gives WA2.
thanks!!