环排列的EGF为: \(f(x)=\sum_{3\le i} {(i-1)! x^i \over i!}=\sum_{3\le i} {x^i \over i}\) 那么这道题答案就是 : \({n!\over k!}[x^n]f^k(x)\) 数据范围太小,甚至多项式乘法不用 NTT #inclu ...
分类:
Web程序 时间:
2021-04-12 11:43:26
阅读次数:
0
Link Description 给出长为 \(n\) 的数列 \(\{a_n\}\),选出一个长度大于二的子序列,使得 \(\prod_{i=2}^K \binom{b_{i-1}}{b_i} \bmod 2=1\) 求方案数。 Solution 对组合数取模,容易想到卢卡斯定理,条件就转化为在二 ...
分类:
其他好文 时间:
2021-04-12 11:42:15
阅读次数:
0
You are the manager of a basketball team. For the upcoming tournament, you want to choose the team with the highest overall score. The score of the te ...
分类:
其他好文 时间:
2021-04-10 13:19:16
阅读次数:
0
package test; public class test1 { public static void main(String args[]){ //使用for循环计算1-100的和,除了以3结尾的那些数 int sum = 0; for(int x = 1;x<=100;x++){ if(x% ...
分类:
其他好文 时间:
2021-04-10 13:09:10
阅读次数:
0
int func(int n){ int i = 0,sum = 0; while(sum < n) sum += ++i; return i; } 求时间复杂度 A. O(logn) B. O(n^1/2) C. O(n) D. O(nlogn) ++i, i = 1,2,3,4,5,···,k。 ...
分类:
其他好文 时间:
2021-04-10 13:08:02
阅读次数:
0
递归求1-100之和 /* *求1-100之和 */ function sum(num1, num2) { var num = num1 + num2; if (num2 + 1 > 100) { return num; } else { return sum(num, num2 + 1) } } ...
分类:
其他好文 时间:
2021-04-10 13:03:05
阅读次数:
0
mysql 系统提供了很多的函数 count:统计个数,次数,null不统计 max:最大值 min:最小值 sum求和 avg平均值 round:四舍五入 ...
分类:
数据库 时间:
2021-04-09 13:30:01
阅读次数:
0
Leetcode67-二进制求和 给你两个二进制字符串,返回它们的和(用二进制表示)。输入为非空字符串且只包含数字 1 和 0。 示例 1: 输入: a = "11", b = "1" 输出: "100" 示例 2: 输入: a = "1010", b = "1011" 输出: "10101" 本题 ...
分类:
其他好文 时间:
2021-04-09 13:24:02
阅读次数:
0
第二类斯特林数的通项公式: \(S(n,k) = \frac {\sum_{i=0}^k (-1)^i*\binom{k}{i}*(k-i)^n}{k!}\) 带入原式可得: $$\sum_^n\sum_n S(i,j)*2jj!\= \sum_^n\sum_n 2jj!\frac {\sum_^j ...
分类:
其他好文 时间:
2021-04-08 13:00:20
阅读次数:
0
P5495 Dirichlet前缀和 题意 给定长度为$n$的序列$a_i$,求出长度为$n$的数列$b$满足 \[ b_k = \sum_{i|k}a_i \] 对$b$取模$2^{32}$ \[ 1 \leq n \leq 2\times10^7 \] 分析 $a_i$贡献到$b_j$当且仅当任 ...
分类:
其他好文 时间:
2021-04-07 11:37:23
阅读次数:
0