随笔分类 - 搜索(BFS DFS)
摘要:Curling 2.0Time Limit:1000MSMemory Limit:65536KTotal Submissions:8047Accepted:3332DescriptionOn Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on which a square mesh is marked. The
        阅读全文
                
摘要:SticksTime Limit:1000MSMemory Limit:10000KTotal Submissions:106254Accepted:24234DescriptionGeorge 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 original state, but he forgot how many sticks he had originally an
        阅读全文
                
摘要:PotsTime Limit:1000MSMemory Limit:65536KTotal Submissions:7783Accepted:3261Special JudgeDescriptionYou are given two pots, having the volume ofAandBliters respectively. The following operations can be performed:FILL(i) fill the poti(1 ≤i≤ 2) from the tap;DROP(i) empty the potito the drain;POUR(i,j) 
        阅读全文
                
摘要:1489: 数字排列http://www.acmore.net/problem.php?id=1489Time Limit:1 SecMemory Limit:128 MBSubmit:213Solved:77SubmitStatusWeb BoardDescription小Y得到了一个数,他认为相邻位上的数字与数字之间会产生不良影响,比如123,1和2之间产生一个不良影响值,2和3之间产生一个不良影响值。现在他想调整这个数每位的数字的顺序,使得最终得到的数的总的不良影响值最小,且没有前导0。Input输入数据的第一行为T表示有T组数据。每组数据先输入一个整数n(0#include#inclu
        阅读全文
                
摘要:Digital SquareTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 649Accepted Submission(s): 297 Problem DescriptionGiven an integer N,you should come up with the minimumnonnegativeinteger M.M meets the follow condition: M2%10x=N (x=0,1,2,3....)InputT
        阅读全文
                
摘要:RailroadTime Limit : 4000/2000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 16Accepted Submission(s) : 13Problem DescriptionA train yard is a complex series of railroad tracks for storing, sorting, or loading/unloading railroad cars. In this problem, the railroad track
        阅读全文
                
摘要:漫步校园Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 41Accepted Submission(s) : 14Problem DescriptionLL最近沉迷于AC不能自拔,每天寝室、机房两点一线。由于长时间坐在电脑边,缺乏运动。他决定充分利用每次从寝室到机房的时间,在校园里散散步。整个HDU校园呈方形布局,可划分为n*n个小方格,代表各个区域。例如LL居住的18号宿舍位于校园的西北角,即方格(1,1)代表的地方,而机房所在的第三实验楼处于
        阅读全文
                
摘要:EightTime Limit:1000MSMemory Limit:65536KTotal Submissions:19839Accepted:8834Special JudgeDescriptionThe 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 sliding tiles, each with a number from 1 to 15 on it, and a
        阅读全文
                
摘要:Ignatius and the Princess ITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 8405Accepted Submission(s): 2499 Special JudgeProblem DescriptionThe Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Prince
        阅读全文
                
摘要:RescueTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 10446Accepted Submission(s): 3828 Problem DescriptionAngel 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 WALL
        阅读全文
                
摘要:ZipperTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4575Accepted Submission(s): 1629 Problem DescriptionGiven three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. The fi
        阅读全文
                
摘要:棋盘问题Time Limit : 2000/1000ms (Java/Other)Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 5Accepted Submission(s) : 3Problem Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个
        阅读全文
                
摘要:胜利大逃亡(续)Time Limit : 4000/2000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 5Accepted Submission(s) : 4Problem DescriptionIgnatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)……这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的门,钥匙藏在地牢另外的某些地方。刚开始Ignatius被关在(sx,sy)的位置,离开地牢的门在(ex,ey)的位置。Ignatiu
        阅读全文
                
摘要:Tempter of the BoneTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 3Accepted Submission(s) : 1Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he
        阅读全文
                
摘要:变形课Time Limit : 2000/1000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 4Accepted Submission(s) : 3Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem Description呃......变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形咒语的一个统一规律:如果咒语是以a开头b结尾的一个单词,
        阅读全文
                
摘要:Fire NetTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 1Accepted Submission(s) : 1Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionSuppose that we have a square city with straight streets. A map of a city is a square board with n 
        阅读全文
                
摘要:The Pilots Brothers' refrigeratorTime Limit:1000MSMemory Limit:65536KTotal Submissions:14076Accepted:5275Special JudgeDescriptionThe game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a refrigerator.There are 16 handles on the refrigerator door. Ev
        阅读全文
                
摘要:Flip GameTime Limit:1000MSMemory Limit:65536KTotal Submissions:22492Accepted:9717DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other one is black and each piece is lying either it's black 
        阅读全文
                
摘要:非常可乐http://acm.hdu.edu.cn/showproblem.php?pid=1495Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2662 Accepted Submission(s): 1085 Problem Description大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多
        阅读全文
                
摘要:Knight Moveshttp://acm.hdu.edu.cn/showproblem.php?pid=1372Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3908 Accepted Submission(s): 2432 Problem DescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are t
        阅读全文
                
 
                    
                
 浙公网安备 33010602011771号
浙公网安备 33010602011771号