随笔分类 - 搜索-bfs
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=4255A Famous GridDescriptionMr. B has recently discovered the grid named "spiral grid".Construct the gri...
阅读全文
摘要:题目连接http://www.lydsy.com/JudgeOnline/problem.php?id=1054移动玩具Description在一个4*4的方框内摆放了若干个相同的玩具,某人想将这些玩具重新摆放成为他心中理想的状态,规定移动时只能将玩具向上下左右四个方向移动,并且移动的位置不能有玩具...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=4308Saving Princess claire_DescriptionPrincess claire_ was jailed in a maze by Grand Demon Monster(GDM) ...
阅读全文
摘要:题目连接http://poj.org/problem?id=1840Battle CityDescriptionMany of us had played the game "Battle city" in our childhood, and some people (like me) even ...
阅读全文
摘要:题目连接http://poj.org/problem?id=2046GapDescriptionLet's play a card game called Gap.You have 28 cards labeled with two-digit numbers. The first digit (f...
阅读全文
摘要:题目连接http://poj.org/problem?id=1753Flip GameDescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 sq...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=3152 Obstacle CourseDescriptionYou are working on the team assisting with programming for the Mars rover...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1181变形课Description呃......变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形咒语的一个统一规律:如...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1429胜利大逃亡(续)DescriptionIgnatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)……这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1885Key TaskDescriptionThe Czech Technical University is rather old — you already know that it celebrate...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1195Open the LockDescriptionNow an emergent task for you is to open a password lock. The password is con...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=4198Quick out of the HarbourDescriptionCaptain Clearbeard decided to go to the harbour for a few days so...
阅读全文
摘要:题目连接http://poj.org/problem?id=2251Dungeon MasterDescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is compo...
阅读全文
摘要:
给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,她在行走过程中,不能转太多弯了,否则她会晕倒的。我们假定给定的两个位置都是空地,初始时,gloria所面向的方向未定,她可以选择4个方向的任何一个出发,而不算成一次转弯。gloria能从一个位置走到另外一个位置吗?
阅读全文
给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,她在行走过程中,不能转太多弯了,否则她会晕倒的。我们假定给定的两个位置都是空地,初始时,gloria所面向的方向未定,她可以选择4个方向的任何一个出发,而不算成一次转弯。gloria能从一个位置走到另外一个位置吗?
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2612Find a wayDescriptionPass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. ...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2102A计划Description可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1495非常可乐Description大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的...
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1026Ignatius and the Princess IDescriptionThe Princess has been abducted by the BEelzebub feng5166, our ...
阅读全文
摘要:
A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboard exactly once. He thinks that the most difficult part of the problem is determining the smallest number of knight moves between two given squares and that, once you have accomplished this, finding the tour
阅读全文
A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboard exactly once. He thinks that the most difficult part of the problem is determining the smallest number of knight moves between two given squares and that, once you have accomplished this, finding the tour
阅读全文
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2645find the nearest stationDescriptionSince dandelion has left the hometown so long,she finds it's diff...
阅读全文

浙公网安备 33010602011771号