
bit优化
twh233
嘻嘻
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
2017 四川省赛 D. Dynamic Graph
传送门 题意:n个点,m个相连边,q是询问次数。每次输入一个数代表把这个点涂黑,问每次整个图有多少白点。 黑点也可以涂白。 #include #include #include #include #include #include #include #include #include #include #include #include #define原创 2017-06-08 00:42:48 · 369 阅读 · 0 评论 -
poj 2443 Set Operation (bitset用法
传送门 Set Operation Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 3311 Accepted: 1357 Description You are given N sets, the i-th set (represent原创 2017-07-16 16:51:35 · 365 阅读 · 0 评论 -
hdu 4352(状压bitset+数位DP
题目链接 题目大意:给出L和R找出在[L,R]中满足最长递增子序列长度等于K的个数 LIS nlogn的原理:传送门 当前位置pos,压缩状态state肯定是要的,然后考虑到我们可以对每一个k进行DP,所以要多开一维来保存k,然后dp[i][j][k] 就是dp的状态保存,i表示考虑到当前第i位,j表示当前的压缩状态,k表示LIS恰好为k的答案。 另外LIS,考虑nlogn的方法,维护的是...原创 2018-09-04 21:37:31 · 292 阅读 · 0 评论