C ++ implementation of the approach
#include <bits/stdc++.h> NEW_LINE using namespace std ; #define mod  1000000007 NEW_LINE #define RUNMAX  300 NEW_LINE #define BALLMAX  50 NEW_LINE #define WICKETMAX  10