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

×

Here'e a prob. I've been struggling with...Plz. help!!!

Can someone explain the statement of the HYPERSPACEPATHS prob. from the INOI Practice Server.. If possible, please describe the solution...

asked 01 Jan '15, 02:28

arpanb8's gravatar image

3★arpanb8
120310
accept rate: 13%

edited 12 Jan '15, 19:21


@roxtar123, i think there is slight mistake in your solution.

DP1(i) denotes min sum possible by a single section of size k using 1..i plots.

DP2(i) denotes min sum possible by a single section of size k using i..n plots

Loop i from 1 to n-1

Take min of DP1(i)+DP2(i+1) over all i

What say?

@arpanb8, please be patient. Why such a hurry? People will reply when they are free, no one is under any obligation to answer your queries and yet people are trying to help. So please be a little grateful and less impatient.

link

answered 01 Jan '15, 14:56

knsn's gravatar image

4★knsn
9
accept rate: 0%

Make 2 DP Arrays.

DP1(i) denotes min sum possible by a single section of size k using plots 1..i .

DP2(i) denotes min sum possible by a single section of size k using plots i..n .

Loop i from 1 to n-1:

Take min of DP1(i)+DP2(i+1) over all i.

EDIT- Sorry, My bad. I did not read the problem carefully.

link

answered 01 Jan '15, 11:29

roxtar123's gravatar image

2★roxtar123
262
accept rate: 0%

edited 01 Jan '15, 15:46

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:

×1,158

question asked: 01 Jan '15, 02:28

question was seen: 1,971 times

last updated: 12 Jan '15, 20:45