传送门 又是个模拟水题,考虑边界就好,连long long都不用开. ——代码 #include <cstdio> #include <iostream> int n, d, ans, max; ][]; inline int read() { , f = ; char ch = getchar(); ; ) + (x << ) + ch - '; return x * f; } int main() { int i, j, x, y, sum; d = read();…
https://www.luogu.org/problemnew/show/P2038 二维前缀和 #include <iostream> #include <cstdio> using namespace std; ; ; int A[N][N]; int d, T; #define gc getchar() inline int read() { ; char c = gc; ') c = gc; + c - ', c = gc; return x; } int main()…