摘要: 待做。HDU 3555 - BombHDU 2089 - 不要62HDU 3652 - B-numberHDU 3709 - Balanced NumberHDU 3943 - K-th Nya NumberHDU 4722 - Good Numbers 阅读全文
posted @ 2014-07-29 19:37 e0e1e 阅读(110) 评论(0) 推荐(0)
摘要: 鸽笼原理题,以后得好好研究下相关题目。 1 /* 2 ID:esxgx1 3 LANG:C++ 4 PROG:poj2356 5 */ 6 #include 7 #include 8 #include 9 #include 10 using namespace std;11 12 #defin... 阅读全文
posted @ 2014-07-29 08:41 e0e1e 阅读(140) 评论(0) 推荐(0)
摘要: 大意:给出一个排列的上升下降的情况,求满足条件的序列数。例如:321 对应着 DD, ID对应着: 231、132。DP问题,分析待整理,本题个人觉得挺经典的。 1 /* 2 ID:esxgx1 3 LANG:C++ 4 PROG:hdu4055 5 */ 6 #include 7 #includ... 阅读全文
posted @ 2014-07-28 19:44 e0e1e 阅读(141) 评论(0) 推荐(0)
摘要: 先上一枚水题,模拟。/*ID:esxgx1LANG:C++PROG:hdu4054*/#include #include #include #include using namespace std;int main(void){ #ifndef ONLINE_JUDGE freopen(... 阅读全文
posted @ 2014-07-28 19:12 e0e1e 阅读(155) 评论(0) 推荐(0)
摘要: 拍水题到现在还N个WA, 想去掉memset结果又莫名其妙的WA还找不到错误- -。。最近RP太差了 1 /* 2 ID:esxgx1 3 LANG:C++ 4 PROG:hdu1559 5 */ 6 #include 7 #include 8 #include 9 #include 10 u... 阅读全文
posted @ 2014-07-28 18:44 e0e1e 阅读(184) 评论(0) 推荐(0)
摘要: 扫描线 + 线段树, 线段树写的有点儿退化,随便了- -。。。 1 /* 2 ID:esxgx1 3 LANG:C++ 4 PROG:hdu1542 5 */ 6 #include 7 #include 8 #include 9 #include 10 using name... 阅读全文
posted @ 2014-07-28 17:41 e0e1e 阅读(171) 评论(0) 推荐(0)
摘要: XOR高斯消元模板题,纯裸模板,不多说。 1 /* 2 ID:esxgx1 3 LANG:C++ 4 PROG:hdu3364 5 */ 6 #include 7 #include 8 #include 9 #include 10 using namespace std;11 12 #defi... 阅读全文
posted @ 2014-07-28 00:44 e0e1e 阅读(79) 评论(0) 推荐(0)
摘要: 原理就是先利用两个数间的差分,因为把一段连续的数做标记相当于头差分+1,尾差分-1,然后做前缀和即可。可以想到,相比segment tree这种个只适合于查询操作不多但修改操作很多的情况(如果保存前缀和修改又会降速),否则计算前缀和会很费时。/*ID:esxgx1LANG:C++PROG:hdu15... 阅读全文
posted @ 2014-07-26 16:05 e0e1e 阅读(163) 评论(0) 推荐(0)
摘要: 终于过了。。感谢xiaodao提供测试数据,然后最终找到了一个十分ruozhi的BUG。。。= =,坑爹。。没什么好说的,直接上主席树的干活。。。下面是HDU的代码,如果是SPOJ自行把%I64d换成%lld继续干活。。 1 /* 2 ID:esxgx1 3 LANG:C++ 4 PROG:... 阅读全文
posted @ 2014-07-26 14:43 e0e1e 阅读(311) 评论(0) 推荐(0)
摘要: 最短路relax + 带剪枝的搜索,个人觉得此剪枝十分牛逼,如果不参照题解我是反应不过来的。 1 /* 2 ID:esxgx1 3 LANG:C++ 4 PROG:B 5 */ 6 #include 7 #include 8 #include 9 #include 10 using names... 阅读全文
posted @ 2014-07-26 01:41 e0e1e 阅读(300) 评论(0) 推荐(0)