码迷,mamicode.com
首页 > 其他好文 > 详细

hdu 5976 Detachment

时间:2017-05-02 10:08:59      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:assign   was   java   assigned   dimens   php   view   input   sig   

Detachment

Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 902    Accepted Submission(s): 260


Problem Description
In a highly developed alien society, the habitats are almost infinite dimensional space.
In the history of this planet,there is an old puzzle.
You have a line segment with x units’ length representing one dimension.The line segment can be split into a number of small line segments: a1,a2, … (x= a1+a2+…) assigned to different dimensions. And then, the multidimensional space has been established. Now there are two requirements for this space: 
1.Two different small line segments cannot be equal ( aiaj when i≠j).
2.Make this multidimensional space size s as large as possible (s= a1a2*...).Note that it allows to keep one dimension.That‘s to say, the number of ai can be only one.
Now can you solve this question and find the maximum size of the space?(For the final number is too large,your answer will be modulo 10^9+7)
 

 

Input
The first line is an integer T,meaning the number of test cases.
Then T lines follow. Each line contains one integer x.
1≤T≤10^6, 1≤x≤10^9
 

 

Output
Maximum s you can get modulo 10^9+7. Note that we wants to be greatest product before modulo 10^9+7.
 

 

Sample Input
1 4
 

 

Sample Output
4
 

 

Source
 

 

Recommend
 
 
 

hdu 5976 Detachment

标签:assign   was   java   assigned   dimens   php   view   input   sig   

原文地址:http://www.cnblogs.com/bofengyu/p/6794500.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!