![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
状态压缩
qq_37383726
这个作者很懒,什么都没留下…
展开
-
【HDU 5023】A Corrupt Mayor's Performance Art 【线段树+状态压缩】
Corrupt governors always find ways to get dirty money. Paint something, then sell the worthless painting at a high price to someone who wants to bribe him/her on an auction, this seemed a safe way for原创 2017-10-27 16:04:17 · 212 阅读 · 0 评论 -
【陕西科技大学第一届程序设计比赛—正式赛】 D E G H J K L S
PS 过的人太多的就不贴代码了(当然过的人很少的我也不会QAQ,有的题如果能够补过的话,还会更新)D 三体——人类的末日之战分析:很明显的 bfs+状态压缩#include<bits/stdc++.h>using namespace std;#define LL long longconst int N = 200+11;const int M = 1...原创 2018-03-12 20:38:13 · 262 阅读 · 0 评论 -
【POJ - 3279】Fliptile 【反转特性+状压遍历字典序】
Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate an M × N grid (1 ≤ M ≤ 15; 1 ≤ N ≤ 15...原创 2018-02-22 13:52:37 · 213 阅读 · 0 评论 -
【2018年全国多校算法寒假训练营练习比赛(第四场)】ABCDEFGH
A石油采集分析:二分匹配。 一个油田只能够和一个油田匹配被瓢走 ,所以我们 对每一个油田 遍历其四周,如果也有油田,那么就建立边表示有可能匹配。 最后匈牙利算法求最大匹配就好了。代码#include<bits/stdc++.h>using namespace std;#define LL long long#define ULL unsigned long lo...原创 2018-02-11 19:18:42 · 184 阅读 · 0 评论 -
【POJ - 3276 】 Face The Right Way 【区间加减+单点查询+翻转特性】
Farmer John has arranged his N (1 ≤ N ≤ 5,000) cows in a row and many of them are facing forward, like good cows. Some of them are facing backward, though, and he needs them all to face forward to mak...原创 2018-02-21 13:42:51 · 162 阅读 · 0 评论 -
【牛客练习赛12】 A B 【bfs +简单状压】
A 圆圆 链接:https://www.nowcoder.net/acm/contest/68/A 来源:牛客网时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 我们定义一个圆 C 为以原点 (0, 0) 为中心的单位圆(半径为 1 的圆)。给定在 C 圆周上相异的两点 ...原创 2018-02-09 23:33:47 · 264 阅读 · 0 评论 -
【Wannafly挑战赛8】 C【状压+概率DP】
C 小C打比赛 链接:https://www.nowcoder.com/acm/contest/57/C 来源:牛客网时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 小C现在要参加一场wannafly挑战赛,一场挑战赛一共有n道题,一共有m分钟。 对于第i道题,小C解决它需原创 2018-01-24 18:36:56 · 275 阅读 · 0 评论 -
【Wannafly挑战赛6】 A B C E
A 完全平方数 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 题目描述 多次查询[l,r]范围内的完全平方数个数 定义整数x为完全平方数当且仅当可以找到整数y使得y*y=x 输入描述: 第一行一个数n表示查询次数 之后n行每行两个数l,r 输出描述: 对于每个查询,输出一个数表原创 2017-12-24 21:58:23 · 387 阅读 · 0 评论 -
【牛客练习赛8】A D E
A 约数个数的和 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 给个n,求1到n的所有数的约数个数的和~ 输入描述: 第一行一个正整数n 输出描述: 输出一个整数,表示答案 示例1 输入3 输出5 说明样例解释: 1有1个约数1 2有2个约数1,2 3有2个原创 2017-12-16 19:35:54 · 598 阅读 · 0 评论 -
【Gym - 101350G】Snake Rana 【状态压缩 +容斥定理】
Old Macdonald wants to build a new hen house for his hens. He buys a new rectangular area of size N by M. The night before he builds the hen house, snake Rana devises an evil plan to plant bombs in K d原创 2017-11-03 23:01:25 · 272 阅读 · 0 评论 -
【CF 620E 】New Year Tree 【DFS+线段树+状态压缩】
The New Year holidays are over, but Resha doesn’t want to throw away the New Year tree. He invited his best friends Kerim and Gural to help him to redecorate the New Year tree.The New Year tree is an u原创 2017-10-12 14:13:26 · 508 阅读 · 0 评论 -
【HPU 1192】: Sequence 【 状态压缩】
题目描述 在某个夜黑月高的晚上,!!!,原谅我编不下去了。 (http://acm.hpu.edu.cn/upload/image/20161125/20161125214540_41845.jpg) 很美吧?放松之后,继续做题吧。HS(Handsome)的Ocean在纸上写下NN个整数,Ocean把它定义为OO序列。Ocean认为一个序列的价值的是:序列中不同元素个数。现在他想知道OO序列原创 2017-10-21 00:11:32 · 261 阅读 · 0 评论 -
【HDU - 1429】胜利大逃亡(续) 【状态压缩+BFS】
Ignatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)…… 这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的门,钥匙藏在地牢另外的某些地方。刚开始Ignatius被关在(sx,sy)的位置,离开地牢的门在(ex,ey)的位置。Ignatius每分钟只能从一个坐标走到相邻四个坐标中的其中一个。魔王每t分钟回地牢视察一次,若发现Ignatius不在原创 2017-10-22 18:53:41 · 470 阅读 · 0 评论 -
【HDU - 3605 】Escape 【状态压缩 构图+最大流 or 多重匹配】
2012 If this is the end of the world how to do? I do not know how. But now scientists have found that some stars, who can live, but some people do not fit to live some of the planet. Now scientists wan原创 2017-10-20 22:24:31 · 407 阅读 · 0 评论 -
【中南林业科技大学第十一届程序设计大赛】 A B C D E G H I K
A 译码当成26进制数处理就好了代码#include &amp;lt;bits/stdc++.h&amp;gt;using namespace std;typedef long long ll;typedef unsigned long long ull;const int N = (int) 1e5 + 11;const int M = (int) 1e5 + 11;const...原创 2018-06-21 21:55:12 · 377 阅读 · 0 评论