解题思路 二维前缀和,模板题。 注意起始下标是0,边缘的不算,就能A了,就把价值算在下一个位置就行了 #include <bits/stdc++.h> #pragma GCC optimize(2) #pragma GCC optimize(3) using namespace std; #define js ios::sync_with_stdio(false);cin.tie(0); cout.tie(0) typedef long long ll; const ll MOD = 1e9 + 7; inline ll read() { ll s = 0, w = 1; char...