Function to return the number of subsequences which have at least one consecutive pair with difference less than or equal to 1
int count_required_sequence ( int n , int arr [ ] ) { int total_required_subsequence = 0 ; int total_n_required_subsequence = 0 ; int dp [ N ] [ 2 ] ; for ( int i = 0 ; i < n ; i ++ ) {