图: https://www.luogu.me/article/bt2610af 贪心: https://www.luogu.me/article/r2l77v62 前缀和与差分: https://www.luogu.me/article/28bsi7sj