0

is this a Segment Tree?

 6 months ago
source link: https://codeforces.com/blog/entry/126316
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Hello Codeforces

could I solve this problem using a segment tree?

in each treextreex I have saved {element, max_quantity}

get(l,r)=get(l,r)= the maximum number of all cl,cl+1,...,cr−1,crcl,cl+1,...,cr−1,cr

and I checked if get(l,r)get(l,r) > (r−l+1)/2(r−l+1)/2 then answer is NO else YES.

if I say the wrong solution, can someone explain it to me.

thank you


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK