Google Code Jam 2010

In this year google code jam 2010, among the problem set, I would say the difficulty is that A < C < B. In the problem A(Snapper Chain), you can realize that the toggle status of each snapper has some particular patterns. It can be resolved straightforwardly.
In the problem C(Theme Park), it is also easy to resolve but I did write more code than that of problem A.
In the problem B(Fair Warning), I think it is the most difficult. It requires the big number operations so my programming language turned out perl to use bignum and Math::BigInt. Then I wrote some formulation to solve it. The small input is correct and passed. But the large input estimations are wrong because I didn't consider some conditions.