I have tried PRIME1 with ruby and finally got accepted after so many TLEs
. But it is still too low. I think the most of time was spent to print out the data. Other version in java and c run only under 1 sec!
So can I make it a little faster? What can be optimized?
I see the best submit run in only 3 or 4 sec (ruby). How you guys do it??? 