0

Is there anybody who can help me out in this in any way plz.... Its my first try to codechief.. I m not getting any approach..

Roadtrip question.. To get the no of museums could be visited by giving inputs of cities and museums.. Use of bfs / dfs. https://www.codechef.com/INOIPRAC/problems/ROADTRIP

23rd Feb 2020, 6:28 PM
Leo
Leo - avatar
2 Antworten
+ 1
Hi, that challenge requires knowledge of algorithms bfs and/or dfs. If you don't know them or don't get a foot into it for other reasons, you might need some more experience. It is absolutely not a challange for beginner. Do some coding and dive deeper into graph algorithms and give it a try after.
24th Feb 2020, 7:52 AM
Oma Falk
Oma Falk - avatar
+ 1
Oma Falk yea sir exactly...😇.. I need much more experience for it... I have tried this code and it is workng fine for the 3 cases shown when tested in dev c++ but when it comes to their site got only run time error... Also the thingy ia that it is given to us as an assignment also and last date... That's why i was wanting some help from someone who might be good at algo... I tried the approach as... Firat creating a graph by inputting edges and then using bfs for traversing the graph and not going through what already visited and i m doing thia the times equals to this no of months and on start i = 0 so i used %2 to say if i%2 is even get the museum with largest museums and if odd the get smallest numbered museums and then traverse to get more museuma in count
24th Feb 2020, 12:06 PM
Leo
Leo - avatar