题目链接:HDU1312 / POJ1979 / ZOJ2165 Red and Black(红与黑)
Red and Black
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9902 Accepted Submission(s): 6158
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 move only on black tiles.
Write a program to count the number of black tiles which he can reach by repeating the moves described above.&
Write a program to count the number of black tiles which he can reach by repeating the moves described above.&

这篇博客介绍了一个ACM题目——Red and Black,玩家从黑色瓷砖开始,只能沿着黑色瓷砖向四面移动,目标是找出能到达的所有黑色瓷砖数量。博主通过深度优先搜索(DFS)方法进行了解题,并提供了相关代码。
 解题报告&spm=1001.2101.3001.5002&articleId=39048729&d=1&t=3&u=8654f0f8151d41efa9777125720afdc0)
261

被折叠的 条评论
为什么被折叠?



