the test is ok, everything is good but the judge response with NZEC.
help me guys… edit: that is the TWOSQRS problem. i tried C++, now is Pascal and no AC, although i used a same algorithm…
problem solved, TLE.
Hint: Quora it, if you cannot figure out what have you done so wrong.
The big difference could be in the test data of course. Spoj is liable to include corner cases and extreme data ranges that you might not have thought of for Ideone.