会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
花开须臾,韶光易逝
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
下一页
2015年8月3日
poj 3468 线段树模板题
摘要: #include#include#includeusing namespace std;#define Lson rt>1; a[rt].len=(R-L)+1;//我吧if语句写在了这些赋值语句之前,不知道可以不,//反正改了过来,不过我觉得写前面后面都一样,毕竟它的叶子节点没有左孩子和有孩...
阅读全文
posted @ 2015-08-03 16:53 花开须臾
阅读(171)
评论(0)
推荐(0)
2015年8月1日
HDU 1800 Flying to the Mars 字典树,STL中的map ,哈希树
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1800 字典树 #include#include#includeusing namespace std;struct node{ int sum; node *next[10]; ...
阅读全文
posted @ 2015-08-01 15:41 花开须臾
阅读(130)
评论(0)
推荐(0)
2015年7月31日
字典树 HDU 1075 What Are You Talking About
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1075#include#include#include#include#include#includeusing namespace std;struct node{ int flag; char str[15];...
阅读全文
posted @ 2015-07-31 18:29 花开须臾
阅读(138)
评论(0)
推荐(0)
字典树 HDU 1251 统计难题
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1251这是重写的,让我感觉到每一次的理解程度都在增加#include#include#include#includeusing namespace std;struct node{ int sum; node *n...
阅读全文
posted @ 2015-07-31 08:47 花开须臾
阅读(146)
评论(0)
推荐(0)
2015年7月28日
最小生成树prim算法 POJ2031
摘要: #include#include#include#include#include#include#include#include#include#includeusing namespace std;#define INF 0xfffffff#define max(a, b) a>b?a:b;#de...
阅读全文
posted @ 2015-07-28 17:06 花开须臾
阅读(204)
评论(0)
推荐(0)
POJ 1287 Networking 最小生成树
摘要: 在这里总结一下着几天做题的感悟,其实算法还算简单,只是你要静下心去参悟,所谓开窍了就好,所以耐心就好,还有就是现在是打基础,一定要扎牢;Runtime Error 运行错误,一般是数组开的太小Time Limit Exceeded 时间超限,也许是读入时没有加截至条件,程序一直在等待输入,就造成了...
阅读全文
posted @ 2015-07-28 08:52 花开须臾
阅读(278)
评论(0)
推荐(0)
2015年7月27日
次小生成树 POJ 2728
摘要: #include #include #include #include using namespace std;const int maxn = 110;const int INF = 0x3f3f3f3f;int map[maxn][maxn], used[maxn][maxn], lowc[ma...
阅读全文
posted @ 2015-07-27 15:24 花开须臾
阅读(113)
评论(0)
推荐(0)
最短路N题Tram SPFA
摘要: #include#include#include#include#include#include#include#include#include#defineN1010#defineINF0x3f3f3f3f#defineMin(a,b)((a)(b)?(a):(b))usingnamespaces...
阅读全文
posted @ 2015-07-27 15:06 花开须臾
阅读(155)
评论(0)
推荐(0)
2015年7月25日
poj2236 并查集
摘要: 专心和细心真的很重要 #include#include#include#include#include#include#include#include#include#include#include#define max(a, b) a>b?a:b;#define min...
阅读全文
posted @ 2015-07-25 18:29 花开须臾
阅读(117)
评论(0)
推荐(0)
POJ 1611并查集
摘要: 我发现以后写题要更细心,专心!#include#include#include#include#include#include#include#include#include#include#include#define max(a, b) a>b?a:b;#define min(a, b) a<b...
阅读全文
posted @ 2015-07-25 15:55 花开须臾
阅读(125)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告