WAYS - PATHS

Problem Statement:

Consider a square matrix of order m(m rows and m 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 testcases.  Each testcase 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)

 

Input Constraints:

1<=t<=10

1<=m<=14

 

Example:

Sample Input:

3

1

2

3

Sample Output:

2

6

20

 

Explanation of test case #2:

There are 6 possible ways of reaching (2,2) from (0,0)

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
2014-01-02 11:14:52 New_Bullet
Use C :) No headers! :P
2013-12-28 15:09:58 Prakhar Gupta


Last edit: 2014-01-01 19:38:03
2013-07-09 19:26:45 Aman Arora
Finally !!! @120B
edit : 119B ;)

Last edit: 2013-07-09 19:31:04
2013-07-05 12:45:00 prudhvi
119 :)
2013-01-19 21:27:49 Man Mohan Mishra
tried everything ......
and finally , just made it :)
2013-01-15 17:18:34 Ankur Rastogi
TLE :(

Any hint pls..

Last edit: 2013-01-15 18:10:41
2013-01-08 19:14:16 Aditya Pande
don't post any code here....
2012-12-28 14:05:32 Vcell
@Tjandra Sir : is there any way to minimise this step --> int t,m;scanf("%d",&t);while(t--){scanf("%d",&m);
2012-10-28 02:06:11 Navneet Yadav
123.. :(
2012-10-28 02:06:11 sadboy
125 :( :( :( god help me..
edit: 118 ac

Last edit: 2012-07-10 02:44:43
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.