You are not logged in. Please login at 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 '18, 19:16

dishant_18's gravatar image

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.


answered 12 May '18, 21:24

lakh's gravatar image

accept rate: 23%

Yeah thank you..
Nice catch ;)

(12 May '18, 22:04) dishant_185★
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 12 May '18, 19:16

question was seen: 248 times

last updated: 12 May '18, 22:04