码迷,mamicode.com
首页 >  
搜索关键字:状压    ( 1865个结果
POJ 2288 Islands and Bridges(状压dp)
Language: Default Islands and Bridges Time Limit: 4000MS   Memory Limit: 65536K Total Submissions: 9312   Accepted: 2424 Description Given a map of islands and bridge...
分类:其他好文   时间:2015-03-14 09:37:51    阅读次数:150
SPOJ Problem 8612:Penney Game
字符串,状压一下。。#include#includeint n,t,i;int a[45];int b[8];char s[45];int main(){ scanf("%d",&t); while(t--){ memset(b,0,sizeof(b)); s...
分类:其他好文   时间:2015-03-14 09:34:37    阅读次数:175
[POJ2404]Jogging Trails(中国旅行商问题)(一般图的匹配——状压DP)
题目:http://poj.org/problem?id=2404题意:有个n(n<=15)的点和m条无向边,每条边都有自己的权值。现在你要从某个点出发,每条边可以经过多次但要保证每条边至少走一次。现在你要找出一个方案,使得经过所有边的权值和最小,输出最小的权值和。分析:首先容易想到的是如果这个图G...
分类:其他好文   时间:2015-03-13 22:20:01    阅读次数:151
POJ 3311 Hie with the Pie(状压dp or dfs)
Language: Default Hie with the Pie Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 5057   Accepted: 2695 Description The Pizazz Pizzeria prides itself in...
分类:其他好文   时间:2015-03-12 13:23:56    阅读次数:180
cf16E Fish(状压DP)
题意:N只FISH。每个回合会有一只FISH吃掉另一个FISH。直到池塘里只剩一只FISH。给出aij:第i只FISH吃掉第J只FISH的概率。问每一只FISH是最后存活者的概率。InputThe first line contains integern(1?≤?n?≤?18) — the amou...
分类:其他好文   时间:2015-03-11 16:39:54    阅读次数:144
HDU 4049 Tourism Planning (状压dp 详解)
HDU 4049 Tourism Planning (状压dp 详解)...
分类:其他好文   时间:2015-03-10 15:37:00    阅读次数:199
POJ 3254 Corn Fields (状压)
Language: Default Corn Fields Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 8704   Accepted: 4641 Description Farmer John has purchased a lush new rect...
分类:其他好文   时间:2015-03-10 14:04:39    阅读次数:135
HDU 1992 Tiling a Grid With Dominoes (状压 dp)
Problem Description We wish to tile a grid 4 units high and N units long with rectangles (dominoes) 2 units by one unit (in either orientation). For example, the figure shows the five different ways ...
分类:其他好文   时间:2015-03-10 10:31:34    阅读次数:174
[AC自动机+状压dp] hdu 4534 郑厂长系列故事——新闻净化
题意:中文的题目,意思就是说有很多串,每个串都有权值,权值为999的串必须出现,-999的串必须不出现。权值在-999~999之间。 然后必须出现的串不超过8个。然后给一个全为小写目标串,问最少需要删除多少个字母才能够保证必须出现的串都出现,次数一样保证权值最大。输出次数和权值。 然后根据样例,那些必须出现的串,其实权值是0。 思路: 很明显一开始建自动机构成trie图,但是需要注...
分类:其他好文   时间:2015-03-10 10:29:38    阅读次数:130
POJ 2411 Mondriaan's Dream (状压+dfs)
Language: Default Mondriaan's Dream Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 12405   Accepted: 7239 Description Squares and rectangles fascinated ...
分类:其他好文   时间:2015-03-10 10:28:42    阅读次数:144
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!