On the Expected Subword Complexity of Random Words
In this article, we study the expected subword complexity of random words and some of its properties.
On the Expected Subword Complexity of Random Words
In this article, we study the expected subword complexity of random words and some of its properties.
本篇文章研究了随机字符串期望的本质不同子串个数及其相关的性质。
一个影院有 $n$ 排座位,每一排两个座位。有 $n$ 对情侣看电影,每个人随机坐,问恰好有 $K$ 对情侣坐在同一排的方案数。
$T$ 组询问。$1\le T\le 2\cdot 10^5$,$1\le n\le 5\cdot 10^6$,$0\le K\le n$。
给 $n$ 个数 $a_i$,求 $\operatorname{lcm}(f_{a_1},f_{a_2},\cdots f_{a_n})$。$f_i$ 是 Fibonacci 数列,$f_0=0,f_1=1,f_i=f_{i-2}+f_{i-1} (i>1)$。
$1\le n,\max\{a_i\}\le 10^6$
求长度为 $n$、字符集大小为 $m$ 的随机字符串的期望本质不同子串个数。
$1\le n\le 20$,$1\le m\le 5\cdot 10^6$