- 博客(16)
- 资源 (1)
- 收藏
- 关注
转载 【转载】HDU 动态规划(46道题目)倾情奉献~ 【只提供思路与状态转移方程】
Robberies http://acm.hdu.edu.cn/showproblem.php?pid=2955 背包;第一次做的时候把概率当做背包(放大100000倍化为整数):在此范围内最多能抢多少钱 最脑残的是把总的概率以为是抢N家银行的概率之和… 把状态转移
2011-09-04 19:47:26
523
转载 【转载】poj DP题
容易: 1018, 1050, 1083, 1088, 1125, 1143, 1157, 1163, 1178, 1179, 1189, 1208, 1276, 1322, 1414, 1456, 1458, 1609, 1644, 1664, 1690, 1699, 174
2011-09-04 19:46:25
986
原创 poj 2186 Popular Cows (强连通分量 tarjan)
poj 2186 Popular Cows 强连通分量 tarjan http://poj.org/problem?id=2186 #include #include "stdio.h" #include "string.h" using namespace
2011-08-17 14:24:23
411
原创 poj 3714 Raid (类型不同点间的最近点对)
http://poj.org/problem?id=3714 #include "stdio.h" #include "cmath" #include "iostream" #include "algorithm" using namespace std;
2011-08-15 12:08:17
424
原创 hdu 1007 Quoit Design (最近点对、分治)
hdu 1007 Quoit Design (最近点对) http://acm.hdu.edu.cn/showproblem.php?pid=1007 “最近点对”的经典入门题 所用到的思想和“归并排序”类似, 分治再合并。 #include "stdio.h"
2011-08-15 11:14:07
833
转载 【转载】图论题目总结
文章来源: http://hi.baidu.com/studyrush/blog/item/08ba35012c755383d43f7ce2.html 最短路问题 此类问题类型不多,变形较少 POJ 2449 Remmarguts' Date(中等) http://
2011-08-10 17:03:52
650
转载 【转载】POJ 计算几何入门题目推荐
文章来源:http://hi.baidu.com/novosbirsk/blog/item/723a9727a9ab8804918f9dca.html 其实也谈不上推荐,只是自己做过的题目而已,甚至有的题目尚未AC,让在挣扎中。之所以推荐计算几何题,是因为,本人感觉ACM
2011-08-08 19:58:58
398
转载 【转载】有向图强连通分量的Tarjan算法
文章来源:http://www.byvoid.com/blog/scc-tarjan/ [有向图强连通分量] 在有向图G中,如果两个顶点间至少存在一条路径,称两个顶点强连通(strongly connected)。如果有向图G的每两个顶点都强连通,称G是一个强连通图。非强连通
2011-08-08 09:40:13
499
原创 poj 1041 John's trip(欧拉回路入门题)
经典的欧拉回路题 http://poj.org/problem?id=1041 欧拉回路:每条边经过一次且仅一次的称为欧拉回路(euler cycle, euler circuit)。 存在欧拉回路的充要条件:每个点的度数都是偶数, 且图连通。 #include "
2011-08-04 18:56:40
969
原创 poj 3267 The Cow Lexicon(动规)
http://poj.org/problem?id=3267 #include "stdio.h" #include "iostream" #include "string.h" using namespace std; char dict[610][30]; /
2011-08-04 11:59:07
408
原创 hdu 1754 I Hate It (线段树入门题、求区间段的最大值)
http://acm.hdu.edu.cn/showproblem.php?pid=1754 线段树入门题:求区间段的最大值 #include "iostream" #include "stdio.h" using namespace std; const int
2011-08-02 18:18:09
523
原创 poj 1129 Channel Allocation (四色定理)
http://poj.org/problem?id=1129 四色定理 #include "stdio.h" #include "iostream" #include "cstring" using namespace std; bool g[27][27];
2011-08-02 16:27:50
459
原创 poj 1164 The Castle (dfs)
http://poj.org/problem?id=1164 提交的时候正遇oj挂了,害我白白错了几次,却不知情。。。 #include "iostream" #include "stdio.h" #include "string.h" using namespa
2011-08-02 16:24:15
724
原创 poj 2395 Out of Hay、2485 Highways(求最小生成树的最长边)
两道题都是求最小生成树的最长边。 poj 2395 Out of Hay http://poj.org/problem?id=2395 kruskal实现: #include "stdio.h" #include "string.h" #include "algo
2011-08-02 11:14:16
619
原创 poj 1511 Invitation Cards (SPFA、邻接表)
第一次写SPFA,小激动一下。。。 #include "iostream" #include "stdio.h" #include "queue" #include "string.h" using namespace std; const int MAX = 1
2011-08-02 09:58:45
494
转载 【转载】最短路径之SPFA算法
求最短路径的算法有许多种,除了排序外,恐怕是OI界中解决同一类问题算法最多的了。最熟悉的无疑是Dijkstra,接着是Bellman-Ford,它们都可以求出由一个源点向其他各点的最短路径;如果我们想要求出每一对顶点之间的最短路径的话,还可以用Floyd-Warshall。 S
2011-08-01 14:48:23
1054
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅