text: if right adjacent is having higher marks add one in dp of left adjacent and assign to right one
code: else if ( marks [ i ] < marks [ i + 1 ] ) [ i + 1 ] = dp [ i ] + 1 ; } long = 0 ; for ( int i = 0 ; < n ; ++ ) += dp [ i ] ; return ; }