上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 42 下一页
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5124就是有n条在x轴的线段,给你线段的左右端点,每条线段都会覆盖点,求出最多被覆盖多少次;#include#include#include#include#includeusing namespace ... Read More
posted @ 2015-11-07 21:21 西瓜不懂柠檬的酸 Views(135) Comments(0) Diggs(0)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1950 一直只知道有除n*n的算法之外的求LIS,但是没学过,也没见过,今天终于学了一下,dp[i]表示以a[i]为末尾的最长上升子序列的长度; 其实就是下面大神写的这样: #include<stdio. Read More
posted @ 2015-11-07 10:34 西瓜不懂柠檬的酸 Views(244) Comments(0) Diggs(0)
题目链接:http://poj.org/problem?id=1661下图是左边的,右边的同理:#include#include#include#includeusing namespace std;#define N 1100#define INF 0xffffffstruct node{ ... Read More
posted @ 2015-11-06 19:44 西瓜不懂柠檬的酸 Views(132) Comments(0) Diggs(0)
生活是我们自己的事情,未来的路该去向何方,需要我们自己做出选择,别人都只是过客。 故事只有在成为故事的时候,才是最可爱的,如果把它还原成现实,那么我们会突然找不到原来诗意的感觉和朦胧的美! 有时候,我们喜欢把自己的生活当成一个故事,我们都是活在故事里的人,我们也都是有故事的人,或许在故事里,我们会更 Read More
posted @ 2015-11-05 22:43 西瓜不懂柠檬的酸 Views(170) Comments(0) Diggs(0)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2859 题意就是给你一个n*n的字符矩阵,从中选出一个最大的子矩阵(m*m)满足关于斜对角线(左下角到右上角)对称,求出这个矩阵的大小m; 我们可以用dp[i][j]表示当前位置到右上角这个子矩阵所能表示 Read More
posted @ 2015-11-04 15:42 西瓜不懂柠檬的酸 Views(914) Comments(0) Diggs(1)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1078题意就是有n*n的地图,每个地方都有食物,数量不同,老鼠在(0,0)的位置每次它最多跳 k 步,每次吃只能吃比当前位置食物多的食物,求最大值;#include#include#include#inc... Read More
posted @ 2015-11-04 11:13 西瓜不懂柠檬的酸 Views(163) Comments(0) Diggs(0)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1160题意就是给你一些老鼠(编号1,2,3,4,5,6,7,8...)的体重和他们的速度然后求出最大的n满足W[m[1]] S[m[2]] > ... > S[m[n]]然后把原来的编号按照上面的序列输... Read More
posted @ 2015-11-01 11:33 西瓜不懂柠檬的酸 Views(130) Comments(0) Diggs(0)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1260题意是有n个人排队买票,第 i 个人买票所需要的时间是a[i],这个人和 i-1 或者 i+1 合买的时间是b[i];当然每个人都要等到前面所有的人都买完了才能买,我们求所需总时间至少是多少,工作人... Read More
posted @ 2015-10-29 14:54 西瓜不懂柠檬的酸 Views(142) Comments(0) Diggs(0)
题目链接:http://codeforces.com/problemset/problem/7/CAX+BY=C已知 A B C 求 X Y;#include #include #include #include using namespace std;typedef long long LL;LL... Read More
posted @ 2015-10-29 13:23 西瓜不懂柠檬的酸 Views(217) Comments(0) Diggs(0)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1114题意是有一个存钱罐,当它是空的时候重量为E,满的时候重量为F;已知存钱罐里面有 n 种钱,每种钱的价值为 P 重量为 W ;求存钱罐满的时候里面至少有多少钱;是一个完全背包(求从n个物品中选出总重量... Read More
posted @ 2015-10-29 10:34 西瓜不懂柠檬的酸 Views(230) Comments(0) Diggs(0)
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 42 下一页
levels of contents