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

×

codeforces educational round

could anyone suggest a simpler stategy for solving the problem:http://codeforces.com/contest/863/problem/B

asked 21 Sep '17, 23:22

viralivora's gravatar image

3★viralivora
1838
accept rate: 14%


Just brute-force it, since $N$ is very small. ($N<= 50$)

link

answered 21 Sep '17, 23:50

bazsi700's gravatar image

6★bazsi700
3758
accept rate: 7%

You can use 2D DP and Sorting.

Here is link to my solution.

At any point, you can choose to find the difference between adjacent numbers or you can leave it.You must remember that you can leave atmost 2 numbers.

link

answered 22 Sep '17, 11:35

anushi's gravatar image

5★anushi
24617
accept rate: 16%

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,221
×519
×243

question asked: 21 Sep '17, 23:22

question was seen: 301 times

last updated: 22 Sep '17, 11:35