We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
For people using c++ (std::cin, std::cout, specifically) and getting timeout on 7, remember to turn off synchronization with the standard C stream objects:
std::ios_base::sync_with_stdio(false);
That did the trick for me (no need to change your code to scanf and printf)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Dijkstra: Shortest Reach 2
You are viewing a single comment's thread. Return to all comments →
For people using c++ (std::cin, std::cout, specifically) and getting timeout on 7, remember to turn off synchronization with the standard C stream objects:
std::ios_base::sync_with_stdio(false);
That did the trick for me (no need to change your code to scanf and printf)