- 博客(9)
- 收藏
- 关注
原创 Shuffle'm Up
算法:BFS(简单)A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips, S1 and S2, each stack containing
2016-01-10 16:49:07 190
原创 非常可乐
算法:广搜思路:六种情况s-m;s-n;n-m;n-s;m-s;m-n;大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (SInp
2016-01-04 17:11:32 207
原创 uva Fire!
算法:BFSJoe works in a maze. Unfortunately, portions of the maze havecaught on fire, and the owner of the maze neglected to create a fireescape plan. Help Joe escape the maze.Given Joe’s locatio
2016-01-03 18:12:55 291
原创 Dungeon Master
算法:广搜(BFS);DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to
2016-01-03 16:41:34 206
原创 Catch That Cow
算法:BFSFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K
2016-01-03 13:25:24 171
原创 Prime Path
算法:深搜The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices.— It is a mat
2016-01-03 12:24:02 173
原创 Find The Multiple
算法:深搜(水题);Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than 2
2016-01-03 11:02:29 198
原创 hdu Find a way
算法:深搜;DescriptionPass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki.Yifen
2016-01-02 20:40:41 232
原创 棋盘问题
算法:简单搜索在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n 当为-1 -1
2016-01-01 14:04:39 243
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人