For the question FIRESC, I submitted two answers: this one got AC, while this one gives TLE. The only difference between the two is that in the first one, I have defined two vectors globally, while in the second one, I defined only one of those globally and I am passing the second one as a function argument.
The two vectors:
vector<vector<int> > adj; // vector 1
vector<bool> visited; // vector 2
In the AC solution both the vectors are global while in the TLE solution, only visited is global while adj is passed as an argument.
So my question is that why is passing a vector as an argument giving TLE?