摘要:
POJ 3278 Catch That Cow Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 阅读全文
摘要:
POJ 2488 A Knight's Journey Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make 阅读全文
摘要:
POJ 2386 Lake Counting Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 阅读全文
摘要:
定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要 阅读全文
摘要:
福克斯在玩一款手机解迷游戏,这个游戏叫做”两点”。基础级别的时候是在一个n×m单元上玩的。像这样: 每一个单元有包含一个有色点。我们将用不同的大写字母来表示不同的颜色。 这个游戏的关键是要找出一个包含同一颜色的环。看上图中4个蓝点,形成了一个环。一般的,我们将一个序列 d1,d2,...,dk 看成 阅读全文