hdu
轩辕小猪
这个作者很懒,什么都没留下…
展开
-
Knight Moves(BFS)
http://acm.hdu.edu.cn/showproblem.php?pid=1372题目描述: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 ea...原创 2018-05-06 11:40:42 · 128 阅读 · 0 评论 -
FatMouse and Cheese
问题描述:FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At each ...原创 2018-08-25 21:14:36 · 508 阅读 · 0 评论 -
How many ways
问题描述:这是一个简单的生存游戏,你控制一个机器人从一个棋盘的起始点(1,1)走到棋盘的终点(n,m)。游戏的规则描述如下: 1.机器人一开始在棋盘的起始点并有起始点所标有的能量。 2.机器人只能向右或者向下走,并且每走一步消耗一单位能量。 3.机器人不能在原地停留。 4.当机器人选择了一条可行路径后,当他走到这条路径的终点时,他将只有终点所标记的能量。如上图,机器人一开始在(...原创 2018-08-25 20:45:49 · 191 阅读 · 0 评论 -
Friends
问题描述:There are n people and m pairs of friends. For every pair of friends, they can choose to become online friends (communicating using online applications) or offline friends (mostly using face-to...原创 2018-08-25 20:24:26 · 330 阅读 · 0 评论 -
变形课
问题描述:呃……变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形咒语的一个统一规律:如果咒语是以a开头b结尾的一个单词,那么它的作用就恰好是使A物体变成B物体. Harry已经将他所会的所有咒语都列成了一个表,他想让你帮忙计算一下他是否能完成老师的作业,将一个B(ball)变成一个M(Mouse),你知...原创 2018-08-25 20:12:50 · 132 阅读 · 0 评论 -
Sudoku
http://acm.hdu.edu.cn/showproblem.php?pid=5547问题描述Yi Sima was one of the best counselors of Cao Cao. He likes to play a funny game himself. It looks like the modern Sudoku, but smaller.Actually,...原创 2018-08-19 16:26:03 · 258 阅读 · 0 评论 -
连连看
http://acm.hdu.edu.cn/showproblem.php?pid=1426问题描述“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于我以前没有玩过连连看,咨询了同学的意见...原创 2018-08-16 15:55:13 · 433 阅读 · 0 评论 -
Sudoku Killer
http://acm.hdu.edu.cn/showproblem.php?pid=1426问题描述自从2006年3月10日至11日的首届数独世界锦标赛以后,数独这项游戏越来越受到人们的喜爱和重视。 据说,在2008北京奥运会上,会将数独列为一个单独的项目进行比赛,冠军将有可能获得的一份巨大的奖品———HDU免费七日游外加lcy亲笔签名以及同hdu acm team合影留念的机会。 所...原创 2018-08-16 15:48:36 · 127 阅读 · 0 评论 -
N皇后问题
http://acm.hdu.edu.cn/showproblem.php?pid=2553问题描述在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。...原创 2018-08-16 15:41:06 · 93 阅读 · 0 评论 -
Sticks
http://acm.hdu.edu.cn/showproblem.php?pid=1455问题描述George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the ori...原创 2018-08-16 15:34:55 · 121 阅读 · 0 评论 -
Red and Black
http://acm.hdu.edu.cn/showproblem.php?pid=1312问题描述There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, ...原创 2018-08-17 23:27:10 · 261 阅读 · 0 评论 -
Tempter of the Bone
http://acm.hdu.edu.cn/showproblem.php?pid=1010问题描述The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie cou...原创 2018-08-17 22:38:52 · 205 阅读 · 0 评论 -
漫步校园
问题描述:LL最近沉迷于AC不能自拔,每天寝室、机房两点一线。由于长时间坐在电脑边,缺乏运动。他决定充分利用每次从寝室到机房的时间,在校园里散散步。整个HDU校园呈方形布局,可划分为n*n个小方格,代表各个区域。例如LL居住的18号宿舍位于校园的西北角,即方格(1,1)代表的地方,而机房所在的第三实验楼处于东南端的(n,n)。因有多条路线可以选择,LL希望每次的散步路线都不一样。另外,他考虑从...原创 2018-08-25 21:37:12 · 343 阅读 · 0 评论