static Vector < Integer > findSubset ( Vector < Integer > temp , int k ) {
  Vector < Integer > ans = new Vector < Integer > ( ) ;
  for ( int i = last ;
  i >= 0 ;
  i -- ) {
    int cnt = 0 ;
    for ( Integer it : temp ) {
      int bit = it & ( 1 << i ) ;
      if ( bit > 0 ) cnt ++ ;
    }
    if ( cnt >= k ) {
      for ( Integer it : temp ) {
        int bit = it & ( 1 << i ) ;
        if ( bit > 0 ) ans . add ( it ) ;
      }
      last = i - 1 ;
      return ans ;
    }
  }
  return ans ;
}

static Vector < Integer > findSubset ( Vector < Integer > temp , int k ) { Vector < Integer > ans = new Vector < Integer > ( ) ; for ( int i = last ; i >= 0 ; i -- ) { int cnt = 0 ; for ( Integer it : temp ) { int bit = it & ( 1 << i ) ; if ( bit > 0 ) cnt ++ ; } if ( cnt >= k ) { for ( Integer it : temp ) { int bit = it & ( 1 << i ) ; if ( bit > 0 ) ans . add ( it ) ; } last = i - 1 ; return ans ; } } return ans ; }
(method_declaration (modifiers) type: (generic_type (type_identifier) (type_arguments (type_identifier))) name: (identifier) parameters: (formal_parameters (formal_parameter type: (generic_type (type_identifier) (type_arguments (type_identifier))) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (type_identifier))) arguments: (argument_list)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (enhanced_for_statement type: (type_identifier) name: (identifier) value: (identifier) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (update_expression (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (enhanced_for_statement type: (type_identifier) name: (identifier) value: (identifier) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (decimal_integer_literal) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (return_statement (identifier)))))) (return_statement (identifier))))