private static double DP ( int i , int k ) {
  if ( i < 0 || k <= 0 ) return 0 ;
  if ( memo [ i ] [ k ] != null ) return memo [ i ] [ k ] ;
  double ans = DP ( i - 1 , k - 1 ) ;
  if ( k == 1 ) {
    ans += Math . PI * p [ i ] . R * p [ i ] . R ;
  }
  ans += 2.0 * Math . PI * p [ i ] . R * p [ i ] . H ;
  ans = Math . max ( ans , DP ( i - 1 , k ) ) ;
  return memo [ i ] [ k ] = ans ;
}

private static double DP ( int i , int k ) { if ( i < 0 || k <= 0 ) return 0 ; if ( memo [ i ] [ k ] != null ) return memo [ i ] [ k ] ; double ans = DP ( i - 1 , k - 1 ) ; if ( k == 1 ) { ans += Math . PI * p [ i ] . R * p [ i ] . R ; } ans += 2.0 * Math . PI * p [ i ] . R * p [ i ] . H ; ans = Math . max ( ans , DP ( i - 1 , k ) ) ; return memo [ i ] [ k ] = ans ; }
(method_declaration (modifiers) type: (floating_point_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (return_statement (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (null_literal))) consequence: (return_statement (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)) (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (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: (decimal_floating_point_literal) right: (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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier))))))) (return_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (identifier)))))