public static void main ( String [ ] args ) {
  n = 7 ;
  m = 7 ;
  a = 3 ;
  b = 5 ;
  int edges [ ] [ ] = {
    {
      1 , 2 }, {
        2 , 3 }, {
          3 , 4 }, {
            4 , 5 }, {
              5 , 6 }, {
                6 , 7 }, {
                  7 , 5 }
                };
                Vector < Integer > [ ] v = new Vector [ n + 1 ] ;
                for ( int i = 0 ;
                i <= n ;
                i ++ ) {
                  v [ i ] = new Vector < Integer > ( ) ;
                }
                for ( int i = 0 ;
                i < m ;
                i ++ ) {
                  v [ edges [ i ] [ 0 ] ] . add ( edges [ i ] [ 1 ] ) ;
                  v [ edges [ i ] [ 1 ] ] . add ( edges [ i ] [ 0 ] ) ;
                }
                Calculate ( v ) ;
              }
              
public static void main ( String [ ] args ) { n = 7 ; m = 7 ; a = 3 ; b = 5 ; int edges [ ] [ ] = { { 1 , 2 } , { 2 , 3 } , { 3 , 4 } , { 4 , 5 } , { 5 , 6 } , { 6 , 7 } , { 7 , 5 } } ; Vector < Integer > [ ] v = new Vector [ n + 1 ] ; for ( int i = 0 ; i <= n ; i ++ ) { v [ i ] = new Vector < Integer > ( ) ; } for ( int i = 0 ; i < m ; i ++ ) { v [ edges [ i ] [ 0 ] ] . add ( edges [ i ] [ 1 ] ) ; v [ edges [ i ] [ 1 ] ] . add ( edges [ i ] [ 0 ] ) ; } Calculate ( v ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_initializer (array_initializer (decimal_integer_literal) (decimal_integer_literal)) (array_initializer (decimal_integer_literal) (decimal_integer_literal)) (array_initializer (decimal_integer_literal) (decimal_integer_literal)) (array_initializer (decimal_integer_literal) (decimal_integer_literal)) (array_initializer (decimal_integer_literal) (decimal_integer_literal)) (array_initializer (decimal_integer_literal) (decimal_integer_literal)) (array_initializer (decimal_integer_literal) (decimal_integer_literal))))) (local_variable_declaration type: (array_type element: (generic_type (type_identifier) (type_arguments (type_identifier))) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (type_identifier) dimensions: (dimensions_expr (binary_expression left: (identifier) 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: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (type_identifier))) arguments: (argument_list)))))) (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 (expression_statement (method_invocation object: (array_access array: (identifier) index: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal))) name: (identifier) arguments: (argument_list (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal))))) (expression_statement (method_invocation object: (array_access array: (identifier) index: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal))) name: (identifier) arguments: (argument_list (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal))))))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier))))))