public static void process ( ) throws IOException {
  int n = sc . nextInt ( ) ;
  int my = sc . nextInt ( ) ;
  PriorityQueue < Pair > lis = new PriorityQueue < A . Pair > ( ) ;
  int sum = my ;
  for ( int i = 1 ;
  i < n ;
  i ++ ) {
    int a = sc . nextInt ( ) ;
    lis . add ( new Pair ( a , i + 1 ) ) ;
    sum += a ;
  }
  int extra = 0 ;
  ArrayList < Integer > ans = new ArrayList < Integer > ( ) ;
  ans . add ( 1 ) ;
  while ( lis . size ( ) > 1 && lis . peek ( ) . x * 2 <= my ) {
    Pair e = lis . poll ( ) ;
    ans . add ( e . y ) ;
    extra += e . x ;
  }
  my += extra ;
  if ( my * 2 <= sum ) {
    System . out . println ( 0 ) ;
    return ;
  }
  System . out . println ( ans . size ( ) ) ;
  for ( int e : ans ) System . out . print ( e + " " ) ;
}

public static void process ( ) throws IOException { int n = sc . nextInt ( ) ; int my = sc . nextInt ( ) ; PriorityQueue < Pair > lis = new PriorityQueue < A . Pair > ( ) ; int sum = my ; for ( int i = 1 ; i < n ; i ++ ) { int a = sc . nextInt ( ) ; lis . add ( new Pair ( a , i + 1 ) ) ; sum += a ; } int extra = 0 ; ArrayList < Integer > ans = new ArrayList < Integer > ( ) ; ans . add ( 1 ) ; while ( lis . size ( ) > 1 && lis . peek ( ) . x * 2 <= my ) { Pair e = lis . poll ( ) ; ans . add ( e . y ) ; extra += e . x ; } my += extra ; if ( my * 2 <= sum ) { System . out . println ( 0 ) ; return ; } System . out . println ( ans . size ( ) ) ; for ( int e : ans ) System . out . print ( e + " ▁ " ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters) (throws (type_identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (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 (scoped_type_identifier (type_identifier) (type_identifier)))) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (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)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal)))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)) right: (binary_expression left: (binary_expression left: (field_access object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) field: (identifier)) right: (decimal_integer_literal)) right: (identifier)))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (field_access object: (identifier) field: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (identifier))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (decimal_integer_literal)))) (return_statement))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (identifier) body: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (string_literal))))))))