Counting block combinations I, II
The problem is quite simple. I used binomial coefficient to compute the total number of ways with all red block size>=3.
After I read the discussion thread, I am surprised to find that there are a lot of ways to solve this problem. I felt that I am just lucky, if the size of the problem increased to 5000, my method is useless, but some other method is still very efficient.
Problem 115 is similar to problem 114, my code can still be used on this problem. I got the result in no time.
No comments:
Post a Comment