Search found 3 matches

by hector-chang
Sun Sep 03, 2006 7:39 pm
Forum: Volume 110 (11000-11099)
Topic: 11080 - Place the Guards
Replies: 40
Views: 18342

Also correct.

Thanks
by hector-chang
Sun Sep 03, 2006 5:09 pm
Forum: Volume 110 (11000-11099)
Topic: 11080 - Place the Guards
Replies: 40
Views: 18342

Re: correct algo

The algo is correct...
for each connected component find the minimum no. of guards...
return the sum of all guards of all components...

Check this I/O :

1
1 0

mentioned earlier..
the answer is

1

Similar I/O are given in the same thread try them out :wink:

Thanks. But the output is ...
by hector-chang
Sun Sep 03, 2006 4:49 pm
Forum: Volume 110 (11000-11099)
Topic: 11080 - Place the Guards
Replies: 40
Views: 18342

I have an idea and a WA

Hello!

Based in the following observations I thinked the next solution.

Observation: Once you put a guard in some vertex there is only one admisible configuration of guards for the rest of the connected componet of the graph to which this vertex belongs (One can see this by a BFS starting in this ...

Go to advanced search