上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4039题目分类:字符串+bfs题意:给一个人际关系图,根据关系图,给一个人推荐一个人认识题目分析:根据样例画出的关系图代码:#includeusing namespace std;const int N=... 阅读全文
posted @ 2015-11-13 00:02 Gssol 阅读(221) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4034题目分类:图论题意:n个顶点,然后给出从i到j的最短路径长度,求至少需要哪些边第二组样例第三组样例:题目分析:判断 a[i][j]==a[i][k]+a[k][j](详看代码)代码:#include... 阅读全文
posted @ 2015-11-12 22:18 Gssol 阅读(164) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4442题意:去体检,求做完所有检查所花费的最小时间模上一个数 花费的时间规则如下 有n项活动,每项活动有两个数字 a b a代表现在去排队所花费的时间 b代表每一秒该活动需要等待的时间是多b秒... 阅读全文
posted @ 2015-11-12 15:50 Gssol 阅读(125) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.sgu.ru/problem.php?contest=0&problem=275http://acm.hust.edu.cn/vjudge/contest/view.action?cid=98837#problem/A题目分类:高斯消元题意:给定n个数,从中选择任意个... 阅读全文
posted @ 2015-11-10 23:30 Gssol 阅读(396) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=98837#problem/I题意:给定一些数,求这些数中异或值最大的值分析:每个数都可以写成二进制,可以建立一颗字典树#includeusing namespace std;#de... 阅读全文
posted @ 2015-11-10 23:14 Gssol 阅读(1403) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5115题目分类:区间dp题意:有n只狼,每只狼有两种属性,一种攻击力一种附加值,我们没杀一只狼,那么我们受到的伤害值为这只狼的攻击值与它旁边的两只狼的附加值的和,求把所有狼都杀光受到的最小的伤害值。题目分... 阅读全文
posted @ 2015-11-10 21:05 Gssol 阅读(165) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5122题目分类:思维题题意:n个数字,将它变成一个升序序列需要变换几次,几个例子深入理解52 3 4 5 1(4)3 4 1 5 2(3)题目分析:最先想的是直接两重循环来做,超时 后来想可能是最长上升子... 阅读全文
posted @ 2015-11-10 20:57 Gssol 阅读(151) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5113题目分类:dfs题意:N M K N*M的棋盘 K种颜色 接下来K个数字分别代表每种颜色的数目 要求 相邻的格子的颜色不能相同,输出一种方案就好题目分析:因为N和M的范围比较小,而且找到一种就好,... 阅读全文
posted @ 2015-11-10 20:40 Gssol 阅读(240) 评论(0) 推荐(0)
摘要: 题目链接:http://poj.org/problem?id=2479题目分类:动态规划代码:#include#include#include#includeusing namespace std;int a[50000+100];int s[50000+100];int main(){ //... 阅读全文
posted @ 2015-11-08 15:23 Gssol 阅读(150) 评论(0) 推荐(0)
摘要: 题目链接:http://poj.org/problem?id=2392题目分类:动态规划代码:#include#include#include#include#includeusing namespace std;#define INF 0x3f3f3f3fint n;bool f[40010];i... 阅读全文
posted @ 2015-11-08 15:21 Gssol 阅读(193) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页