Bear and Bowling 4 这也能斜率优化... max[ i ] = a[ i ] - a[ j ] - j * (sum[ i ] - sum[ j ])然后就能斜率优化啦, 我咋没想到, 我好菜啊. 斜率优化最重要的是转换成前缀形式, 我TM又忘了. #include<bits/stdc++.h> #define LL long long #define fi first #define se second #define mk make_pair #define PLL pa…