Driver Code
public static void main ( String [ ] args ) { for ( int i = 0 ; i < m ; i ++ ) g [ i ] = new Vector < pair > ( ) ; g [ 0 ] . add ( new pair ( 1 , 0 ) ) ; g [ 0 ] . add ( new pair ( 2 , 1 ) ) ; g [ 1 ] . add ( new pair ( 2 , 2 ) ) ; g [ 1 ] . add ( new pair ( 3 , 3 ) ) ; g [ 2 ] . add ( new pair ( 3 , 4 ) ) ; g [ 3 ] . add ( new pair ( 4 , 5 ) ) ; g [ 4 ] . add ( new pair ( 2 , 6 ) ) ;