题意:问两个迷宫是否存在公共最短路. 题解:两个反向bfs建立层次图,一遍正向bfs寻找公共最短路 #include<cstdio> #include<cstring> #include<queue> using namespace std; +; int d1[maxn][maxn]; int d2[maxn][maxn]; char g1[maxn][maxn]; char g2[maxn][maxn]; int n,m; struct node{ int x,y;…
E. Two Labyrinths Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100187/problem/E Description A labyrinth is the rectangular grid, each of the cells of which is either free or wall, and it's possible to move only between free…
题目: Description standard input/output As most of you know, the Arab Academy for Science and Technology and Maritime Transport in Alexandria, Egypt, hosts the ACPC Headquarters in the Regional Informatics Center (RIC), and it has been supporting our r…
传送门 A. Ariel time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output King Triton really likes watching sport competitions on TV. But much more Triton likes watching live competitions. So Triton de…
传送门 E. Epic Fail of a Genie time limit per test 0.5 seconds memory limit per test 64 megabytes input standard input output standard output Aladdin had found a new shiny lamp and has started polishing it with his hands. Suddenly a mysterious genie app…