{"trustable":true,"sections":[{"title":"题目描述","value":{"format":"MD","content":"这是一道模板题。\r\n\r\n给定一个大小为 $N \\times M$ 的零矩阵,直到输入文件结束,你需要进行若干个操作,操作有两类:\r\n\r\n - `1 a b c d x`,表示将左上角为 $(a,b)$,右下角为 $(c,d)$ 的子矩阵全部加上 $x$;\r\n\r\n - `2 a b c d`,表示询问左上角为 $(a,b)$,右下角为 $(c,d)$ 为顶点的子矩阵的所有数字之和。"}},{"title":"输入格式","value":{"format":"MD","content":"第一行两个正整数 ,其中 $n,m$ 分别表示矩阵的行数与列数。\r\n\r\n接下来若干行直到文件结束,均代表你需要进行的操作。"}},{"title":"输出格式","value":{"format":"MD","content":"对于每个 `2` 操作,输出一行代表查询的结果。"}},{"title":"样例","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4 4\n1 1 1 3 3 2\n1 2 2 4 4 1\n2 2 2 3 3\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e12\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"数据范围与提示","value":{"format":"MD","content":"对于 $10\\%$ 的数据,$1 \\le n,m \\le 16$,操作不超过 $200$ 个; \r\n对于 $60\\%$ 的数据,$1 \\le n,m \\le 512$; \r\n对于 $100\\%$ 的数据,$1 \\le n,m \\le 2048,\\lvert x \\rvert \\le 500$,操作不超过 $2\\times 10^5$ 个,保证运算过程中及最终结果均不超过 $64$ 位带符号整数类型的表示范围,并且修改与查询的子矩阵存在。"}}]}