摘要: #include#include#includeusing namespace std;#define Lson rt>1; a[rt].len=(R-L)+1;//我吧if语句写在了这些赋值语句之前,不知道可以不,//反正改了过来,不过我觉得写前面后面都一样,毕竟它的叶子节点没有左孩子和有孩... 阅读全文
posted @ 2015-08-03 16:53 花开须臾 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 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 花开须臾 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 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 花开须臾 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 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 花开须臾 阅读(139) 评论(0) 推荐(0) 编辑
摘要: #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 花开须臾 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 在这里总结一下着几天做题的感悟,其实算法还算简单,只是你要静下心去参悟,所谓开窍了就好,所以耐心就好,还有就是现在是打基础,一定要扎牢;Runtime Error 运行错误,一般是数组开的太小Time Limit Exceeded 时间超限,也许是读入时没有加截至条件,程序一直在等待输入,就造成了... 阅读全文
posted @ 2015-07-28 08:52 花开须臾 阅读(270) 评论(0) 推荐(0) 编辑
摘要: #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 花开须臾 阅读(100) 评论(0) 推荐(0) 编辑
摘要: #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 花开须臾 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 专心和细心真的很重要 #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 花开须臾 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 我发现以后写题要更细心,专心!#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 花开须臾 阅读(115) 评论(0) 推荐(0) 编辑