question- https://www.spoj.com/problems/SHPATH/ My solution- https://ideone.com/bp7KEk
What’s wrong with my code. After so many tries also i am getting TLE. What changes should i make?
I also made new solution with some optimization:https://ideone.com/MQ3yTa
But still getting TLE. I am unable to find where is the problem occuring.
struct Edge { int vertex, int cost };
O(log n)
vector
list
vector<bool>
Thank You so much @tjm . This was a very useful information. It got accepted with minimum time of 1.11 sec. Solution- https://ideone.com/74qnEC I did every possible change. But i was thinking can i further make my timing better?