There's Wrong Answer on test case 14 I tried to solve it But What's in Code wrong that lead to print 146 instead of 120 Code : https://ideone.com/gwUN8C Problem : http://mirror.codeforces.com/contest/186/problem/B Submission : http://mirror.codeforces.com/contest/186/submission/30480217
The problem is that your output did not follow this criteria
In case of equal mushroom heights, the participants are sorted by their numbers (the participants with a smaller number follow earlier).
I tried for that and when I debug that it sort with numbers
I dont understand what you are talking about. But here you go, just change sort to stable sort, and it will work.
I was talking about when I debugged it it sort by earlier But , Thanks for you because you helped me to know stable sort :D
Accepted :D