会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
kewowlo
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
6
7
8
9
10
11
12
13
14
···
21
下一页
2014年9月14日
【瞎搞】HDU 5014 Number Sequence 构造
摘要: 题意:使得两个0-n的数列两两异或的和最大异或 0^0=01^0=10^1=11^1=0要求最大就意味着两个数尽可能多的互补 他0的位子你要1#include #include #include #include #include #include #include #include using n...
阅读全文
posted @ 2014-09-14 19:43 kewowlo
阅读(126)
评论(0)
推荐(0)
2014年9月11日
【DP】 HDU 2660 Accepted Necklace 限制背包
摘要: 给出n个物品 最多能拿k个 选取的物品的总重量不能超过w因为每个物品只有一个 转移顺序为 for(int i=0; i=b[i]; j--) for(int l=1; l#include #include #include #include #include #include #...
阅读全文
posted @ 2014-09-11 19:40 kewowlo
阅读(171)
评论(0)
推荐(0)
2014年9月10日
【DP】 POJ 3260 The Fewest Coins 背包
摘要: 购买T 块钱的东西 交易过程中使用最少的硬币数量因为客人的硬币有限,商店的硬币无限先多重背包求出给商店的硬币数完全背包求出找回的硬币数#include #include #include #include #include #include #include #include using names...
阅读全文
posted @ 2014-09-10 22:29 kewowlo
阅读(140)
评论(0)
推荐(0)
2014年9月9日
【线段树】 POJ 2155 Matrix 二维线段树/二维树状数组
摘要: C操作 取反 一个左上角 x1,y1 右下角x2,y2 的矩阵 0变1 1变0 ;Q操作 输出x,y位置的值 mark二维树状数组方法#include #include #include #include #include #include #include #include using names...
阅读全文
posted @ 2014-09-09 22:16 kewowlo
阅读(287)
评论(0)
推荐(0)
【线段树】 ZOJ 3349 Special Subsequence
摘要: 求最长的一种序列 这种序列满足 前一项与后一项相差小于d先离散化每次取a[i]-d 与 a[i]+d 中的最大值#include #include #include #include #include #include #include #include using namespace std;#i...
阅读全文
posted @ 2014-09-09 19:37 kewowlo
阅读(115)
评论(0)
推荐(0)
【树状数组】 HDU 4991 Ordered Subsequence
摘要: DP+树状数组dp [i] [j] i 表示第i个数 j表示第j大的数 1#include #include #include #include #include #include #include using namespace std;#include #include #include #...
阅读全文
posted @ 2014-09-09 09:53 kewowlo
阅读(143)
评论(0)
推荐(0)
2014年9月8日
【线段树】 POJ 3277 City Horizon 裸扫描线
摘要: 将r-1是为了防止在update 时出现 l==r 的情况 X[r]-X[l]=0 使得单点的更新无法进行扫描线讲解#include #include #include #include #include #include #include #include using namespace std;...
阅读全文
posted @ 2014-09-08 19:00 kewowlo
阅读(130)
评论(0)
推荐(0)
2014年9月7日
【瞎搞】ZOJ 3818 Pretty Poem 牡丹江网络赛J题
摘要: 第一种情况:ABABA。 先判断开头的A与结尾的A,得到A的长度,接着判断ABAB 中的AB与AB是否相同(ABAB的长度一定为偶数)已经知道了A长度,AB的长度 接着判断下A 与B是否相同第二种情况:ABABCAB-可先讲AB看成整体即DDCD 若存在一个D满足条件 可得到C的长度和位置再判断A-...
阅读全文
posted @ 2014-09-07 19:18 kewowlo
阅读(133)
评论(0)
推荐(0)
2014年9月5日
【AC自动机】HDU 3695 Computer Virus on Planet Pandora 裸题
摘要: n个单词在一个字符串和该串的逆串出现了几个#include #include #include #include #include #include #include using namespace std;#include #include #include #include #include #...
阅读全文
posted @ 2014-09-05 20:42 kewowlo
阅读(141)
评论(0)
推荐(0)
【AC自动机】HDU 2222 Keywords Search 裸题
摘要: 题意:给出的n个单词,出现在T中的个数。#include #include #include #include #include #include #include using namespace std;#include #include #include #include #include #i...
阅读全文
posted @ 2014-09-05 19:07 kewowlo
阅读(140)
评论(0)
推荐(0)
上一页
1
···
6
7
8
9
10
11
12
13
14
···
21
下一页
公告