×

# F. Consecutive Subsequence - Help

 0 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 614●1●9 accept rate: 12%

 1 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 3★lakh 139●5 accept rate: 23% Yeah thank you.. Nice catch ;) (12 May '18, 22:04)
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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,165
×671

question asked: 12 May '18, 19:16

question was seen: 248 times

last updated: 12 May '18, 22:04