0w1

Entries from 2016-08-16 to 1 day

CFR Educational 6 E. New Year Tree ( Timestamp + Segment Tree + bits )

Problem - E - Codeforces It's instinctive to come up with timestamp and segment tree. Initially I thought it would be fine with sets to maintain the set of colours, but now it seems like it wouldn't work. Maybe it's because my segment tree…

CFR Educational 6 D. Professor GukiZ and Two Arrays ( lower_bound )

Problem - D - Codeforces We can simply brute force for 0 and 1 swap, so let's think about 2 swaps. When 2 swaps are committed, and given that asum is the sum for all elements in a, same for bsum, swapping ( i, j ) in A with ( x, y ) in B, …