- 博客(17)
- 资源 (2)
- 收藏
- 关注
原创 搜索总结
这一章主要是二分三分dfsbfs这四个算法 写这几个算法或多或少总有点套路的感觉这一类题都有一定的规律 二分三分一个分解判定条件上界下届不断分 dfs按照某种方法一层一层的延伸下去找到结果返回 找不到结果在往下一种 bfs是相对最难理解的 利用队列来存储
2016-04-24 23:05:09 222
原创 Red and Black
Problem Description 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, he can move to one of four adja
2016-04-24 20:35:21 283
原创 Line belt
Total Submission(s) : 59 Accepted Submission(s) : 18 Problem Description In a two-dimensional plane there are two line belts, there are two segments AB and CD, lxhgww's speed on AB is P and on
2016-04-22 16:51:00 383
原创 Oil Deposits
Problem Description The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates
2016-04-22 16:41:50 226
原创 非常可乐
roblem Description 大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S<101)毫升 (正好装满一瓶) ,它们三个之间可以相互倒可乐 (都
2016-04-22 16:38:40 383
原创 Prime Ring Problem
Problem Description A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime.N
2016-04-18 18:33:10 205
原创 Knight Moves
Problem Description 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
2016-04-18 17:06:30 280
原创 8皇后
Problem Description 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input 共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。 Output 共有若干行,每行一个正整数,表示
2016-04-18 16:54:17 229
原创 A strange lift
Problem Description There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: up and down.W
2016-04-18 16:14:55 177
原创 Toxophily
Problem Description The recreation center of WHU ACM Team has indoor billiards, Ping Pang, chess and bridge, toxophily, deluxe ballrooms KTV rooms, fishing, climbing, and so on.We all like toxophily.
2016-04-15 18:41:49 320
原创 pi
Problem Description My birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to
2016-04-12 19:41:13 253
原创 Turn the corner
Problem Description Mr. West bought a new car! So he is travelling around the city.One day he comes to a vertical corner. The street he is currently in has a width x, the street he wants to turn to h
2016-04-10 22:25:31 355
原创 H2
Problem Description A有1数m,B来猜.B每猜一次,A就说"太大","太小"或"对了" 。 问B猜n次可以猜到的最大数。 Input 第1行是整数T,表示有T组数据,下面有T行 每行一个整数n (1 ≤ n ≤ 30) Output 猜n次可以猜到的最大数 Sample I
2016-04-06 22:13:19 339
原创 B2
Problem Description Now, here is a fuction: F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 <= x <=100)Can you find the minimum value when x is between 0 and 100. Input The first line
2016-04-06 21:59:56 273
原创 A2
Can you solve this equation? Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 91 Accepted Submission(s) : 30 Problem Description Now,given t
2016-04-06 21:33:49 261
原创 R
Problem Description A factory produces products packed in square packets of the same height h and of the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are always delivered to customers in the sq
2016-04-05 17:52:15 227
原创 贪心算法总结
贪心算法听课的时候本着一重循环排序,找到局部最优解,循环一次由局部最优过渡到整体最优,这种单一的模式,后来做到田忌赛马问题开始发现贪心并不只是一个循环来解决的问题思想,他更多的应该更加强调的是寻找局部最优解由局部最优的最优即为最终解的过程(不一定要用到循环也不一定只用一次循环),其中主要的几种题型,背包问题、木棒问题、节目问题、时间等待分配问题(最基本的用for循环),寻找最优策略问题(田忌赛马,
2016-04-05 17:24:09 255
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人