static int dfs ( int now ) {
  int res = 1 ;
  for ( int next : list [ now ] ) {
    res += dfs ( next ) ;
  }
  return dp [ now ] = res ;
}

static int dfs ( int now ) { int res = 1 ; for ( int next : list [ now ] ) { res += dfs ( next ) ; } return dp [ now ] = res ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (array_access array: (identifier) index: (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation name: (identifier) arguments: (argument_list (identifier))))))) (return_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier)))))