Please read the new rule regarding the restriction on the use of AI tools. ×

Help required for GRAFFDEF (spoj)

Revision en1, by __ek__tha__tiger__, 2018-10-13 10:41:42

Well, I approached this problem in this way. I found out the bridges of the graph, and since the graph is given to be a connected one, I calculated the number of failed combinations of placing the soldiers and then calculated the probability.

Here is a link to my code

Can anyone point out where am I going wrong!

Here is the link for the problem

Tags #graphs

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English __ek__tha__tiger__ 2018-10-13 10:41:42 460 Initial revision (published)