Hi. I've submitted some code here, and I don't see anything wrong with it yet. It works fine when I compile it on my machine with C++11, but when I submit, the program just prints a random long long. Can anybody find the flaw? Thanks.
Submission: 18021654
http://mirror.codeforces.com/contest/567/submission/18021892
Thank you very much! The only thing I'm wondering is why it works on my local machine though...