Wednesday, May 12, 2010

A chain is only as strong as its weakest link

In the qualification round of GCJ '10 there was a problem involving integers ~1050. I had to use gmp_* for that. Every thing worked fine for a small data set. But the program gave unexpected results for a large dataset. Then I realized that I've used mod in my code. Replacing that with gmp_mod did the job.

No comments:

Post a Comment