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

建议使用的浏览器:

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

4304:Let's Hit Our Head!

题目描述
Kingdom LHOH is celebrating its annual carnival again!This time another crazy game is now on show.N*N piles of brick here lying on the ground in a straight line, and N brave fellows have attended.
First they should each choose a distinct piles brick to stand behind, forming a line parrelling to the brick, and facing the same side, watching at his piles of brick.
Then their captain can yelled out 3 commands, described below:
A "LEFT!" Every one should move so that he is behind the left piles of the original one.
B "RIGHT!" Every one should move so that he is behind the right piles of the original one.
C "HIT!" Every one should break all the piles of brick before him with only his head slamming them.

A little constraints are showed below:
In every step, when command A or B have been yelled out, no one should move outside, that is, for everyone after his moving, brick(even breaked up) is there before him,and when command C is to be yelled out, intact piles of brick must be there before every one, so that he cannot slamming brick that it already breaked up, and only that is fair to everyone.
Not until all piles of brick have been successfully breaked up with the brave fellows' heads, this game is successfully finished.
Now the question is,the crazy captain wants to know how many initial options are there,satisfying for each initial option he always chooses the first piles, other members choose their own distinct ones,and the game can be finished successfully at the same time?
We assume the other members except the captain cannot be told out.
输入解释
First there's an integer T(T<=15000) indicating the scenary numbers.
Then there's T lines represented for the scenaries, with an integer N(1<=N<=10^12) in each line.
输出解释
For each datus, you should output one integer in a line represented the answer for the scenary with N brave fellows and N*N piles of brick.And that's all.
输入样例
10
1
2
3
4
8
16
6469693228
6469693229
6469693230
1024
输出样例
1
2
2
6
20
70
84
14
8787513806478134
184756
来自杭电HDUOJ的附加信息
Author BUPT
Recommend zhuyuanchen520

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

源链接: HDU-4304

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

共提交 0

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