Entries from 2016-03-04 to 1 day
PEG Judge - IOI '03 Practice Task - Balancing Act The idea of a tree center, is a node in the tree that would minimize the maximum subtree size after it is removed. Carefully simulating it without recomputing will do alright. O( n ). #incl…
Problem - D - Codeforces If a bound is set, i.e. to construct a way to buy k gadgets before some day x, we have an obvious greedy strategy where we will choose the cheapest currency days for both currency, then we will enumerate the number…