solve koi_max
solve minmax