0w1

Entries from 2016-08-08 to 1 day

CFR 705 C. Thor ( Ad hoc )

Problem - C - Codeforces Use set to manage all unread notifications, with amortized complexity, we know that it will be alright because each element will only be inserted and deleted at most once. And actually set was not needed. void solv…

CFR 701 E. Connecting Universities ( Graph )

Problem - E - Codeforces Consider rooting the tree with 1 as root. DFS down, and observe each edge, the number of towns that are below the edge, and above the edge ( 2 * K - below_edge_cnt ). We will know that the maximum number of pairs s…