static void solve ( List < Double > keep , double [ ] ps , int K , int index ) {
  if ( index == ps . length ) {
    if ( keep . size ( ) == K ) check ( keep , K ) ;
    return ;
  }
  solve ( keep , ps , K , index + 1 ) ;
  keep . add ( ps [ index ] ) ;
  solve ( keep , ps , K , index + 1 ) ;
  keep . remove ( keep . size ( ) - 1 ) ;
}

static void solve ( List < Double > keep , double [ ] ps , int K , int index ) { if ( index == ps . length ) { if ( keep . size ( ) == K ) check ( keep , K ) ; return ; } solve ( keep , ps , K , index + 1 ) ; keep . add ( ps [ index ] ) ; solve ( keep , ps , K , index + 1 ) ; keep . remove ( keep . size ( ) - 1 ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (generic_type (type_identifier) (type_arguments (type_identifier))) name: (identifier)) (formal_parameter type: (array_type element: (floating_point_type) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (field_access object: (identifier) field: (identifier)))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (identifier))) consequence: (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))) (return_statement))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier))))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)))))))