text: Check if can cut horizontally at r1 , at least one apple in matrix ( r , c ) -> r1 , C - 1
code: if ( preSum [ r ] - preSum [ r1 ] > 0 ) dp [ k ] [ r ] += dp [ k - 1 ] [ r1 ] ; } for ( int c1 = c + 1 ; c1 < C ; c1 ++ ) {