If there is no subarray with sum equal to tar
if ( maxi == - 1 ) cout << - 1 ; else { for ( i = 0 ; i <= left ; i ++ ) document . write ( A [ i ] + ' ' ) ; for ( i = 0 ; i < right ; i ++ ) document . write ( A [ N - i - 1 ] + ' ' ) ; } }