上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页
摘要: 题目链接: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 阅读(142) 评论(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 阅读(229) 评论(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 阅读(138) 评论(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 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 从电视到电影,从小说到现实,小三是永远的情节助推器,是出锅前撒下的葱花,让平淡的日子刹那间活色生香充满话题。每一部家庭肥皂剧横空出世,观众马上结成不同的阵营,有人挺老公不易,有人替老婆委屈,有人骂婆婆就是个烦人精,有人说事儿都TM坏在丈母娘身上了……为什么?因为众生皆苦,家庭中的成员都在做自己认为对 阅读全文
posted @ 2015-11-06 23:45 Gssol 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=3666题目分类:动态规划代码:#include#include#include#include#includeusing namespace std;//用dp[i][j]表示:前i个数构成的序列,这个序列最大值为j,dp[i][j]的... 阅读全文
posted @ 2015-11-06 23:33 Gssol 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1631题目分类:动态规划代码:#include#include#include#include#includeusing namespace std;#define INF 0x3f3f3f3fint n;int a[50500];in... 阅读全文
posted @ 2015-11-06 23:30 Gssol 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1065题目分类:动态规划代码:#include#include#include#include#includeusing namespace std;#define INF 0x3f3f3f3fint n;int visit[5050]... 阅读全文
posted @ 2015-11-06 23:25 Gssol 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=3046题目分类:动态规划+滚动数组优化代码:#include#include#include#includeusing namespace std;int s[2000];int dp[3][100086];int main(){ ... 阅读全文
posted @ 2015-11-05 21:06 Gssol 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1287题目分类:最小生成树代码://#include#include#include#includeusing namespace std;const int V=200;#define INF 0x3f3f3f3fint cost[V... 阅读全文
posted @ 2015-11-05 00:08 Gssol 阅读(125) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页