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