Sichuan University Programming Contest 2017 Final Warmup

D: windy's cake I