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 1.00
C++ 1.00
C++14 1.00
C# 2.00
Go 2.00
Java 2.00
JavaScript 2.00
Objective-C 2.00
Perl 2.00
PHP 2.00
Python 2.00
Python3 2.00
Ruby 2.00
VB.Net 2.00

Problem Stats

58/100

Solve/Submission

Ranking

# User Language Timing
01 nasir_32_15 Cpp14 0.00s
02 ash12 Cpp14 0.00s
03 MAHRahat Cpp14 0.00s
04 7Mahfuz Cpp14 0.00s
05 feodorv C 0.00s
06 seyedssz Cpp14 0.00s
07 sadia2427 Cpp14 0.00s
08 pulak_ict_mbstu Cpp 0.00s
09 Dragon_162 Cpp14 0.00s
10 smriad Cpp14 0.00s
11 Bruteforcekid Cpp 0.00s
12 Morass Cpp14 0.00s
13 nazmul_bzs Cpp14 0.00s
14 lightlessShadO Cpp14 0.01s
15 mahbub07 Cpp14 0.01s
16 rayhan50001 Cpp14 0.01s
17 emrul Cpp14 0.01s
18 joy25896 Cpp14 0.03s
19 haasib Cpp14 0.07s
20 Ishrak Cpp14 0.08s
21 jahirtheboss Cpp14 0.09s
22 RandyWaterhouse Python3 0.15s
23 ImagineWarrior Cpp14 0.21s
24 bhagyo Cpp14 0.33s
25 mamun4122 Cpp14 0.36s
26 rajdipsaha Cpp14 0.39s
27 njrafi Cpp14 0.39s
28 sahedsohel Cpp14 0.47s
29 arsho Cpp14 0.48s
30 anowar1112 Cpp14 0.48s
31 ssavi Cpp14 0.48s
32 rofi93 Cpp14 0.48s
33 Mahmudul_Tushar Cpp14 0.48s
34 murad_al_wajed Cpp14 0.49s
35 sayedgkm Cpp14 0.49s
36 Ihtiaz Cpp14 0.49s
37 fsshakkhor Cpp14 0.49s
38 darkprinx Cpp14 0.49s
39 rafsan_rana Cpp14 0.49s
40 faisalxn Cpp14 0.49s
41 habib_rahman Cpp14 0.49s
42 rony_ghost Cpp14 0.50s
43 math10 Cpp14 0.50s
44 smjlord068 Cpp14 0.50s
45 codehead Cpp14 0.50s
46 shivazi Cpp14 0.52s
47 ProKawsar Cpp14 0.56s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support