As a cute girl, Kotori likes playing ``Hide and Seek'' with cats particularly. Under the influence of Kotori, many girls and cats are playing ``Hide and Seek'' together. Koroti shots a photo. The size of this photo is n×mn×m, each pixel of the photo…
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1072 Description Ignatius had a nightmare last night. He found himself in a labyrinth with a time bomb on him. The labyrinth has an exit, Ignatius should get out of the labyrinth before the bomb explodes.…
http://acm.hdu.edu.cn/showproblem.php?pid=1495 题目就不说了, 说说思路! 倒可乐 无非有6种情况: 1. S 向 M 倒 2. S 向 N 倒 3. N 向 M 倒 4. N 向 S 倒 5. M 向 S 倒 6. M 向 N 倒 根据上述的六种情况来进行模拟, 每次模拟的结果都放进队列里面. 注意: 还要用到标记数组,防止数据重复进入队列导致爆栈. #include<stdio.h> #include<stdlib.h> #incl…
题目链接 ZOJ链接 Problem Description Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in the prison. Angel's friends want to save Angel. Their task…