一道比较水的二维树状数组,开100个即可,只有100种颜色还是比较EZ的. Program BZOJ1452; ; maxc=; ..maxn,..maxn,..maxc] of longint; f:..maxn,..maxn] of longint; m,n,i,j,x,y,x1,y1,x2,y2,z,Q,ch,sum:longint; procedure add(i,j,c,k:longint); var x,y:longint; begin x:=i; while x<=m do beg…