随笔分类 - 技能书
摘要:Stern Brocot Tree、伪.GCD 副本 伪.GCD 问题 1:$f(a,b,c,n) = \sum_{i=0}^{n} [\frac{ai+b}{c}]$ Case 1: $a\geq c 或 b\geq c$:$f(a,b,c,n) = f(a\%c,b\%c,c,n)+(n+1)[
阅读全文
posted @ 2019-09-28 01:16
FST_stay_night
摘要:SDU暑期集训排位(9) G. Just Some Permutations 基础 DP 练习部分 定义 $f(S)$,表示让 S 中的人全 happy 的方案数。 $dp[i][j]$ 表示,$\sum_{|s|=j,s\subset\{1,...i\}} f(s)$。 考虑从 $dp[i][j]
阅读全文
posted @ 2019-08-22 19:19
FST_stay_night

浙公网安备 33010602011771号