public static void main ( String [ ] args ) throws IOException {
  BufferedReader br = new BufferedReader ( new FileReader ( "src/codejam/A-large.in" ) ) ;
  StringBuilder sb = new StringBuilder ( ) ;
  int T = Integer . parseInt ( br . readLine ( ) ) ;
  for ( int t_i = 1 ;
  t_i <= T ;
  t_i ++ ) {
    String [ ] split = br . readLine ( ) . split ( " " ) ;
    int D = Integer . parseInt ( split [ 0 ] ) ;
    int N = Integer . parseInt ( split [ 1 ] ) ;
    int [ ] k = new int [ N ] ;
    int [ ] s = new int [ N ] ;
    double latest = 0 ;
    for ( int n_i = 0 ;
    n_i < N ;
    n_i ++ ) {
      split = br . readLine ( ) . split ( " " ) ;
      k [ n_i ] = Integer . parseInt ( split [ 0 ] ) ;
      s [ n_i ] = Integer . parseInt ( split [ 1 ] ) ;
      double time = 1. * ( D - k [ n_i ] ) / s [ n_i ] ;
      if ( time > latest ) latest = time ;
    }
    sb . append ( "Case #" ) . append ( t_i ) . append ( ": " ) . append ( D / latest ) . append ( "\n" ) ;
  }
  Files . write ( Paths . get ( "src/codejam/horse.out" ) , sb . toString ( ) . getBytes ( ) ) ;
  System . out . println ( sb . toString ( ) ) ;
}

public static void main ( String [ ] args ) throws IOException { BufferedReader br = new BufferedReader ( new FileReader ( " src / codejam / A - large . in " ) ) ; StringBuilder sb = new StringBuilder ( ) ; int T = Integer . parseInt ( br . readLine ( ) ) ; for ( int t_i = 1 ; t_i <= T ; t_i ++ ) { String [ ] split = br . readLine ( ) . split ( " ▁ " ) ; int D = Integer . parseInt ( split [ 0 ] ) ; int N = Integer . parseInt ( split [ 1 ] ) ; int [ ] k = new int [ N ] ; int [ ] s = new int [ N ] ; double latest = 0 ; for ( int n_i = 0 ; n_i < N ; n_i ++ ) { split = br . readLine ( ) . split ( " ▁ " ) ; k [ n_i ] = Integer . parseInt ( split [ 0 ] ) ; s [ n_i ] = Integer . parseInt ( split [ 1 ] ) ; double time = 1. * ( D - k [ n_i ] ) / s [ n_i ] ; if ( time > latest ) latest = time ; } sb . append ( " Case ▁ # " ) . append ( t_i ) . append ( " : ▁ " ) . append ( D / latest ) . append ( " \n " ) ; } Files . write ( Paths . get ( " src / codejam / horse . out " ) , sb . toString ( ) . getBytes ( ) ) ; System . out . println ( sb . toString ( ) ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_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 (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (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: (array_type element: (type_identifier) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list (string_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (decimal_integer_literal)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (decimal_integer_literal)))))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier))))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier))))) (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: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list (string_literal))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (decimal_integer_literal)))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (decimal_floating_point_literal) right: (parenthesized_expression (binary_expression left: (identifier) right: (array_access array: (identifier) index: (identifier))))) right: (array_access array: (identifier) index: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (expression_statement (assignment_expression left: (identifier) right: (identifier)))))) (expression_statement (method_invocation object: (method_invocation object: (method_invocation object: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))) name: (identifier) arguments: (argument_list (identifier))) name: (identifier) arguments: (argument_list (string_literal))) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)))) name: (identifier) arguments: (argument_list (string_literal)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))) (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list))))) (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)))))))