2015年6月10日

uva -- 10766

摘要: 一开始我感觉是模板题 是不想写的 后来发现我的模板上没有 就敲了一遍 可以忽略这句屁话 在信息学竞赛中,有关生成树的最优化问题如最小生成树等是我们经常遇到的,而对生成树的计数及其相关问题则少有涉及。事实上,生成树的计数是十分有意义的,在许多方面都有着广泛的应用。 1 #include 2 #i... 阅读全文

posted @ 2015-06-10 21:48 yifi 阅读(269) 评论(0) 推荐(0) 编辑

poj -- 3468

摘要: 很明显用线段树 节点类型 :typedef struct _NODE_{ int L,R; _NODE_* pLeft; _NODE_* pRight; LL nSum;//原来的和 LL lnc; //增加量c的累加}NODE;感觉用孩子节点比较好一点 开到2n就行了 用2*n+1/2*n+2的话... 阅读全文

posted @ 2015-06-10 20:24 yifi 阅读(189) 评论(0) 推荐(0) 编辑

poj --3264

摘要: 又手贱的用cin 结果t掉;感觉自己的代码风格太差了http://poj.org/problem?id=3264 1 #include 2 #include 3 #include 4 using namespace std; 5 const int INF = 0xffffff0; 6 ... 阅读全文

posted @ 2015-06-10 19:09 yifi 阅读(166) 评论(0) 推荐(0) 编辑

2015年6月9日

cstring 的重载

摘要: 1 #include 2 #include 3 4 using namespace std; 5 6 7 8 9 const int Max = 100000 +10; 10 class MyString 11 { 12 public: 13 14 ... 阅读全文

posted @ 2015-06-09 20:58 yifi 阅读(274) 评论(0) 推荐(0) 编辑

hihocode ---1032

摘要: 1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 const int MAXN = 1000000 + 10; 8 char Ma[MAXN*2]; 9 int Mp[MAXN*2];10 void Manacher(c... 阅读全文

posted @ 2015-06-09 20:51 yifi 阅读(285) 评论(0) 推荐(0) 编辑

2015年6月7日

省赛总结

摘要: 这次省赛 虽然签到题有一点坑(神奇的是我们队还给改对了)但是后面的题没做出来 我感觉还是学的太浅;从今天开始 刷够500题在打比赛;本周目标:后缀数组刷完的话 把上周剩下的rmq补完 阅读全文

posted @ 2015-06-07 21:08 yifi 阅读(129) 评论(0) 推荐(0) 编辑

2015年6月6日

13周总结

摘要: 这周主要是准备了一下省赛 (虽然很水)复习了一下以前做过的题 顺便刷了rmq的题这周开始写博客http://www.cnblogs.com/yifi/archive/2015/06/03.html 阅读全文

posted @ 2015-06-06 23:00 yifi 阅读(118) 评论(0) 推荐(0) 编辑

2015年6月4日

uva 1428

摘要: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4174 1 #include 2 #include 3 #include 4 #include 5 us... 阅读全文

posted @ 2015-06-04 17:10 yifi 阅读(141) 评论(0) 推荐(0) 编辑

hduacm 2888 ----二维rmq

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2888模板题 直接用二维rmq读入数据时比较坑爹 cin 会超时 1 #include 2 #include 3 #include 4 5 using namespace std; 6 const int ... 阅读全文

posted @ 2015-06-04 15:50 yifi 阅读(149) 评论(0) 推荐(0) 编辑

hduacm 3183 rmq

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3183问题等价与取N-M个数,每次取的时候保证后面能取的个数足够,并且取的数最小 查询最小用rmq 1 #include 2 #include 3 #include 4 #include 5 6 using na... 阅读全文

posted @ 2015-06-04 13:55 yifi 阅读(163) 评论(0) 推荐(0) 编辑

导航