11561 - Getting Gold
Solution Description : BFS Problem 1. Every T send a draft his top, bottom, left, right. 2. Find draft position for every T. 3. Start BFS from position P. 4. Find adj (left, right, top, bottom) and push to Queue when the position is not draft ( If the position is draft then do not find adj and do not push to Queue) 5. Count gold when run BFS. 6. If P is in position a draft then output 0. see the last input and output. |
||||||||||