×

 0 Hi fellas. I am having tough time understanding the solution to this problem. It has a editorial. Although from editorial approach is quite clear, but when I try to read the code of the author, I don't quite understand it. Points I specifically don't understand in the authors solution are following: How is the segment tree being constructed. What is the purpose of the "Root" array. And in the "rect" function, why "res" is chosen that way. I mean like upper_bound function of C++. Other quite good/readable solution, I found was of the user @deneo, here, he also did the same thing. Please help me!!! Thnx asked 05 Jan '15, 01:14 3★paramvi 16●5 accept rate: 0% This question can violate the rules of ongoing contest. Hence, we cannot help you. But try doing some hand-work, and construct the segment tree and apply the approach. You'll get it else you'll have to wait till the contest ends. :) (05 Jan '15, 18:49) damn_me3★ I get it. yea sure, I guess I have to try bit harder. (05 Jan '15, 20:54) paramvi3★
 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:

×1,726
×1,023
×51

question asked: 05 Jan '15, 01:14

question was seen: 1,065 times

last updated: 05 Jan '15, 20:54