how precomputation works in spoj as my solution for FOURCHIPS(HARD) got accepted however it was taking around 9 second for precomputation and then just constant time for rest of testcases, however the final verdict was 2 sec.i dont know how that works??