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.
Roads and Libraries
Roads and Libraries
Sort by
recency
|
880 Discussions
|
Please Login in order to post a comment
Branded lanyards can serve as a useful tool while exploring the concept of Roads and Libraries. As both are integral to connectivity, roads symbolize physical infrastructure, while libraries represent hubs of knowledge. Using lanyards, you can keep your IDs, keys, or event passes handy while navigating these essential spaces. Whether for educational trips or professional events, these lanyards are practical and serve as subtle promotional items to showcase your brand.
Guys , its a Basic disjoint set implemtation using krushkal;
The catch is it will pass all except 7 testcase due to typedef ,
we need to change all the int to long long , cause we multiply
So, we need to even change the long long inside main loop also instead of typecasting at result!!
I try very hard, buts for now I dont know whats is wrong with my code, can somebody help please?
class Result {
}
with custom input 1 5 3 6 1 1 2 1 3 1 4 it returns an expected answer of 15 when infact its 9. ie c_lib = 6 c_road = 1 1 library + 3 roads = 9 not 15 1 libraries + 3 roads = 15
Compiler Message: Wrong Answer
Input (stdin) 1 5 3 6 1 1 2 1 3 1 4 Your Output (stdout) 9
Any ideas why my answer is wrong? 4 cities in one aglomeration, cost of library 6 and cost of road 1. It's simply one library (6) and 3 roads (3) what all gives 9. Do I misunderstand something, or hackerrank has a bug?