03 2016 档案

摘要:Problem DescriptionAngel wascaught by the MOLIGPY! He was put in prison by Moligpy. The prisonis described as a N * M (N, M t>other.t; }};int vi... 阅读全文
posted @ 2016-03-30 22:13 勿忘初心0924 阅读(162) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionAngel wascaught by the MOLIGPY! He was put in prison by Moligpy. The prisonis described as a N * M (N, M t>other.t; }};int vi... 阅读全文
posted @ 2016-03-30 22:13 勿忘初心0924 阅读(159) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionThere is arectangular room, covered with square tiles. Each tile is coloredeither red or black. A man is standing on a black til... 阅读全文
posted @ 2016-03-29 22:40 勿忘初心0924 阅读(181) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionInhabitants ofthe Wonderland have decided to hold a regional programming contest.The Judging Committee has volunteered and has p... 阅读全文
posted @ 2016-03-28 23:07 勿忘初心0924 阅读(196) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionInhabitants ofthe Wonderland have decided to hold a regional programming contest.The Judging Committee has volunteered and has p... 阅读全文
posted @ 2016-03-28 23:07 勿忘初心0924 阅读(142) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionIn atwo-dimensional plane there are two line belts, there are twosegments AB and CD, lxhgww's speed on AB is P and on CD is Q, h... 阅读全文
posted @ 2016-03-28 17:38 勿忘初心0924 阅读(136) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionIn atwo-dimensional plane there are two line belts, there are twosegments AB and CD, lxhgww's speed on AB is P and on CD is Q, h... 阅读全文
posted @ 2016-03-28 17:38 勿忘初心0924 阅读(264) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionTheGeoSurvComp geologic survey company is responsible for detectingunderground oil deposits. GeoSurvComp works with one largerec... 阅读全文
posted @ 2016-03-27 22:59 勿忘初心0924 阅读(110) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionTheGeoSurvComp geologic survey company is responsible for detectingunderground oil deposits. GeoSurvComp works with one largerec... 阅读全文
posted @ 2016-03-27 22:59 勿忘初心0924 阅读(131) 评论(0) 推荐(0) 编辑
摘要:Problem Description大家一定觉的运动以后喝可乐是一件很惬意的事情,但是see you却不这么认为。因为每次当see you买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和see you一样多。但see you的手中只有两个杯子,它们的容量分别是N 毫... 阅读全文
posted @ 2016-03-27 22:50 勿忘初心0924 阅读(145) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionMr. Westbought a new car! So he is travelling around the city.One day he comes to a vertical corner. The street he is currentlyi... 阅读全文
posted @ 2016-03-26 11:29 勿忘初心0924 阅读(184) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionMr. Westbought a new car! So he is travelling around the city.One day he comes to a vertical corner. The street he is currentlyi... 阅读全文
posted @ 2016-03-26 11:29 勿忘初心0924 阅读(131) 评论(0) 推荐(0) 编辑
摘要:递归思想来进行全排列是最接近人的思维的,例如对a, b , c,进行全排列第一轮是a**,b**,c**,第二轮是ab*,ba*, c b*,就是轮番把一个数固定在首位,然后剩下几位进行枚举;代码:#includeusing namespace std;int total = 0;//交换函数... 阅读全文
posted @ 2016-03-24 23:07 勿忘初心0924 阅读(160) 评论(0) 推荐(0) 编辑
摘要:递归思想来进行全排列是最接近人的思维的,例如对a, b , c,进行全排列第一轮是a**,b**,c**,第二轮是ab*,ba*, c b*,就是轮番把一个数固定在首位,然后剩下几位进行枚举;代码:#includeusing namespace std;int total = 0;//交换函数... 阅读全文
posted @ 2016-03-24 23:07 勿忘初心0924 阅读(135) 评论(0) 推荐(0) 编辑
摘要:二分: 三分搜索" title="二分 三分搜索">最经典的就是二分求方程解,以上这个图(原创)R是根处,x1,x2是去的两个边,另x=(x1+x2)/2;f(x)Array[mid]) left=mid+1; } return -1; //找不到就返回-1}三分: ... 阅读全文
posted @ 2016-03-24 22:35 勿忘初心0924 阅读(158) 评论(0) 推荐(0) 编辑
摘要:二分: 三分搜索" title="二分 三分搜索">最经典的就是二分求方程解,以上这个图(原创)R是根处,x1,x2是去的两个边,另x=(x1+x2)/2;f(x)Array[mid]) left=mid+1; } return -1; //找不到就返回-1}三分: ... 阅读全文
posted @ 2016-03-24 22:35 勿忘初心0924 阅读(122) 评论(0) 推荐(0) 编辑
摘要:贪心正如这个名字一样,算法一定要贪心,换句话说就是不能吃亏,寻找最优解,比如:田忌赛马,每一场赛马都是一个局部问题,每一次赛马,先将田忌的马和大王的马相比较,能跑过就跑,跑不过就用最次的马和他比,反正不能吃亏;一般的格式:1,按照一定的顺序将所给问题排序;2,从头开始一个个问题思考,每个问题都... 阅读全文
posted @ 2016-03-24 22:29 勿忘初心0924 阅读(103) 评论(0) 推荐(0) 编辑
摘要:贪心正如这个名字一样,算法一定要贪心,换句话说就是不能吃亏,寻找最优解,比如:田忌赛马,每一场赛马都是一个局部问题,每一次赛马,先将田忌的马和大王的马相比较,能跑过就跑,跑不过就用最次的马和他比,反正不能吃亏;一般的格式:1,按照一定的顺序将所给问题排序;2,从头开始一个个问题思考,每个问题都... 阅读全文
posted @ 2016-03-24 22:29 勿忘初心0924 阅读(163) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionThe recreationcenter of WHU ACM Team has indoor billiards, Ping Pang, chess andbridge, toxophily, deluxe ballrooms KTV rooms, fi... 阅读全文
posted @ 2016-03-24 22:18 勿忘初心0924 阅读(145) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionThe recreationcenter of WHU ACM Team has indoor billiards, Ping Pang, chess andbridge, toxophily, deluxe ballrooms KTV rooms, fi... 阅读全文
posted @ 2016-03-24 22:18 勿忘初心0924 阅读(254) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionMy birthday iscoming up and traditionally I'm serving pie. Not just one pie, no,I have a number N of them, of various tastes and... 阅读全文
posted @ 2016-03-23 22:20 勿忘初心0924 阅读(221) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionMy birthday iscoming up and traditionally I'm serving pie. Not just one pie, no,I have a number N of them, of various tastes and... 阅读全文
posted @ 2016-03-23 22:20 勿忘初心0924 阅读(190) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionNow, here is afuction: F(x) = 6 *x^7+8*x^6+7*x^3+5*x^2-y*x (0 0) x2=x; } } } return 0;}... 阅读全文
posted @ 2016-03-23 14:47 勿忘初心0924 阅读(136) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionNow, here is afuction: F(x) = 6 *x^7+8*x^6+7*x^3+5*x^2-y*x (0 0) x2=x; } } } return 0;}... 阅读全文
posted @ 2016-03-23 14:47 勿忘初心0924 阅读(271) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionNow,given theequation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find itssolution between 0 and 100;Now please try your lucky.... 阅读全文
posted @ 2016-03-22 21:55 勿忘初心0924 阅读(98) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionNow,given theequation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find itssolution between 0 and 100;Now please try your lucky.... 阅读全文
posted @ 2016-03-22 21:55 勿忘初心0924 阅读(215) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionA有1数m,B来猜.B每猜一次,A就说"太大","太小"或"对了" 。问B猜n次可以猜到的最大数。 Input第1行是整数T,表示有T组数据,下面有T行每行一个整数n (1 ≤ n ≤ 30) Output猜n次可以猜到的最大数 Sample Input2... 阅读全文
posted @ 2016-03-22 21:17 勿忘初心0924 阅读(196) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionA有1数m,B来猜.B每猜一次,A就说"太大","太小"或"对了" 。问B猜n次可以猜到的最大数。 Input第1行是整数T,表示有T组数据,下面有T行每行一个整数n (1 ≤ n ≤ 30) Output猜n次可以猜到的最大数 Sample Input2... 阅读全文
posted @ 2016-03-22 21:17 勿忘初心0924 阅读(207) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionA relay is arace for two or more teams of runners. Each member of a team runsone section of the race. Your task is to help to ev... 阅读全文
posted @ 2016-03-21 17:30 勿忘初心0924 阅读(129) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionA relay is arace for two or more teams of runners. Each member of a team runsone section of the race. Your task is to help to ev... 阅读全文
posted @ 2016-03-21 17:30 勿忘初心0924 阅读(113) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionAssume thecoasting is an infinite straight line. Land is in one side ofcoasting, sea in the other. Each small island is a point ... 阅读全文
posted @ 2016-03-21 16:43 勿忘初心0924 阅读(162) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionAssume thecoasting is an infinite straight line. Land is in one side ofcoasting, sea in the other. Each small island is a point ... 阅读全文
posted @ 2016-03-21 16:43 勿忘初心0924 阅读(194) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionBefore bridgeswere common, ferries were used to transport cars across rivers.River ferries, unlike their larger cousins, run on ... 阅读全文
posted @ 2016-03-21 16:29 勿忘初心0924 阅读(155) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionBefore bridgeswere common, ferries were used to transport cars across rivers.River ferries, unlike their larger cousins, run on ... 阅读全文
posted @ 2016-03-21 16:29 勿忘初心0924 阅读(106) 评论(0) 推荐(0) 编辑
摘要:ProblemDescriptionThe cows have purchased a yogurtfactory that makes world-famous Yucky Yogurt. Over the next N (1* Lines 2..N+1: Line i+1contains ... 阅读全文
posted @ 2016-03-20 18:31 勿忘初心0924 阅读(132) 评论(0) 推荐(0) 编辑
摘要:ProblemDescriptionThe cows have purchased a yogurtfactory that makes world-famous Yucky Yogurt. Over the next N (1* Lines 2..N+1: Line i+1contains ... 阅读全文
posted @ 2016-03-20 18:31 勿忘初心0924 阅读(183) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionAccounting forComputer Machinists (ACM) has sufferred from the Y2K bug and lostsome vital data for preparing annual report for M... 阅读全文
posted @ 2016-03-19 22:07 勿忘初心0924 阅读(165) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionThe local toy store sells smallfingerpainting kits with between three and twelve 50ml bottles ofpaint, each a different color. T... 阅读全文
posted @ 2016-03-19 15:06 勿忘初心0924 阅读(129) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionThe local toy store sells smallfingerpainting kits with between three and twelve 50ml bottles ofpaint, each a different color. T... 阅读全文
posted @ 2016-03-19 15:06 勿忘初心0924 阅读(107) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionA factoryproduces products packed in square packets of the same height h andof the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These pro... 阅读全文
posted @ 2016-03-18 08:57 勿忘初心0924 阅读(126) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionA factoryproduces products packed in square packets of the same height h andof the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These pro... 阅读全文
posted @ 2016-03-18 08:57 勿忘初心0924 阅读(121) 评论(0) 推荐(0) 编辑
摘要:Problem Description"Yakexi, thisis the best age!" Dong MW works hard and get high pay, he has many1 Jiao and 5 Jiao banknotes(纸币), some day he went... 阅读全文
posted @ 2016-03-17 19:58 勿忘初心0924 阅读(146) 评论(0) 推荐(0) 编辑
摘要:Problem Description"Yakexi, thisis the best age!" Dong MW works hard and get high pay, he has many1 Jiao and 5 Jiao banknotes(纸币), some day he went... 阅读全文
posted @ 2016-03-17 19:58 勿忘初心0924 阅读(147) 评论(0) 推荐(0) 编辑
摘要:理论文字来源于网络给定n个权值作为n个叶子结点,构造一棵二叉树,若带权路径长度达到最小,称这样的二叉树为最优二叉树,也称为哈夫曼树(Huffmantree)。1、路径和路径长度在一棵树中,从一个结点往下可以达到的孩子或子孙结点之间的通路,称为路径。通路中分支的数目称为路径长度。若规定根结点的层... 阅读全文
posted @ 2016-03-17 08:18 勿忘初心0924 阅读(256) 评论(0) 推荐(0) 编辑
摘要:理论文字来源于网络给定n个权值作为n个叶子结点,构造一棵二叉树,若带权路径长度达到最小,称这样的二叉树为最优二叉树,也称为哈夫曼树(Huffmantree)。1、路径和路径长度在一棵树中,从一个结点往下可以达到的孩子或子孙结点之间的通路,称为路径。通路中分支的数目称为路径长度。若规定根结点的层... 阅读全文
posted @ 2016-03-17 08:18 勿忘初心0924 阅读(260) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionAn entropy encoder is a data encodingmethod that achieves lossless data compression by encoding amessage with “wasted” or “extra... 阅读全文
posted @ 2016-03-16 23:20 勿忘初心0924 阅读(203) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionAn entropy encoder is a data encodingmethod that achieves lossless data compression by encoding amessage with “wasted” or “extra... 阅读全文
posted @ 2016-03-16 23:20 勿忘初心0924 阅读(128) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionHere is a famous story in Chinesehistory."That was about 2300 years ago. General Tian Ji was a high officialin the country Qi. H... 阅读全文
posted @ 2016-03-16 12:35 勿忘初心0924 阅读(179) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionHere is a famous story in Chinesehistory."That was about 2300 years ago. General Tian Ji was a high officialin the country Qi. H... 阅读全文
posted @ 2016-03-16 12:35 勿忘初心0924 阅读(126) 评论(0) 推荐(0) 编辑
摘要:题意:FJ养牛,他想知道中间的牛是那一头;思路:这道题有点水,思路就不写了#include#include#include#define maxn 10005using namespace std;bool comp(int a,int b){ returna}int ans[maxn]... 阅读全文
posted @ 2016-03-13 17:54 勿忘初心0924 阅读(94) 评论(0) 推荐(0) 编辑
摘要:题意:FJ养牛,他想知道中间的牛是那一头;思路:这道题有点水,思路就不写了#include#include#include#define maxn 10005using namespace std;bool comp(int a,int b){ returna}int ans[maxn]... 阅读全文
posted @ 2016-03-13 17:54 勿忘初心0924 阅读(140) 评论(0) 推荐(0) 编辑
摘要:题意:看电视,计算出最多看多少个电视,已给出电视起始终止时间;解体思路:思路这个题拿到手没多想,上课的例题,就照葫芦画瓢写了一个;感悟:虽然刚开始学贪心,第一遍代码就AC了有点小小的成就感;代码(G++ 0MS)#include#include#includeusing namespace s... 阅读全文
posted @ 2016-03-13 16:25 勿忘初心0924 阅读(115) 评论(0) 推荐(0) 编辑
摘要:题意:看电视,计算出最多看多少个电视,已给出电视起始终止时间;解体思路:思路这个题拿到手没多想,上课的例题,就照葫芦画瓢写了一个;感悟:虽然刚开始学贪心,第一遍代码就AC了有点小小的成就感;代码(G++ 0MS)#include#include#includeusing namespace s... 阅读全文
posted @ 2016-03-13 16:25 勿忘初心0924 阅读(107) 评论(0) 推荐(0) 编辑