static int dfs ( int node , int parent , Vector < Integer > [ ] adj , boolean [ ] vis ) {
  int ans = 1 ;
  vis [ node ] = true ;
  for ( Integer it : adj [ node ] ) {
    if ( it != parent ) ans += dfs ( it , node , adj , vis ) ;
  }
  return ans ;
}

static int dfs ( int node , int parent , Vector < Integer > [ ] adj , boolean [ ] vis ) { int ans = 1 ; vis [ node ] = true ; for ( Integer it : adj [ node ] ) { if ( it != parent ) ans += dfs ( it , node , adj , vis ) ; } return ans ; }
(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: (array_type element: (generic_type (type_identifier) (type_arguments (type_identifier))) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (array_type element: (boolean_type) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (true))) (enhanced_for_statement type: (type_identifier) name: (identifier) value: (array_access array: (identifier) index: (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (expression_statement (assignment_expression left: (identifier) right: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier)))))))) (return_statement (identifier))))