摘要:
HDU 4819Mosaic题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4819题意:给定一个n*n的矩阵,每次给定一个子矩阵区域(x,y,l),求出该区域内的最大值(A)和最小值(B),输出(A+B)/2,并用这个值更新矩阵[x,y]的值思路:裸的二维线段树,用树套树实现# include# include# includeusing namespace std;# define lson l,m,rt>1; BuildY(xrt,x,lson); BuildY(xrt,x,rson); PushUp(xrt,rt);}vo...
阅读全文