Submit | All submissions | Best solutions | Back to list |
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)
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 |
hide comments
|
|||||||
2019-06-24 22:47:07
use C brothers, default declaration types |
|||||||
2016-07-24 10:20:34
101B in C... |
|||||||
2016-03-08 15:31:33
How can people can do in just 77B !!! Just somehow reached 107B. |
|||||||
2016-01-20 16:58:22
I was thinking of a DP solution and then found the source limit ..Read some stuff and realized it can be solved using combinatorics.. |
|||||||
2015-07-11 17:30:32 NEO
got every test case right from 1 to 14 ... but still getting WA ,,,. somebody help ...please!! |
|||||||
2015-07-05 21:50:52
Are you mad :( only public class .... public static void main take more than 120B remove JAVA from languages or the 120B Limit. |
|||||||
2014-09-15 07:52:06 Hugo Godoy
Yes!! 107 bytes!! |
|||||||
2014-06-02 11:18:20 BOKAM VINAY KUMAR
yo finally done :) |
|||||||
2014-06-02 08:16:22 RIVU DAS
Finally made it!!! 109B! :) |
|||||||
2014-02-27 20:31:00 Rishav Goyal
din like bit constraint much! |