Indian Computing Olympiad

Training Material


Dynamic programming on trees→Coffee Shop (APIO Shortlist 2007)

Given some stations arranged in a tree-like network, we want to place coffee shops at some stations so that no station is more than K hops away from a coffee shop.

Solution