Initialise vis , dis , parent , preTime , and postTime
vector < int > vis ( N + 1 , 0 ) ; vector < int > distance ( N + 1 , 0 ) ; vector < int > parent ( N + 1 , 0 ) ; vector < int > preTime ( N + 1 , 0 ) ; vector < int > postTime ( N + 1 , 0 ) ;