You are viewing a single comment's thread. Return to all comments →
Why don't you add an explanation of your algorithm?
Thank you very much for your explanations, thought I am stilll struggling to understand the math
Though it seems to me that there is an error in the first line of your code. Perhaps
vector<long> edges(100001);
needs to be replaced by
vector<vector<long>> edges(100001);
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Kingdom Division
You are viewing a single comment's thread. Return to all comments →
Why don't you add an explanation of your algorithm?
Thank you very much for your explanations, thought I am stilll struggling to understand the math
Though it seems to me that there is an error in the first line of your code. Perhaps
needs to be replaced by