comefrom: <gouthampradhan>array_SubArraysWithBoundedMaximum_1.java
code: public int numSubarrayBoundedMax(int[] A, int L, int R) {
      int[] DP = new int[A.length];
      int v = -1;
      for (int i = A.length - 1; i >= 0; i--) {
        if (A[i] >= L && A[i] <= R) {
          if (v != -1) {
            DP[i] = v - i + 1;
          } else {
            DP[i] = 1;
            v = i;
          }
        } else if (A[i] < L) {
          if (v == -1) {
            v = i;
          }
          if (i + 1 < A.length) {
            if (A[i + 1] < L || (A[i + 1] >= L && A[i + 1] <= R)) {
              DP[i] = DP[i + 1];
            } else {
              DP[i] = 0;
            }
          }
        } else {
          v = -1;
        }
      }
      int sum = 0;
      for (int i = 0; i < DP.length; i++) {
        sum += DP[i];
      }
      return sum;
    }
masked: public int sample_funcname ( int [ ] var_0 , int var_1 , int var_2 ) {
    int [ ] var_3 = new int [ var_0 . length ] ;
    int var_4 = - 1 ;
    for ( int var_5 = var_0 . length - 1 ;
    var_5 >= 0 ;
    var_5 -- ) {
      if ( var_0 [ var_5 ] >= var_1 && var_0 [ var_5 ] <= var_2 ) {
        if ( var_4 != - 1 ) {
          var_3 [ var_5 ] = var_4 - var_5 + 1 ;
        }
        else {
          var_3 [ var_5 ] = 1 ;
          var_4 = var_5 ;
        }
      }
      else if ( var_0 [ var_5 ] < var_1 ) {
        if ( var_4 == - 1 ) {
          var_4 = var_5 ;
        }
        if ( var_5 + 1 < var_0 . length ) {
          if ( var_0 [ var_5 + 1 ] < var_1 || ( var_0 [ var_5 + 1 ] >= var_1 && var_0 [ var_5 + 1 ] <= var_2 ) ) {
            var_3 [ var_5 ] = var_3 [ var_5 + 1 ] ;
          }
          else {
            var_3 [ var_5 ] = 0 ;
          }
        }
      }
      else {
        var_4 = - 1 ;
      }
    }
    int var_6 = 0 ;
    for ( int var_5 = 0 ;
    var_5 < var_3 . length ;
    var_5 ++ ) {
      var_6 += var_3 [ var_5 ] ;
    }
    return var_6 ;
  }
  