Wooden Toy Festival - CodeForces Round 878 Problem D solution WITH CODE

Click a thumbnail to watch in a lightweight modal. (No downloads — view only.)