Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
要保存的信息有三个啊,bulls,barns,还有他们在一起时候可以有的安排的数量In Reply To:这个题DP只需要一个(1<<20)的数组 Posted by:number at 2005-09-18 10:01:41 > f[i][1<<20]实际上只用了0..1<<20中二进制表示后1的个数是i的那一部分 > f[i+1][1<<20]只用了1的个数是i+1的那一部分. > 所以只用一个f[1<<20]就可以了. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator