static void solve ( Scanner sc , int caseNum ) {
  int N = sc . nextInt ( ) ;
  int K = sc . nextInt ( ) ;
  P [ ] ps = new P [ N ] ;
  for ( int i = 0 ;
  i < N ;
  i ++ ) {
    ps [ i ] = new P ( sc . nextInt ( ) , sc . nextInt ( ) ) ;
  }
  Arrays . sort ( ps ) ;
  double max = - 1 ;
  for ( int i = 0 ;
  i < N - K + 1 ;
  i ++ ) {
    P [ ] ps2 = Arrays . copyOfRange ( ps , i + 1 , N ) ;
    Arrays . sort ( ps2 , ( p1 , p2 ) -> ( Long . compare ( p2 . H * p2 . R , p1 . H * p1 . R ) ) ) ;
    double area = Math . PI * ps [ i ] . R * ps [ i ] . R ;
    area += Math . PI * ps [ i ] . H * ps [ i ] . R * 2 ;
    for ( int j = 0 ;
    j < K - 1 ;
    j ++ ) {
      area += Math . PI * ps2 [ j ] . H * ps2 [ j ] . R * 2 ;
    }
    max = Math . max ( area , max ) ;
  }
  System . out . printf ( "Case #%d: %.8f\n" , caseNum , max ) ;
}

static void solve ( Scanner sc , int caseNum ) { int N = sc . nextInt ( ) ; int K = sc . nextInt ( ) ; P [ ] ps = new P [ N ] ; for ( int i = 0 ; i < N ; i ++ ) { ps [ i ] = new P ( sc . nextInt ( ) , sc . nextInt ( ) ) ; } Arrays . sort ( ps ) ; double max = - 1 ; for ( int i = 0 ; i < N - K + 1 ; i ++ ) { P [ ] ps2 = Arrays . copyOfRange ( ps , i + 1 , N ) ; Arrays . sort ( ps2 , ( p1 , p2 ) -> ( Long . compare ( p2 . H * p2 . R , p1 . H * p1 . R ) ) ) ; double area = Math . PI * ps [ i ] . R * ps [ i ] . R ; area += Math . PI * ps [ i ] . H * ps [ i ] . R * 2 ; for ( int j = 0 ; j < K - 1 ; j ++ ) { area += Math . PI * ps2 [ j ] . H * ps2 [ j ] . R * 2 ; } max = Math . max ( area , max ) ; } System . out . printf ( " Case ▁ # % d : ▁ % .8f \n " , caseNum , max ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (integral_type) name: (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: (array_type element: (type_identifier) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (type_identifier) dimensions: (dimensions_expr (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 (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (object_creation_expression type: (type_identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (unary_expression operand: (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: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) 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: (identifier) name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (lambda_expression parameters: (inferred_parameters (identifier) (identifier)) body: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (field_access object: (identifier) field: (identifier))) (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (field_access object: (identifier) field: (identifier)))))))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (field_access object: (array_access array: (identifier) index: (identifier)) field: (identifier))) right: (field_access object: (array_access array: (identifier) index: (identifier)) field: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (field_access object: (array_access array: (identifier) index: (identifier)) field: (identifier))) right: (field_access object: (array_access array: (identifier) index: (identifier)) field: (identifier))) right: (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: (binary_expression left: (identifier) right: (decimal_integer_literal))) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (field_access object: (array_access array: (identifier) index: (identifier)) field: (identifier))) right: (field_access object: (array_access array: (identifier) index: (identifier)) field: (identifier))) right: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal) (identifier) (identifier))))))