You are not logged in. Please login at www.codechef.com to post your questions!

×

3D DP question

please help me to understand 3D dynamic programming like some basic question of it with explanation, link is also fine thank you

asked 27 Sep '16, 19:25

vijayiota77's gravatar image

4★vijayiota77
14425
accept rate: 3%


I had did my first dp question on codeforces which uses 3D array. Here is the link : http://codeforces.com/problemset/problem/711/C In this I had used a 3D dp array for memoization. In my solution dp[i][j][k] will represent the number of the minimum amount of paint needed to colour the first i trees such that it has beauty j and the i-th tree is colored by colour k. U can see the editorial for more details which is in the name of "Tutorial" on the bottom right corner. Happy coding ;)

link

answered 28 Sep '16, 02:39

aloochaat1998's gravatar image

5★aloochaat1998
995
accept rate: 16%

edited 28 Sep '16, 02:41

thank you.

(28 Sep '16, 19:26) vijayiota774★

This 3d dp problem is really nice and it will surely provide you the clarity http://codeforces.com/problemset/problem/687/C

link

answered 29 Sep '16, 10:25

arunnsit's gravatar image

6★arunnsit
1.0k1611
accept rate: 27%

yes its 3d dp

(29 Sep '16, 16:01) vijayiota774★

if one give some question from geeksforgeeks ,or some other platform?

link

answered 29 Sep '16, 16:02

vijayiota77's gravatar image

4★vijayiota77
14425
accept rate: 3%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×2,212

question asked: 27 Sep '16, 19:25

question was seen: 3,332 times

last updated: 29 Sep '16, 16:02