Page 1 of 1

11725 - Colorful Board

Posted: Thu Jun 24, 2010 3:17 pm
by mak(cse_DU)
Some one please share Idea for this problem.
I solved it but timing(0.504s) was so much poor. :(

Thanks in advance.

Re: 11725-Colorful Board

Posted: Tue Jun 29, 2010 12:59 pm
by Jan
How about mathematical solution?

Re: 11725-Colorful Board

Posted: Tue Jun 29, 2010 3:27 pm
by mak(cse_DU)
@Jan vai:
There have some forbidden cells. So I did DP using row Masking Idea.
would you illustrate your Idea briefly?
Thanks in advance

Re: 11725-Colorful Board

Posted: Tue Jun 29, 2010 6:48 pm
by Jan
My timing is .136.

The idea is, say you have 4 columns, then if the previous row contains (1, 1, 2, 3) or (2, 2, 1, 3) or (2, 2, 1, 4) the result is same. So, calculate once for each pattern.