title: Highway Billboard Problem
signature: function highway_billboard_problem(m, x, revenue, n, t)
source_py: def highway_billboard_problem(m, x, revenue, n, t):
      maxRev = ([0] * (m + 1))
      nxtbb = 0
      for i in range(1, (m + 1)):
          if (nxtbb < n):
              if (x[nxtbb] != i):
                  maxRev[i] = maxRev[(i - 1)]
              else:
                  if (i <= t):
                      maxRev[i] = max(maxRev[(i - 1)], revenue[nxtbb])
                  else:
                      maxRev[i] = max((maxRev[((i - t) - 1)] + revenue[nxtbb]), maxRev[(i - 1)])
                  nxtbb += 1
          else:
              maxRev[i] = maxRev[(i - 1)]
      return maxRev[m]
source_cpp: int highway_billboard_problem(int m, vector<int> x, vector<int> revenue, int n, int t) {
    int maxRev [ m + 1 ];
    memset ( maxRev, 0, sizeof ( maxRev ) );
    int nxtbb = 0;
    for ( int i = 1;
    i <= m;
    i ++ ) {
      if ( nxtbb < n ) {
        if ( x [ nxtbb ] != i ) maxRev [ i ] = maxRev [ i - 1 ];
        else {
          if ( i <= t ) maxRev [ i ] = max ( maxRev [ i - 1 ], revenue [ nxtbb ] );
          else maxRev [ i ] = max ( maxRev [ i - t - 1 ] + revenue [ nxtbb ], maxRev [ i - 1 ] );
          nxtbb ++;
        }
      }
      else maxRev [ i ] = maxRev [ i - 1 ];
    }
    return maxRev [ m ];
  }