https://www.gravatar.com/avatar/8f3abece0f8608ce4b9c1e3212fd1b72?s=240&d=mp

CF455D-Serega and Fun

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

SP8222-NSUBSTR - Substrings

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