11725 - Colorful Board

All about problems in Volume 117. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
mak(cse_DU)
Learning poster
Posts: 72
Joined: Tue May 30, 2006 5:57 pm
Location: bangladesh

11725 - Colorful Board

Post by mak(cse_DU) » Thu Jun 24, 2010 3:17 pm

Some one please share Idea for this problem.
I solved it but timing(0.504s) was so much poor. :(

Thanks in advance.
Mak
Help me PLZ!!

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:

Re: 11725-Colorful Board

Post by Jan » Tue Jun 29, 2010 12:59 pm

How about mathematical solution?
Ami ekhono shopno dekhi...
HomePage

mak(cse_DU)
Learning poster
Posts: 72
Joined: Tue May 30, 2006 5:57 pm
Location: bangladesh

Re: 11725-Colorful Board

Post by mak(cse_DU) » Tue Jun 29, 2010 3:27 pm

@Jan vai:
There have some forbidden cells. So I did DP using row Masking Idea.
would you illustrate your Idea briefly?
Thanks in advance
Mak
Help me PLZ!!

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:

Re: 11725-Colorful Board

Post by Jan » Tue Jun 29, 2010 6:48 pm

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.
Ami ekhono shopno dekhi...
HomePage

Post Reply

Return to “Volume 117 (11700-11799)”