摘要: 题意:有N种船,每种船载重Vi,有2^Ci-1艘,然后有q个询问,每个询问输入一个s,输出有多少种不同的方案使得总载重确切为s。 题解:dp(i,j)表示前i种船,总载重为j的方案数。那么,显然dp(i,j)=sigma dp(i-1,j-k*Vi) (k<2^Ci && j-k*Vi>=0)。初始 阅读全文
posted @ 2018-09-16 00:31 My_Girlfriends 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 1001 OI业界毒瘤题(把收藏已久的blog拿出来就好了,反正现场赛也不会写(逃 1004 BPM136 是不是dls写的题解啊,什么是转移很显然啊( f_i_j_k 表示考虑前i个位置,有j条出边,j条入边,权值为k的个数(就是看成点i向pi连边,连abs(i-pi)的边,那么一定是一堆的环) 阅读全文
posted @ 2018-08-23 15:44 My_Girlfriends 阅读(336) 评论(0) 推荐(0) 编辑
摘要: jls的自闭场 1001 BPM136 差点首杀结果发现漏乘了一个系数还爆了ll,回来首杀就没了QAQQQ 1 /* *********************************************** 2 Author :BPM136 3 Created Time :2018/8/20 阅读全文
posted @ 2018-08-20 20:33 My_Girlfriends 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 1001 BPM136 母函数然后分子分母分开算,分子二项式展开,分母就是一个组合数 1 #include<iostream> 2 #include<cstdio> 3 #include<algorithm> 4 #include<cstdlib> 5 #include<cmath> 6 #incl 阅读全文
posted @ 2018-08-20 20:28 My_Girlfriends 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 1001 小甜甜 可爱的小甜甜又回来辣 然而活该被卡spfa( 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 #include <cmath> 5 #include <vector> 6 #include <qu 阅读全文
posted @ 2018-08-13 21:43 My_Girlfriends 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 史上最惨的惨剧,07高精度板子挂了,09忘记了说狼人是村名的人一定是狼人( 01 BPM136 1 /* *********************************************** 2 Author :BPM136 3 Created Time :2018/8/8 12:11:3 阅读全文
posted @ 2018-08-08 21:51 My_Girlfriends 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 1002 小洛洛 开场挂了N发插入排序的我( 最后还是要靠小洛洛写暴力 1 #include <cstdio> 2 #include <cstring> 3 #include <iostream> 4 #include <cmath> 5 #include <cstdlib> 6 #include 阅读全文
posted @ 2018-08-08 11:59 My_Girlfriends 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 1002 BPM136 莫队 1 /* *********************************************** 2 Author :BPM136 3 Created Time :2018/8/1 12:08:40 4 File Name :1002.cpp 5 ******* 阅读全文
posted @ 2018-08-02 21:56 My_Girlfriends 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 1001 小甜甜 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 #include <cmath> 5 #include <vector> 6 #include <queue> 7 #include <set> 8 阅读全文
posted @ 2018-08-02 21:51 My_Girlfriends 阅读(178) 评论(0) 推荐(0) 编辑
摘要: A 大力推一下式子 n * sigma i from 2 to n+1 ( C(n-1, i-2) * (i-2)! * (2n-i)! / 2^(n+1-i) ) 就没有然后了 1 /* *********************************************** 2 Autho 阅读全文
posted @ 2018-07-28 10:00 My_Girlfriends 阅读(305) 评论(0) 推荐(0) 编辑