For this Question: Jenny was walking along the beach on a Sunday evening. She started from a point 0 and wants to reach a point N. What is the probability that she reaches exactly on point N, if she can only take 2 steps or 3 steps? Probability for step length 2 is P and probability for step length 3 is 1 – P.The first line of the input contains n and p.

<b>Constraints</b>
1<= n <= 1e5
0 <= p <= 1Print the final probability upto 2 decimal places.Sample Input 
5 0.2

Sample Output 
0.32, I have written this Solution Code: /**
 *      Author : tourist1256
 *      Time   : 2022-02-18 00:02:21
 **/

#include <bits/stdc++.h>

using namespace std;

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 2351
#endif

float find_prob(int N, float P) {
    double dp[N + 1];
    dp[0] = 1;
    dp[1] = 0;
    dp[2] = P;
    dp[3] = 1 - P;
    for (int i = 4; i <= N; ++i)
        dp[i] = (P)*dp[i - 2] + (1 - P) * dp[i - 3];

    return dp[N];
}

int main() {
    int N;
    float p;
    cin >> N >> p;
    printf("%0.2f", find_prob(N, p));
    return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?