ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1033. Labyrinth

Need your help!!!
Posted by <<--Falcon-->> 24 Nov 2011 03:43
Hi,guys. This problem is quite interesting for me and I'd like to solve it, but, truth to tell, I don't know how... :( I know that the problem relates to the graph theory, but I can't figure out what the problem of the graph theory this problem represents and what algorithms can be applied here. So, could you give me some little hint how to solve the problem?... Please.....
Re: Need your help!!!
Posted by morbidel 24 Nov 2011 05:21
Hi,

Read about the Flood fill algorithm. For example here: http://en.wikipedia.org/wiki/Flood_fill
Good luck!
Re: Need your help!!!
Posted by <<--Falcon-->> 25 Nov 2011 15:34
Thank you very much for the info. Finally, I've got AC :)(It turned out to be a very easy problem). However, I still don't understand why this problem relates to the graph theory...

Edited by author 25.11.2011 15:35
Re: Need your help!!!
Posted by Andrew Sboev 3 Jul 2012 21:19
Hmm. I used BFS to solve this problem, for example