题目 题目 分析 双向bfs,对着书打的,我还调了好久. 代码 #include<cstdio> #include<cstring> #include<cctype> #include<queue> using namespace std; const int maxs=20,maxn=150; const int dx[]={1,-1,0,0,0},dy[]={0,0,1,-1,0}; int s[3],t[3]; int deg[maxn…
Problem UVA1601-The Morning after Halloween Accept: 289 Submit: 3136 Time Limit: 12000 mSec Problem Description Input Output For each dataset in the input, one line containing the smallest number of steps to restore ghosts into the positions where…
http://acm.hdu.edu.cn/showproblem.php?pid=2612 Find a way Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 32208 Accepted Submission(s): 10316 Problem Description Pass a year learning in Hangz…