Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

2
pass the ball coding exercise php
Post Flair (click to view more posts with a particular flair)
Post Body

rying to solve a coding problem here is the text:

input : the first line of the input consists of 4 space separated integers - N (denoting the number of players), M (denoting the number of passes), and X and Y, denoting ThunderCracker's and Munkee's numbers respectively. The next line contains M space separated integers, denoting array A, the power with which passes can be made in the i'th pass (1<= i <= M)

Output: A single integer, that is the number of ways in which the ball can be passed such that the first pass is made by ThunderCracker, and the ball reaches MunKee after M passes. As answer can be very large, output it modulo 100000007

Constaraints:

2 <= N <= 2000 1 <= M <= 2000 1 <= Ai <= 1000 1 <= X, Y <= N

It guaranted that X and Y are distinct integers

can someone give me a hint?

Author
Account Strength
80%
Account Age
6 years
Verified Email
Yes
Verified Flair
No
Total Karma
251
Link Karma
97
Comment Karma
154
Profile updated: 5 days ago
Posts updated: 3 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago