public static long binSearch ( long ok , long ng , long k , long [ ] a , long [ ] b ) {
  while ( Math . abs ( ok - ng ) > 1 ) {
    long mid = ( ok + ng ) / 2 ;
    if ( solve ( mid , a , b ) >= k ) {
      ok = mid ;
    }
    else {
      ng = mid ;
    }
  }
  return ok ;
}

public static long binSearch ( long ok , long ng , long k , long [ ] a , long [ ] b ) { while ( Math . abs ( ok - ng ) > 1 ) { long mid = ( ok + ng ) / 2 ; if ( solve ( mid , a , b ) >= k ) { ok = mid ; } else { ng = mid ; } } return ok ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier))) body: (block (while_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)))) right: (decimal_integer_literal))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier))) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (identifier)))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))))))) (return_statement (identifier))))