WAYS - PATHS
Consider a square matrix of order m (m+1 rows and m+1 columns). At each step you can move one step to the right or one step to the top. How many possibilities are to reach (m, m) from (0, 0)?
Input
The first line consists of an integer t, the number of test cases. Each test case consists of a single integer m, the order of square matrix.
Output
For each case print the number of possibilities of reaching the point (m, m) from (0, 0)
Constraints
1 ≤ t ≤ 10
1 ≤ m ≤ 14
Example
Sample Input: 3 1 2 3 Sample Output: 2 6 20
Explanation of Test Cases 1 and 2
See Also : WAYS (No source limit)
hide comments
|
(Tjandra Satria Gunawan)(曾毅昆):
2012-10-28 02:06:11
stuck at 134B :( can't reduce my code...
|
|
Aditya Pande:
2012-10-28 02:06:11
moreover in c i wud have to write return 0; else i would get nzec error
|
|
Aditya Pande:
2012-10-28 02:06:11
thanks
|
|
:D:
2012-10-28 02:06:11
The limit is tight but possible. Use C and you won't have to include anything. |
|
Aditya Pande:
2012-10-28 02:06:11
got it finally Last edit: 2013-01-08 19:14:41 |
|
cegprakash:
2012-10-28 02:06:11
79!! great |
|
teamjoseph1:
2012-10-28 02:06:11
How do you check the number of characters in the Source? Do u manually count the characters? |
|
albertg:
2012-10-28 02:06:11
Why we can't write on Pascal??? |
|
apple:
2012-10-28 02:06:11
I've just rewritten the record to 81 characters in C :)
|
|
neophilic:
2012-10-28 02:06:11
Why is python not included? |
Added by: | cegprakash |
Date: | 2011-03-06 |
Time limit: | 0.100s |
Source limit: | 120B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | C C++ 4.3.2 CPP JAVA |