状压dp
永夜莫明
菜是原罪
展开
-
Mondriaan's Dream(n*m铺瓷砖,状压dp)
https://cn.vjudge.net/problem/POJ-2411Squares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use h...原创 2019-08-18 02:00:38 · 325 阅读 · 0 评论 -
Tunnels (BFS+状压dp)
https://cn.vjudge.net/problem/HDU-4856Bob is travelling in Xi’an. He finds many secret tunnels beneath the city. In his eyes, the city is a grid. He can’t enter a grid with a barrier. In one minute,...原创 2019-08-17 02:14:24 · 293 阅读 · 0 评论 -
Knapsack Cryptosystem(超大01背包——二分+状压)
链接:https://ac.nowcoder.com/acm/contest/889/D来源:牛客网时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述Amy asks Mr. B problem D. Please help Mr. B to solve the follow...原创 2019-08-15 18:05:59 · 588 阅读 · 0 评论 -
Simple String Problem (状压dp)
https://cn.vjudge.net/contest/312854#problem/IRecently, you have found your interest in string theory. Here is an interesting question about strings.You are given a string S of length n consisting...原创 2019-08-14 22:38:26 · 216 阅读 · 0 评论 -
God of War(状压dp)
https://cn.vjudge.net/contest/312854#problem/BAt 184~280 A.D ,there were many kingdoms in China. Three strongest among them are "Wei", "Shu", "Wu". People call this period as "Three Kingdoms".HH i...原创 2019-08-14 03:05:21 · 265 阅读 · 0 评论 -
A sample Hamilton path (经典状压dp,哈密顿路径)
Give you a Graph,you have to start at the city with ID zero.InputThe first line is n(1<=n<=21) m(0<=m<=3)The next n line show you the graph, each line has n integers.The jth int...原创 2019-08-12 21:20:50 · 327 阅读 · 0 评论 -
炮兵阵地(经典状压dp)
https://cn.vjudge.net/contest/312853#problem/A司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示:...原创 2019-08-12 01:49:08 · 706 阅读 · 0 评论 -
牛牛的计算机内存(状压dp)
链接:https://ac.nowcoder.com/acm/problem/21873来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述牛牛的计算机一共有m块内存,现在有n条指令,每条指令是一个01序列如果指令的第i个字符为1,说明这条指令需要访问第i块内存每条指...原创 2019-08-04 18:35:43 · 468 阅读 · 0 评论 -
Problem Arrangement(状压dp)
题目链接:https://cn.vjudge.net/problem/ZOJ-3777The 11th Zhejiang Provincial Collegiate Programming Contest is coming! As a problem setter, Edward is going to arrange the order of the problems. As we kno...原创 2019-04-23 14:28:54 · 190 阅读 · 0 评论 -
Card Collector(概率期望+容斥原理+状压)
In your childhood, do you crazy for collecting the beautiful cards in the snacks? They said that, for example, if you collect all the 108 people in the famous novel Water Margin, you will win an amazi...原创 2019-02-26 11:04:50 · 634 阅读 · 0 评论 -
POJ-3245 Corn Fields(状压dp入门题)
题目链接:http://poj.org/problem?id=3254Farmer John has purchased a lush new rectangular pasture composed ofMbyN(1 ≤M≤ 12; 1 ≤N≤ 12) square parcels. He wants to grow some yummy corn for the cows ...原创 2019-01-18 23:48:45 · 238 阅读 · 0 评论