static void solve ( double [ ] a , double k , double max ) {
  double minreq = 0 ;
  for ( int i = 0 ;
  i < a . length ;
  i ++ ) {
    minreq += max - a [ i ] ;
  }
  if ( minreq > k ) {
    System . out . println ( - 1 ) ;
  }
  else {
    double n = ( k - minreq ) / a . length ;
    for ( double val : a ) {
      System . out . println ( ( max - val + n ) ) ;
    }
  }
}

static void solve ( double [ ] a , double k , double max ) { double minreq = 0 ; for ( int i = 0 ; i < a . length ; i ++ ) { minreq += max - a [ i ] ; } if ( minreq > k ) { System . out . println ( - 1 ) ; } else { double n = ( k - minreq ) / a . length ; for ( double val : a ) { System . out . println ( ( max - val + n ) ) ; } } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (floating_point_type) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (floating_point_type) name: (identifier)) (formal_parameter type: (floating_point_type) name: (identifier))) body: (block (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (array_access array: (identifier) index: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (unary_expression operand: (decimal_integer_literal)))))) alternative: (block (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (field_access object: (identifier) field: (identifier))))) (enhanced_for_statement type: (floating_point_type) name: (identifier) value: (identifier) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier))))))))))))