public static void COMinit ( ) {
  fac [ 0 ] = fac [ 1 ] = 1 ;
  finv [ 0 ] = finv [ 1 ] = 1 ;
  inv [ 1 ] = 1 ;
  for ( int i = 2 ;
  i < fac . length ;
  i ++ ) {
    fac [ i ] = fac [ i - 1 ] * i % modAns ;
    inv [ i ] = modAns - inv [ modAns % i ] * ( modAns / i ) % modAns ;
    finv [ i ] = finv [ i - 1 ] * inv [ i ] % modAns ;
  }
}

public static void COMinit ( ) { fac [ 0 ] = fac [ 1 ] = 1 ; finv [ 0 ] = finv [ 1 ] = 1 ; inv [ 1 ] = 1 ; for ( int i = 2 ; i < fac . length ; i ++ ) { fac [ i ] = fac [ i - 1 ] * i % modAns ; inv [ i ] = modAns - inv [ modAns % i ] * ( modAns / i ) % modAns ; finv [ i ] = finv [ i - 1 ] * inv [ i ] % modAns ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (decimal_integer_literal)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (decimal_integer_literal)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) 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: (field_access object: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (identifier)) right: (identifier)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (binary_expression left: (identifier) right: (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (identifier))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (array_access array: (identifier) index: (identifier))) right: (identifier))))))))