Comments

Same problem :( I won't use unordered containers in C++ anymore!

+1

Absolutely agree :)

So why not to disable C++ compiler optimizations on Codeforces? Because now hacking such cases is just like trying your luck :(

+10

Could someone explain me how this solution (http://codeforces.me/contest/596/submission/14278463) passed all tests?!

P.S.: during the contest I tried to hack it several times using tests like

but without any success :(

But in C++ O(n3) solution is even faster than supposed solution :)

P.S.: Really nice contest! Thanks to the author!

On Xellos → Invitation to IPSC 2015, 11 years ago
-7

Vypiem_za_Lubov