
状态压缩
Dust_Heart
这个作者很懒,什么都没留下…
展开
-
HDU 4778 Gems Fight! 【记忆化搜索+位操作】
2013 Asia Hangzhou Regional Contest HDU 4778 Gems Fight! 【记忆化搜索+位操作】 Problem Description Alice and Bob are playing "Gems Fight!": There are Gems of G different colors , packed in B bags. Each bag has several Gems. Gdifferent colors are numbered from原创 2017-10-04 00:07:56 · 346 阅读 · 0 评论 -
2017 ACM/ICPC 广西邀请赛||HDU 6185 Covering 【状压DP+矩阵快速幂】
2017 ACM/ICPC 广西邀请赛||HDU 6185 Covering 【状压DP+矩阵快速幂】 Bob's school has a big playground, boys and girls always play games here afterschool. To protect boys and girls from getting hurt when playing happily on theplayground, rich boy Bob decided to cover the原创 2017-08-31 17:26:45 · 2253 阅读 · 4 评论 -
Codeforces 676D - Theseus and labyrinth 【BFS(二进制优化迷宫旋转)】
Codeforces 676D - Theseus and labyrinth 【BFS(二进制优化迷宫旋转)】 Theseus has just arrived to Crete to fight Minotaur. He found a labyrinth that has a form of a rectangular field of size n × m and consists of blocks of size 1 × 1. Each block of the labyrinth has a原创 2017-07-30 18:12:24 · 539 阅读 · 0 评论 -
HDOJ 5094 Maze 【状态压缩+BFS】
HDOJ 5094 Maze 【状态压缩+BFS】 This story happened on the background of Star Trek. Spock, the deputy captain of Starship Enterprise, fell into Klingon’s trick andwas held as prisoner on their mother planet Qo’noS. The captain of Enterprise, James T. Kirk, had原创 2017-07-24 20:21:50 · 391 阅读 · 0 评论 -
UESTC 1690 这是一道比CCCC简单题难的简单题||HiHoCoder #1048 : 状态压缩·二
UESTC 1690 这是一道比CCCC简单题难的简单题||HiHoCoder #1048 : 状态压缩·二 给定一个n*m的矩阵,使用1*2的小长方形覆盖矩阵,要求完全覆盖的同时不出现重合,也不允许超出边界,问有多少种可能的覆盖方法,方案数对1e9+7取模 历经千辛万苦,小Hi和小Ho终于到达了举办美食节的城市!虽然人山人海,但小Hi和小Ho仍然抑制不住兴奋之情,他们放下行李便投入到了美食节的活动当中。美食节的各个摊位上各自有着非常多的有意思的小游戏,其中一个便是这样子的: 小Hi和小Ho领到了一个大小为原创 2017-07-06 22:06:57 · 1099 阅读 · 0 评论 -
HDOJ 4539 郑厂长系列故事——排兵布阵(状压DP)
HDOJ 4539 郑厂长系列故事——排兵布阵(状压DP) 郑厂长不是正厂长 也不是副厂长 他根本就不是厂长 事实上 他是带兵打仗的团长 一天,郑厂长带着他的军队来到了一个n*m的平原准备布阵。 根据以往的战斗经验,每个士兵可以攻击到并且只能攻击到与之曼哈顿距离为2的位置以及士兵本身所在的位置。当然,一个士兵不能站在另外一个士兵所能攻击到的位置,同时因为地形的原因平原上也不是每一个位置都可以安排士兵。 现在,已知n,m 以及平原阵地的具体地形,请你帮助郑厂长计算该阵地,最多能原创 2020-10-18 10:30:27 · 418 阅读 · 0 评论 -
Codeforces 868C - Qualification Rounds 【状态压缩+暴力枚举】
Codeforces Round #438 by Sberbank and Barcelona Bootcamp (Div. 1 + Div. 2 combined) Codeforces 868C - Qualification Rounds 【状态压缩+暴力枚举】 Snark and Philip are preparing the problemset for the upcomingpre-qualification round for semi-quarter-finals. They hav原创 2017-10-05 22:08:12 · 907 阅读 · 0 评论 -
Codeforces 877D - Olya and Energy Drinks 【简单BFS变形】
Olya loves energy drinks. She loves them so much that her roomis full of empty cans from energy drinks. Formally, her room can be represented as a field of n × m cells, each cell of which is empty or littered with cans. Olya drank a lot of energy drink, so原创 2017-10-24 21:09:41 · 1919 阅读 · 0 评论