# Probability Of Knight In The Chessboard

#### Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

`1. You are given a N*N chessboard and the starting position of the knight in the chessboard.2. The rows and columns are 0 indexed, so the top-left square is (0, 0), and the bottom-right square is (N-1, N-1).3. You have to find the probability of knight to remain in the chessboard after exactly k number of moves.Note -> The knight continues moving until it has made exactly K moves or has moved off the chessboard.`
Input Format
`A number NA number KTwo numbers r and c(starting row and column position of knight in the chessboard).`
Output Format
`Check the sample output and question video.`
Question Video
Constraints
`1 <= N <= 250 <= K <= 1000 <= r,c <= N-1`
Sample Input
`3200`
Sample Output
`0.0625`

• Related Topics

Run

Run
Id Name