All Submissions


* Random Heaps

A list is filled with N random and distinct Integers. Find the number of ways
in which a min-heap can be created for the list. Since the answer can be huge,
you need to output the answer modulo 10^9+7.


* Input Format
The first line of input denotes the number of test cases T. Each subsequent line
denotes a test case with integer N.

* Output Format
For each Test Case, output the number of ways in which a min-heap can be
created for the given N modulo 10^9+7

* Constraints
1<=T<=10000
0<=N<=100000


* Sample Input

2
0
3


* Sample Output

1
2

Problem Setter : Nimesh Ghelani

Languages: Brain,C,C++,Java,Pascal,Perl,PHP,Python,Ruby,Text

Time Limit: 1 Second(s)
Score: 0 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0