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
SP705-SUBST1 - New Distinct Substrings 题目: 题目描述: Given a string, we need to find the total number of its distinct substrings. 输入格式: T- number of test cases. T<=20; Each test case consists of one string, whose length is <= 50000 输出格式: For each test case output one number saying the number of distinct substrings. 样例
SP694-DISUBSTR - Distinct Substrings 题目: 题目描述: Given a string, we need to find the total number of its distinct substrings. 输入格式: T- number of test cases. T<=20; Each test case consists of one string, whose length is <= 1000 输出格式: For each test case output one number saying the number of distinct substrings. 样例:
CF1458E-Nim Shortcuts 题目: 题目描述: After your debut mobile game “Nim” blew up, you decided to make a sequel called “Nim 2”. This game will expand on the trusted Nim game formula, adding the much awaited second heap! In the game, there are two heaps, each containing a non-negative number of stones. Two players make moves in turn. On their turn, a player can take
CF1458D-Flip and Reverse 题目: 题目描述: You are given a string $ s $ of 0’s and 1’s. You are allowed to perform the following operation: choose a non-empty contiguous substring of $ s $ that contains an equal number of 0’s and 1’s; flip all characters in the substring, that is, replace all 0’s with 1’s, and vice versa; reverse the substring. For example,