Mine Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 51    Accepted Submission(s): 6 Problem Description Have you ever played a game in Windows: Mine?This game is played on a n*m board, just lik…
Swipe Bo Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 455    Accepted Submission(s): 111 Problem Description “Swipe Bo” is a puzzle game that requires foresight and skill. The main character…
将起始点.终点和钥匙统一编号,预处理: 1.起始点到所有钥匙+终点的最短路 2.所有钥匙之间两两的最短路 3.所有钥匙到终点的最短路 将起始点和所有钥匙四方向出发设为起点BFS一遍,求出它到任意点任意方向的最短路dp[i][j][k].(即到点(i,j)且方向为k的最短路),BFS时需要注意: 1.UDLR有可能组成死循环 2.转向符在墙边并且指向了墙时,无法重新选择方向.例如这个: S...L#E 3.只有豆腐块滑动碰到墙停止了之后,才能把这个点的坐标加入队列.在滑动过程中经过的点都不需要加入…
典型的bfs模拟 (广度优先搜索) ,不过有好多细节要注意,比如图中如果是  R#  走到这个R的话就无限往右走了,这样就挂了~肯定到不了出口.还有一种容易造成死循环的,比如 #E## DLLL D. .U D.SU RRRU 这样的话就必须要标记下当前位置某个方向获得钥匙的状态是否被访问过了,获得钥匙的状态可以状态压缩来表示. 墙角如果遇到转弯了是不会加step的! #include <stdio.h> #include <string.h> #include <queue…
题目链接 状态压缩记录当前拿到了哪些钥匙, 然后暴力搜索. 搞了好几个小时, 一开始也不知道哪里错了, 最后A了也不知道一开始哪里有问题. #include <iostream> #include <vector> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <map> #include <se…
Y Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 60    Accepted Submission(s): 20 Problem Description   Sample Input 4 1 2 1 3 1 4   Sample Output 1 Hint 1. The only set is {2,3,4}. 2. Please…
Sum Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 94    Accepted Submission(s): 41 Problem Description   Sample Input 2   Sample Output 2 Hint 1. For N = 2, S(1) = S(2) = 1. 2. The input fil…
Editor Time Limit: 3000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 118    Accepted Submission(s): 38 Problem Description   Sample Input 8 I 2 I -1 I 1 Q 3 L D R Q 2   Sample Output 2 3 Hint The following…
Answers Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 25    Accepted Submission(s): 16 Problem Description   Sample Input 2 4 2 2 2 1 0 1 2 3   Sample Output NO YES YES YES   Source 2013 Mul…
EBCDIC Time Limit: 2000/2000 MS (Java/Others)    Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 160    Accepted Submission(s): 81 Problem Description A mad scientist found an ancient message from an obsolete IBN System/360 mainframe.…