Modular Cubes, part 2
This problem is more difficult than problem 271. I lost my old code, so I wrote a new code. I made some mistakes in the code, but soon I fixed those bugs. I checked the clarification of the problem, but some of the guy's result is not correct. I spent a lot of time debugging the case of 3e7, 3e8. But finally I found my code is correct!
My code runs 2 second. One need to memorize some result to speed up the code. That being said, it is still very tricky to count the number of solutions of the same type!
Update: The discussion of this problem is very helpful. I learned a great deal from the discussion. I solved problem 421 with the help of the discussion.
No comments:
Post a Comment