Subscribed unsubscribe Subscribe Subscribe

0w1

Imosu

SRM 687 Med. Quacking ( Greedy + Imosu )

TopCoder Arena Greedily gather each quack from the left as earlier as possible. Suppose a quack found in that way is in some interval [ s, t ], than we are to find the count of the position with maximum quacks lying on. We could simply add…

ABC 17 C - ハイスコア ( Imosu or Segment Tree )

C: ハイスコア - AtCoder Beginner Contest 017 | AtCoder Basically we would like to find the element that is covered with the least cost. It is intuitive to use segment tree, but actually we could use imosu algorithm to maintain the differen…

ABC 14 C - AtColor ( Imosu + Discretization )

C: AtColor - AtCoder Beginner Contest 014 | AtCoder Problem Statement: Given n ranges [ a[ i ], b[ i ] ], find the maximum covered count of any point. We can use imosu algorithm, where we maintain the value of difference for two adjacent v…