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

建议使用的浏览器:

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

5837:Robots

题目描述
QXJ has $N$ robots on the plane, the i-th is at $(x_i, y_i)$, numbereded 1 to $N$. Every robot is painted by one kind of color, numbered 1 to $M$.

Each robots can move $K$ times. In one move,a robot at $(x,y)$ can move to $(x-1,y),(x,y+1),(x+1,y),(x,y-1)$.

After exactly $K$ moves, she wants robots with same color to gather at the same postion and the robot on the i-th color gather at different postion with robots on (i-1)-th or (i+1)-th color.

Now she wants to know how many ways of moving these robots following to rules above.

Two ways are different if one of final postions of certain robot is different or there is at least one robot whose moving path is different.
输入解释
The first line is the number of test cases $T (T \leq 10)$.

The first line of each case contains three integer $N(1 \leq N \leq 200), M(1 \leq M \leq 20), K(1 \leq K \leq 500)$, indicating the number of robots ,the number of color and the number of steps robots can move.

The second line,contains $M$ integer $m_i$, indicating the number of robots with the i-th color.

The robots numbered $[1,m1]$ are on the 1st color.The robots numbered $[m1+1,m1+m2]$ are one the 2nd color, ans so on.

The next $N$ line,each contains two integers $x_i, y_i$, indicating the postion of i-th robots..

$(0\leq |x_i, y_i| \leq 250)$.
输出解释
For each test case, output a single line "Case #x: y", where x is the case number, starting from 1. And y is the answer(module $10^9 + 7$).
输入样例
2
3 3 1
1 1 1
1 0 
0 1 
1 2 
4 2 2
2 2
0 1
0 3
0 2
0 4
输出样例
Case #1: 49
Case #2: 256
来自杭电HDUOJ的附加信息
Author UESTC
Recommend wange2014

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

源链接: HDU-5837

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

共提交 0

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