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

建议使用的浏览器:

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

4663:Plane Partition

题目描述
A plane partition is a two-dimensional array of nonnegative integers ai,j (0<=i<n, 0<=j<m) that satisfies
1. 0<=ai,j<=p
2. ai,j>=ai,j+1
3. ai,j>=ai+1,j

In this problem, we add some additional constrains in the following form:
Given x, y, z, there exists some integer k (may be negative) such that ax+k,y+k=z+k.

Note: For i and j do not satisfy 0<=i<n and 0<=j<m, ai,j does not exist.

Count how many valid plane partitions are there.
输入解释
First line, number of test cases, T.
Following are T test cases. For each test case, the first line contains four integers, n, m, p, t, where the last one is the number of additional constraints.
Following are t lines, each line contains three integers, x, y, z.

T<=200
1<=n,m,p<=7
0<=x,y,z<=7
It's possible that there is no valid plane partitions.
输出解释
T lines. Each line is answer to the corresponding test case.
输入样例
2
1 1 1 0
1 1 1 1
1 1 1
输出样例
2
1
来自杭电HDUOJ的附加信息
Recommend zhuyuanchen520

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-4663

最后修改于 2020-10-25T23:15:36+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)