Answers to: Dynamic Programming Problemhttps://inoi15.discuss.codechef.com/questions/60500/dynamic-programming-problem<p>How to solve the problem STANOVI from COCI contest 4 ?</p>
<p><a href="http://hsin.hr/coci/contest4_tasks.pdf">http://hsin.hr/coci/contest4_tasks.pdf</a> It is the 6th problem.</p>enMon, 05 Jan 2015 12:59:06 +0530Comment by neo1tech9_7 on neo1tech9_7's questionhttps://inoi15.discuss.codechef.com/questions/60500/dynamic-programming-problem#60783<p>upd : editorials will be released in a day or two.</p>neo1tech9_7Mon, 05 Jan 2015 12:59:06 +0530https://inoi15.discuss.codechef.com/questions/60500/dynamic-programming-problem#60783Comment by neo1tech9_7 on neo1tech9_7's questionhttps://inoi15.discuss.codechef.com/questions/60500/dynamic-programming-problem#60677<p>I may be wrong though.</p>neo1tech9_7Sun, 04 Jan 2015 06:27:32 +0530https://inoi15.discuss.codechef.com/questions/60500/dynamic-programming-problem#60677Comment by neo1tech9_7 on neo1tech9_7's questionhttps://inoi15.discuss.codechef.com/questions/60500/dynamic-programming-problem#60672<p>well I know what the states of the dp are but I don't know how to calculate them efficiently or how to transition between them there are n.m.16 states
consider a cell x,y then it has an edge with x - 1, y, x + 1, y , x, y + 1, x, y - 1 so in total 4 edges and 2^4 possible subsets (think each edge on and off) since there are n.m cells so in total n.m.16 states</p>neo1tech9_7Sun, 04 Jan 2015 04:24:42 +0530https://inoi15.discuss.codechef.com/questions/60500/dynamic-programming-problem#60672Comment by Organic-Shilling on neo1tech9_7's questionhttps://inoi15.discuss.codechef.com/questions/60500/dynamic-programming-problem#60651<p>Any ideas on how to solve ? <a href="/users/29065/neo1tech9_7">@neo1tech9_7</a></p>Organic-ShillingSun, 04 Jan 2015 00:38:33 +0530https://inoi15.discuss.codechef.com/questions/60500/dynamic-programming-problem#60651