Divide_By_0's blog

By Divide_By_0, history, 8 years ago, In English

I know there are many segtree problems on cf, but is there a collection of segtree problems that have much more brief solutions using C++'s standard set? Even one or two would be great, and they don't have to be from CF but should have a place with a solution/editorial.

One great example is USACO 2015 Dec. — High Card Low Card (Problem), whose solution uses segtrees but has a much more brief solution with sets. (Solution)

  • Vote: I like it
  • +14
  • Vote: I do not like it

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

A deleted comment suggested problem: 558E — A Simple Task

Another problem I found: 343D — Water Tree

»
8 years ago, # |
  Vote: I like it +5 Vote: I do not like it

You can check my task Easy School from HourRank 1.

I solved it with some multisets, and tester solution has one Segment Tree. Also you can check other submissons, red guys solved it better than me :)

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Nice handle btw