DCP-61: Drive In Grid Back to All Problems

Easy Math > Combinations and Permutations


In a city like New York, the roads are arrange in grid like pattern. Roads are also arranged in one way direction and you can only move right or down and never left or up. One such travel from point A to point B can be illustrated in the following picture: ![enter image description here][1] So we can see it took 11 steps to reach from point A to point B. However in our problem today, we will like to find out in how many ways we can reach from point A to point B. Input: ------ Input starts with an integer **T (1<= T <=100)**, denoting the number of test cases. Each case contains two integers **X (3 ≤ X ≤ 15)** and **Y (3 ≤ Y ≤ 15)** denoting the width and height of the grid. Output: ------- For each case of input, output the one integer **R** in a line, denoting the result - number of possible ways to reach B from A, where A is topmost and leftmost point in the grid and B is the bottom most and rightmost point in the grid. Sample Input ------------ 2 6 5 4 4 Sample Output ------------- 462 70 [1]: https://s3-ap-southeast-1.amazonaws.com/devskillimagestorage/questionimages/47ee783a-b6f1-c245-8448-08d34fbf5585_ee68b0c85e324c16b64640496b141deb_W351xH293.png


Problem Setter:

MD. Jalal Uddin

Please login to submit solution to this problem.

Problem Limits

Language Time Limit (seconds)
C/C++ 1.00
Java 2.00
C# 2.00
PHP 2.00

Problem Stats

42/77

Solve/Submission

Ranking

# User Language Timing
01 ash12 Cpp 0.00s
02 mahrahat Cpp 0.00s
03 seyedssz Cpp 0.00s
04 sadia2427 Cpp 0.00s
05 7Mahfuz Cpp 0.00s
06 rayhan50001 Cpp 0.01s
07 haasib Cpp 0.07s
08 Ishrak Cpp 0.08s
09 jahirtheboss Cpp 0.09s
10 ImagineWarrior Cpp 0.21s
11 bhagyo Cpp 0.33s
12 mamun4122 Cpp 0.36s
13 rajdipsaha Cpp 0.39s
14 njrafi Cpp 0.39s
15 sahedsohel Cpp 0.47s
16 rofi93 Cpp 0.48s
17 ssavi Cpp 0.48s
18 arsho Cpp 0.48s
19 Mahmudul_Tushar Cpp 0.48s
20 anowar1112 Cpp 0.48s
21 murad_al_wajed Cpp 0.49s
22 faisalxn Cpp 0.49s
23 fsshakkhor Cpp 0.49s
24 sayedgkm Cpp 0.49s
25 darkprinx Cpp 0.49s
26 Ihtiaz Cpp 0.49s
27 rafsan_rana Cpp 0.49s
28 habib_rahman Cpp 0.49s
29 math10 Cpp 0.50s
30 rony_ghost Cpp 0.50s
31 codehead Cpp 0.50s
32 smjlord068 Cpp 0.50s
33 shivazi Cpp 0.52s
34 ProKawsar Cpp 0.56s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support