Cost Array
int cost [ ] = { 2 , 2 , 8 , 6 , 9 } ; @ SuppressWarnings ( " unchecked " ) Vector < Integer > [ ] g = new Vector [ n ] ; for ( int i = 0 ; i < g . length ; i ++ ) g [ i ] = new Vector < Integer > ( ) ;