@poita incorrect. each flood fill should just overrun every square it gets to, besides the walls ofcourse. then you have at most 1 flood fill per square, which is very reasonable, and alot easier to implement. keep in mind - you have very little time to implement (AND DEBUG) a solution in this kind of competitions. I actually think flood filling is a way better solution in the given scenario.
↧