当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

BZOJ3840:ZCC Loves COT

题目描述
After solves all problem of the series COT(count on a tree), ZCC feels bored and came up with a new COT problem, where letter T stands of Tetrahedron.
In this problem, Tetrahedron is define as a set of point:
T(n) = {(x, y, z) | 1≤z≤y≤x≤n}
Imagine T(n) is divided into n layers, the k-th layer contains k rows, of which the l-th row contains l points.
Moreover, we define sub-Tetrahedron a set of point, too:
sT(x, y, z, a) = {(x+i, y+j, z+k) | 0≤k≤j≤i<a}
First of all, you are given a Tetrahedron T(N), every point of T(N) has a value of 0.
Then, you should deal with M operation (Mxi, Myi, Mzi, Mai), means you should add 1 to every point’s value if it belongs to sT(Mxi, Myi, Mzi, Mai).
Then, you should deal with Q queries (Qxi, Qyi, Qzi, Qai), you should output the sum of values of points in sT(Qxi, Qyi, Qzi, Qai).

输入解释
First line: three positive integer N, M, Q.(N≤100, M≤100000, Q≤100000)
Then followed M lines, each line contains four integers Mxi, Myi, Mzi, Mai, which describe an operation.
Then followed Q lines, each line contains four integers Qxi, Qyi, Qzi, Qai, which describe a query.

输出解释
For every query, output a line with one integer, the answer to the query. 

输入样例
2 1 2
1 1 1 2
1 1 1 2
2 1 1 1
输出样例
4
1
提示

It is guaranteed, for every sT(x, y, z, a): 1≤z≤y≤x≤x+a-1≤N. 

BZPRO Powered by Remmina.
Github Repository
来自acmore.cc的附加信息
bzoj_id 3840
import_source_sha256 44420e89525e5aa68fd078189026af838ea8c37ef721402fadc6db10568fde3a
bzoj_checker_pending False

该题目包含在题集 大视野(八中)OJ 中

题目来源 BZOJ 3840

源链接: LOCAL-BZOJ3840

共提交 0 次

通过率 --%
时间上限 内存上限
1000 MS 256 MB