In a grid of size by , you are to determine the amount of paths from the square to the square that do not go through blocked off squares only moving to the right or up. .
Input Specification
The first line will contain three integers, , , and .
The next lines will contain two integers and .
Output Specification
On one line, you are to output the number of valid paths through the grid modulo .
Subtasks
Subtask 1 [20%]
Subtask 2 [30%]
Subtask 3 [50%]
Sample Input
4 4 0
Sample Output
20
Comments
This comment is hidden due to too much negative feedback. Show it anyway.
Have you looked at the constraints? They're nowhere near similar
Well you can't solve either, so does it really matter?
Seems to be an easier version of https://codeforces.com/contest/559/problem/C.
Interesting problem though!