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

×

Help in codeforces Problem C-Destroying Array

I am not able to solve this problem. I tried to understand the editorial. I didn't understand how can we use stl set to find the nearest to the left and to the right destroyed number.

Also, if there is another approach please explain to me.

Problem Link
Editorial

asked 13 Feb, 21:34

adzo261's gravatar image

4★adzo261
2898
accept rate: 37%

edited 13 Feb, 21:36

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,738
×688
×49

question asked: 13 Feb, 21:34

question was seen: 60 times

last updated: 13 Feb, 21:36