上一页 1 ··· 6 7 8 9 10 11 下一页
摘要: 题目链接:http://poj.org/problem?id=3280题目分类:动态规划代码:#include#include#includeusing namespace std;int dp[2002][2002];int main(){ int n, m; scanf("%d %d... 阅读全文
posted @ 2015-11-03 22:37 Gssol 阅读(127) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1530题目分类:最大团问题 DP + DFS代码:#includeusing namespace std;const int V=100;int g[V][V], dp[V], stk[V][V], mx... 阅读全文
posted @ 2015-11-03 00:25 Gssol 阅读(184) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1102题目分类:prim求MST(最小生成树)代码:#includeusing namespace std;const int N=1000;const int inf=0x3f3f3f3f;int vi... 阅读全文
posted @ 2015-11-02 23:55 Gssol 阅读(166) 评论(0) 推荐(0)
摘要: 题目链接:http://codeforces.com/contest/592/problem/B题目分类:数学,找规律题目分析:重要的是画图找规律代码:#includeusing namespace std;#define LL __int64int main(){ LL n; cin>... 阅读全文
posted @ 2015-11-01 10:10 Gssol 阅读(148) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.uestc.edu.cn/#/problem/show/1221题目分类:dfs代码:#includeusing namespace std;bool ok;char maze[15][15];char Map[12][12];bool vis[15][15];int... 阅读全文
posted @ 2015-10-30 22:34 Gssol 阅读(151) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1596题目分类:dijkstra算法错误点:不知道点的范围代码:#includeusing namespace std;#define INF 0x3f3f3f3fconst int maxv=1100;... 阅读全文
posted @ 2015-10-29 22:37 Gssol 阅读(233) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2112题目分类:SPFA算法+map容器错误点:红色标记部分代码:#includeusing namespace std;map mymap;string s1,s2,s3,s4;int ok1,ok2;... 阅读全文
posted @ 2015-10-29 22:34 Gssol 阅读(157) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2066题目分类:dijkstra算法错误点:不知道点的范围代码:#includeusing namespace std;#define INF 10000000const int maxv=2000;in... 阅读全文
posted @ 2015-10-27 23:22 Gssol 阅读(136) 评论(0) 推荐(0)
摘要: 题目链接:http://poj.org/problem?id=3026题意:从S到所有A的最小生成树错误点分析:题意理解;读入n,m的时候后面有很多空格;BFS+最小生成树分类:BFS+最小生成树代码:#include#include#include#include#define MAX 0x3f3... 阅读全文
posted @ 2015-10-27 23:02 Gssol 阅读(173) 评论(0) 推荐(0)
摘要: 题目链接:http://poj.org/problem?id=1979题意:.可以走 #不可以走 @当前位置 求可以到达的位置分类:DFS代码:红色部分容易出错///#include#include#include#includeusing namespace std;#define LL __in... 阅读全文
posted @ 2015-10-25 22:53 Gssol 阅读(153) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 下一页