码迷,mamicode.com
首页 >  
搜索关键字:模板题    ( 2197个结果
Ural 1982 Electrification Plan (prim最小生成树)
很明显的最小生成树模板题 #include using namespace std; int n,k,a; int dist[120],m[120][120]; bool p[120]; void prim() { for(int i=1;i<=n;i++) { if(p[i]==false) { int Min=10002...
分类:其他好文   时间:2014-08-12 13:47:24    阅读次数:174
划分树模板题
原题http://acm.hdu.edu.cn/showproblem.php?pid=4251 The Famous ICPC Team Again Time Limit: 30000/15000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 822    Accepte...
分类:其他好文   时间:2014-08-12 13:46:24    阅读次数:362
FZU_Problem 2171 防守阵地 II
http://acm.fzu.edu.cn/problem.php?pid=2171 线段树模板题,成段增减,区间求和。 思路:先查询,后更新。   #include #define lson l , m ,rt << 1 #define rson m+1 , r , rt << 1 | 1 const int maxn = 100002; int add[maxn << 2]; in...
分类:其他好文   时间:2014-08-11 18:01:42    阅读次数:214
划分树模板题
原题http://poj.org/problem?id=2104 K-th Number Time Limit: 20000MS   Memory Limit: 65536K Total Submissions: 37130   Accepted: 11974 Case Time Limit: 2000MS Description ...
分类:其他好文   时间:2014-08-11 17:57:42    阅读次数:233
Dijkstra模板题图论书p133
#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define maxn 1000 #define INF 100000000 int edge[...
分类:其他好文   时间:2014-08-11 17:57:32    阅读次数:197
HDU 3007
基本小圆覆盖模板题#include #include #include using namespace std;int X,Y; int n;const double eps=0.00000001;struct point{ double x,y;}p[550]; struct Circle{...
分类:其他好文   时间:2014-08-11 14:25:02    阅读次数:228
POJ--3164--Command Network【朱刘算法】最小树形图
链接:http://poj.org/problem?id=3164 题意:告诉n个点坐标,m条边表示两个点之间有路,从1点开始建立一个有向图最小生成树。 朱刘算法模板题 ========================== 分割线之下摘自Sasuke_SCUT的blog================================================== 最 小树形图,就是给...
分类:Web程序   时间:2014-08-10 15:41:50    阅读次数:203
hdu 3549 Flow Problem(最大流模板题)
hdu 3549 Flow Problem(最大流模板题)...
分类:其他好文   时间:2014-08-10 10:26:20    阅读次数:237
最长回文
hdu3068:http://acm.hdu.edu.cn/showproblem.php?pid=3068题意:给你一个字符串,求最长的回文串的长度。题解:第一次,接触Manacher算法,这是一个模板题。 1 #include 2 #include 3 #include 4 #include 5...
分类:其他好文   时间:2014-08-09 13:17:47    阅读次数:260
字典树模板题 POJ 2503
1 #include 2 #include 3 4 char en[11],fr[11]; 5 int st; 6 struct Tire{ 7 int next[26]; 8 char eng[11]; 9 }node[200005];10 void insert(char...
分类:其他好文   时间:2014-08-09 02:27:38    阅读次数:266
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!