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

×

F. Consecutive Subsequence - Help

I am getting WA verdict on this problem and am unable to figure out why. It would be great if anyone can help me find that.
Here's a link to my solution : Link
Thanks :)

asked 12 May, 19:16

dishant_18's gravatar image

5★dishant_18
61419
accept rate: 12%


I think you are compressing values in a wrong way. Suppose array A[]={2,6,9,10}. So you are mapping these non consecutive values to consecutive values as {1,2,3,4} which will give wrong answer.

link

answered 12 May, 21:24

lakh's gravatar image

4★lakh
1395
accept rate: 23%

Yeah thank you..
Nice catch ;)

(12 May, 22:04) dishant_185★
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,952
×623

question asked: 12 May, 19:16

question was seen: 199 times

last updated: 12 May, 22:04