I am a leaner and just now trying to solve problem 230 A . i got rte and i thought my array wasnt big enough but it wasnt the case . can someone help me find the bug ? or MLE is included as rte in codeforce ??
my code is in this link : http://ideone.com/82YKlw
the problem link : http://codeforces.me/problemset/problem/230/A








Auto comment: topic has been updated by triton21 (previous revision, new revision, compare).
There is your problem in your cmp.
Code
wow thx alot . but mind asking why my previous cmp function can cause rte ?
When you wrote : if (a.f < b.f) { return true; } return a.s > b.s; If a.f > b.f your code return a.s > b.s. It's uncorrect. You need return false.i see thx for the help i really appreciate it