RT,为什么我这么写前缀和会错? #include<bits/stdc++.h> using namespace std; int a[5010][5010]; int s[5010][5010]; bool b[5010]; template<typename T>void qin(T &x) { x=0;bool f=0; char ch=getchar(); while(!isdigit(ch)&&ch!='-') ch=getchar(); if(ch=='-') ch=getchar(),f=1; while(isdigit(ch)) ...