I've written the solution for [543 B](http://mirror.codeforces.com/contest/543/problem/B),I think it works fine but gets tme limit on test 8, I ckecked and it doesn't pass inputing phase.How can it happen with 3000 numbers?↵
↵
[My submission](http://mirror.codeforces.com/contest/543/submission/24252946)
↵
[My submission](http://mirror.codeforces.com/contest/543/submission/24252946)