I wonder how mrecaman.cpp works that fast on SPOJ...