随笔分类 - 02.搜索 - (1)BFS
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 int dx[4]={+1,0,-1,0}; 6 int dy[4]={0,+1,0,-1}; 7 struct type{ 8 int x,y,t; 9 }meteor[50000+5],now,next; 10 int n,map[305][305],...
阅读全文
摘要:“.”能走,“#”不能走,“@”为起点,求所有能走到的地方。 BFS: DFS:
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1372 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Descripti
阅读全文

浙公网安备 33010602011771号