public static void dfs ( int placenow ) {
  visit [ placenow ] = true ;
  boolean success = true ;
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    if ( visit [ i ] == false ) {
      success = false ;
      break ;
    }
  }
  if ( success ) {
    ans ++ ;
    visit [ placenow ] = false ;
    return ;
  }
  for ( int i = 0 ;
  i < m ;
  i ++ ) {
    if ( w [ i ] == placenow && visit [ ww [ i ] ] == false ) {
      dfs ( ww [ i ] ) ;
    }
    else if ( ww [ i ] == placenow && visit [ w [ i ] ] == false ) {
      dfs ( w [ i ] ) ;
    }
    else {
      continue ;
    }
  }
  visit [ placenow ] = false ;
  return ;
}

public static void dfs ( int placenow ) { visit [ placenow ] = true ; boolean success = true ; for ( int i = 0 ; i < n ; i ++ ) { if ( visit [ i ] == false ) { success = false ; break ; } } if ( success ) { ans ++ ; visit [ placenow ] = false ; return ; } for ( int i = 0 ; i < m ; i ++ ) { if ( w [ i ] == placenow && visit [ ww [ i ] ] == false ) { dfs ( ww [ i ] ) ; } else if ( ww [ i ] == placenow && visit [ w [ i ] ] == false ) { dfs ( w [ i ] ) ; } else { continue ; } } visit [ placenow ] = false ; return ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (true))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (true))) (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 (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (false))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (false))) (break_statement))))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (block (expression_statement (update_expression (identifier))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (false))) (return_statement))) (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 (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier)) right: (binary_expression left: (array_access array: (identifier) index: (array_access array: (identifier) index: (identifier))) right: (false)))) consequence: (block (expression_statement (method_invocation name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier)))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (identifier)) right: (binary_expression left: (array_access array: (identifier) index: (array_access array: (identifier) index: (identifier))) right: (false)))) consequence: (block (expression_statement (method_invocation name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier)))))) alternative: (block (continue_statement)))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (false))) (return_statement)))