构造
小于10^5的直接输出1
大于10^5的构造如下的串
1111...12222...233....3.....t,t+1,t+2..
设长度为n,每种字符出现了L[i]次则不同的串有 n*n+n-sigma(L[i])=2*K
大约估计一个n,用贪心求出L
Virtual Participation
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 711 Accepted Submission(s): 205
Special Judge
Problem Description
As we know, Rikka is poor at math. Yuta is worrying about this situation, so he asks rikka to have some practice on codeforces. Then she opens the problem B:
Given an integer K , she needs to come up with an sequence of integers A satisfying that the number of different continuous subsequence of A is equal to k .
Two continuous subsequences a, b
Given an integer K , she needs to come up with an sequence of integers A satisfying that the number of different continuous subsequence of A is equal to k .
Two continuous subsequences a, b