GridProblem code: TECH05 |
Your task in this problem is very straightforward. You are given a point in the cartesian plane (m,n) where m>0 and n>0. You start at (0,0) and are allowed to make unit moves along the positive x-axis or the positive y-axis. In other word if you are at a point (x,y) you can move to either (x+1,y) or (x,y+1). Your task is to find out the total number of ways you can reach (m,n) from (0,0) modulus K.
Input
First line contains 'T', the number of testcases. The next 'T' lines contain three space separated integers m,n,K 1<=m,n<=1,000 K<=1,000,000
Output
A single integer denoting the total number of paths mod K.
Example
Input: 1 4 4 Output: 70
| Author: | technovanza10 |
| Date Added: | 12-01-2010 |
| Time Limit: | 4 sec |
| Source Limit: | 50000 Bytes |
| Languages: | C, C99 strict, CLOJ, CPP 4.0.0-8, CPP 4.3.2, F#, GO, JAVA, PERL6, PYTH 3.1.2, TEXT |
Comments

Fetching successful submissions

K is not mentioned in the
K is not mentioned in the sample case.
ya pls check the judge data
ya pls check the judge data and recorrect the prob statement
How many cases are there?
How many cases are there?
Another sample case: Sample
Another sample case:
Sample Input:
1
896 547 916661
Sample Output
179742
Number of test cases, T <= 50
Number of test cases, T <= 50
New test data for this
New test data for this problem has been uploaded. Please try submitting your solutions again.
algoCrack, Technovanza10 I
algoCrack, Technovanza10
I didnt register on codechef as algoCrack_{teamname} but have register on ur site as {teamname} , can i do some now now , if yes please tell me.....
...........
i'm having 3rd place in ur contest handle vish