Red and Black Problem DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can't move on red til…
这有一间铺满方形瓷砖的长方形客房. 每块瓷砖的颜色是红色或者黑色. 一个人站在一块黑色瓷砖上, 他可以从这块瓷砖移动到相邻(即,上下左右)的四块瓷砖中的一块. 但是他只能移动到黑色瓷砖上,而不能移动到红色瓷砖上. 编写一个程序,通过重复上述动作来计算他可以达到的黑色瓷砖的数量. Input输入包含多组数据. 每组数据包含两个正整数W和H; H表示瓷砖的行数,W表示瓷砖的列数. W和H不超过20. 瓷砖的颜色用字符表示,如下所示. '.' - 黑色瓷砖 '#' - 红色瓷砖 '@' - 站在黑色瓷…
题目描述 There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can't move on red tiles, he can move only on blac…
Red and Black Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 45   Accepted Submission(s) : 34 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description There is a rectangular…
Red and Black Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6762 Accepted Submission(s): 4284 Problem Description There is a rectangular room, covered with square tiles. Each tile is colored eit…
Problem Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can't move on red tiles, he can mo…
Red and Black Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 19731    Accepted Submission(s): 11991 Problem Description There is a rectangular room, covered with square tiles. Each tile is col…
There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can't move on red tiles, he can move only on black til…
I - Red and Black Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1312 Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is stan…
There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can't move on red tiles, he can move only on black til…