P2917 [USACO08NOV] Toys G
题目描述
Bessie's birthday is coming up, and she wishes to celebrate for the next D (1
输入格式
无
输出格式
无
说明/提示
Bessie wishes to party for 4 days, and requires 8 toys the first day, 2 toys the second, 1 toy the third, and 6 toys on the fourth day. The first disinfectant service takes 1 day and charges $2, and the second takes 2 days and charges $1. Buying a new toy costs $3.
Day 1 Purchase 8 toys in the morning for $24; party in the
afternoon. Take 2 toys to the fast cleaner (overnight) and
the other 6 toys to the slow cleaner (two nights).
Day 2 Pick up the two toys at the fast cleaner; pay $4. Party in the afternoon. Take 1 toy to the slow cleaner.
Day 3 Pick up 6 toys from the slow cleaner and pay $6. Party in the afternoon.
Day 4 Pick up the final remaining toy from the slow cleaner
(bringing the number of toys onsite back to 6); pay $1. Party hearty with the realization that a minimum amount of money was spent.