C ++ program to check if any valid sequence is divisible by M
#include <bits/stdc++.h> NEW_LINE using namespace std ; const int MAX = 1000 ; bool isPossible ( int n , int index , int sum , int M , int arr [ ] , int dp [ ] [ MAX ] ) {