CF#301 C:Ice Cave(简单BFS)】的更多相关文章

http://codeforces.com/problemset/problem/540/C       Ice Cave Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 540C Description You play a computer game. Your character stands on some lev…
Description You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to descend one level lower and the only way to do this is to fall through the ice. The level of the cave where y…
题意:给出一个n*m的矩阵,“.”代表完整的冰,“X”代表破碎的冰,现在为了前进,需要掉下去一层,唯一的方法就是从破碎的冰上面掉下去 然后给出起点还有终点,问能否可达 即为到达终点的时候,终点必须是破碎的冰,这样才能够保证只掉了一层 然后这个也说明了节点该怎么扩展,如果当前跳到的点是"X"(破碎的冰),且当前点不是终点,那么这个点就不用加入队列了(因为它还没有到达终点就落下去了) 如果当前点是“.”完整的冰,那么跳上去之后,这一点变成破碎的冰"X",再把这一点加入队…
C:Ice Cave 有一个m*n的地图,里面包含'.'表示完整的冰块,'X'表示有裂痕的冰块,当游戏者到达完整的冰块时,这个位置的冰块会变成有裂痕的冰块,如果到达有裂痕的冰块时,游戏者会进入下一关 现在给你当前位置和终点,每次移动都是相邻位置互相移动:问游戏者能不能从终点位置进入下一关:起始位置是由上一关下来的,所以都是‘X’ bfs 注意下标是从1开始:  …
题目传送门 /* 题意:告诉起点终点,踩一次, '.'变成'X',再踩一次,冰块破碎,问是否能使终点冰破碎 DFS:如题解所说,分三种情况:1. 如果两点重合,只要往外走一步再走回来就行了:2. 若两点相邻, 那么要不就是踩一脚就破了或者踩一脚走开再走回来踩一脚破了:3. 普通的搜索看是否能到达, 若能还是要讨论终点踩几脚的问题:) DFS 耗时大,险些超时,可以用BFS来做 */ #include <cstdio> #include <algorithm> #include &l…
C. Ice Cave Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/540/problem/C Description You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to descend…
http://codeforces.com/problemset/problem/540/C You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to descend one level lower and the only way to do this is to fall through the…
题目链接:https://vjudge.net/contest/226823#problem/C You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to descend one level lower and the only way to do this is to fall through t…
Ice Cave Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Description You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to descend one level lowe…
Description You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to descend one level lower and the only way to do this is to fall through the ice. The level of the cave where y…