根据:https://www.luogu.com.cn/article/ka1mlyat
补充:题解考虑的是浪费的量,用总量减去即为答案.
https://www.luogu.com.cn/record/174150968