As you know that sometimes base conversion is a painful task. But still there are interesting facts in bases.For convenience let’s assume that we are dealing with the bases from 2 to 16. The valid symb...
分类:
其他好文 时间:
2015-06-09 21:59:18
阅读次数:
133
状压dpdp( x , S ) 表示最后一个是 x , 当前选的奶牛集合为 S , 则状态转移方程 : dp( x , S ) = Σ dp( i , S - { i } ) ( i ∈ S , abs( h[ i ] - h[ x ] ) > k )-----------------------....
分类:
其他好文 时间:
2015-06-08 18:48:51
阅读次数:
124
酱神寻宝Time Limit: 20 SecMemory Limit: 256 MB题目连接http://acm.uestc.edu.cn/#/problem/show/1141Description酱神来到了一座小岛,岛上有n个箱子。一共有3中不同的钥匙,金钥匙、银钥匙和万能钥匙。酱神一开始有a把...
分类:
其他好文 时间:
2015-06-08 14:54:27
阅读次数:
271
Description混乱的奶牛 [Don Piele, 2007] Farmer John的N(4 .#include#define ll long longusing namespace std;const int maxn=16;int n,k,a[maxn];ll f[1k) ...
分类:
其他好文 时间:
2015-06-07 23:14:59
阅读次数:
162
You work in a company which organizes marriages. Marriages are not that easy to be made, so, the job is quite hard for you.The job gets more difficult when people come here and give their bio-data with...
分类:
其他好文 时间:
2015-06-06 12:08:28
阅读次数:
185
题意:链接方法:状压DP?题解:这题其实没啥好写的,不算很难,推一推就能搞出来。首先看到这个问题,对于被d整除这个条件,很容易就想到是取余数为0,所以想到可能状态中刚开始含有取余数。先说我的第一个想法,f[i][j]表示选取i个数且此时的mod为j,这样的思想是第一下蹦出来的,当时想的就是在线来搞最终的答案。不过转瞬即发现,这TM不就是暴力吗魂淡!并没有什么卵用,于是开始想这个状态可不可以做什么优化...
分类:
其他好文 时间:
2015-06-04 22:50:34
阅读次数:
119
树形DP+背包 老师让我们补做了一下PKUSC那周的题目= = 这次好像是树形DP的专题?感觉题目还是很棒的,值得将来再回头学习。Cateran 树形状压DP,其实在看题解之前我似乎并没有搞懂这题在干什么…… 对于节点 i ,我们考虑f[i][j]表示 i 这棵子树中,分部包含情况为 j 的...
分类:
其他好文 时间:
2015-06-04 19:02:15
阅读次数:
137
Problem DescriptionLiyuan lives in a old apartment. One day, he suddenly found that there was a wireless network in the building. Liyuan did not know the password of the network, but he got some import...
分类:
其他好文 时间:
2015-06-04 11:49:46
阅读次数:
125
未加矩阵快速幂 50分 1 const dx:array[1..8,1..3] of longint= 2 ((-1,0,0),(-1,0,0),(1,0,0),(0,1,0),(-1,0,0),(-1,1,0),(0,1,0),(-1,0,1)); 3 dy:array[1..8,...
分类:
其他好文 时间:
2015-06-03 23:07:11
阅读次数:
349
1152. False MirrorsTime limit: 2.0 secondMemory limit: 64 MBBackgroundWe wandered in the labyrinth for twenty minutes before finally entering the larg...
分类:
其他好文 时间:
2015-06-03 00:56:38
阅读次数:
184