Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

Algorithm for solving FIRESC

$
0
0

I am trying to solve FIRESC.

My approach is as follows: ->Max number of fire escape routes = number of connected components in the graph.

->number of ways of selecting the captains = multiplication of size of each of the connected components.

My code is getting WA.

Is this the correct algorithm ?

In case anyone wants to see my code, here is the link: Solution


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>