CF455D-Serega and Fun 题目: 题目描述: Serega loves fun. However, everyone has fun in the unique manner. Serega has fun by solving query problems. One day Fedor came up with such a problem. You are given an array $ a $ consisting of $ n $ positive integers and queries to it. The queries can be of two types: Make a unit cyclic shift to
P3181-[HAOI2016]找相同字符 题目: 题目描述: 给定两个字符串,求出在两个字符串中各取出一个子串使得这两个子串相同的方案数。两个方
P4248-[AHOI2013]差异 题目: 题目描述: 给定一个长度为 $n$ 的字符串 $S$,令 $T_i$ 表示它从第 $i$ 个字符开始的后缀。求 $\displaystyle \sum_{1\leqslant i<j\leqslant n}\text{len}(T_i)+\text{len}(T_j)-2\times\text{lcp}(T_i,T_j)$ 其中,$\t
P3763-[TJOI2017]DNA 题目: 题目描述: 加里敦大学的生物研究所,发现了决定人喜不喜欢吃藕的基因序列 $S$,有这个序列的碱基序列就会表现出喜欢吃藕的性状,但是研究人
P3988-[SHOI2013]发牌 题目: 题目描述: 在一些扑克游戏里,如德州扑克,发牌是有讲究的。一般称呼专业的发牌手为荷官。荷官在发牌前,
SP8222-NSUBSTR - Substrings 题目: 题目描述: You are given a string S which consists of 250000 lowercase latin letters at most. We define F(x) as the maximal number of times that some string with length x appears in S. For example for string ‘ababa’ F(3) will be 2 because there is a string ‘aba’ that occurs twice. Your task is to output F(i) for every