随笔分类 - 2020 BIT冬训-二分三分快速幂矩阵
摘要:Problem Description 将N个点排列成一个圆形,中间放置一个点固定为根节点,问特殊生成树的种类数。 特殊生成树:除根节点以外,其他节点只能与自己左右节点相连,或与根节点相连。 p.s.若节点的左右节点为同一个节点,向左或向右连接视为不同的生成树。 由于种类数可能过大,对1,000,0
阅读全文
摘要:Problem Description Bruce Force has had an interesting idea how to encode strings. The following is the description of how the encoding is done:Let x1
阅读全文
摘要:In our daily life we often use 233 to express our feelings. Actually, we may say 2333, 23333, or 233333 ... in the same meaning. And here is the quest
阅读全文
摘要:Problem Description 考虑一个含有 N 个细胞的一维细胞自动机。细胞从 0 到 N-1 标号。每个细胞有一个被表示成一个小于 M 的非负 整数的状态。细胞的状态会在每个整数时刻发生骤变。我们定义 S(i,t) 表示第 i 个细胞在时刻 t 的状态。在 时刻 t+1 的状态被表示为
阅读全文
摘要:Problem Description Given a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + … + Ak. Input The input contains exactly one test
阅读全文
摘要:In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are:
阅读全文
摘要:Problem Description Kolya loves putting gnomes at the circle table and giving them coins, and Tanya loves studying triplets of gnomes, sitting in the
阅读全文
摘要:Problem Description You are given a sequence of n integers a1, a2, ..., an. Determine a real number x such that the weakness of the sequence a1 - x, a
阅读全文
摘要:Problem Description Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at position
阅读全文
摘要:Problem Description You are going to the beach with the idea to build the greatest sand castle ever in your head! The beach is not as three-dimensiona
阅读全文
摘要:Problem Description Bizon the Champion isn't just charming, he also is very smart. While some of us were learning the multiplication table, Bizon the
阅读全文
摘要:Problem Description Josephina is a clever girl and addicted to Machine Learning recently. Shepays much attention to a method called Linear Discriminan
阅读全文
摘要:Problem Description When a thin rod of length L is heated n degrees, it expands to a new length L'=(1+n*C)*L, where C is the coefficient of heat expan
阅读全文

浙公网安备 33010602011771号