lis and lds,get max_sum