Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link https://codeforces.com/10years. ×

G_Hani's blog

By G_Hani, history, 4 years ago, In English,

hi everyone :)

i'm trying to solve 629D - Babaei and Birthday Cake in the last contest Codeforces Round #343 (Div. 2) ...

my idea got WA6 .. but i can't find why !! i followed the editorial can anyone help me :( here is my code 16335124

i already solved this problem 340D - Bubble Sort Graph

Read more »

 
 
 
 
  • Vote: I like it
  • -6
  • Vote: I do not like it

By G_Hani, history, 4 years ago, In English,

Problem

you have a string S and two integers p and q and made a rule that names of the babies should be a substring of S, and the length should be between p and q (inclusive).

Now you are given S, p and q you have to find the number of distinct names that can be made.

Input :

The length of S will be between 2 and 10000 (inclusive) and S contains lowercase English letters only. The next line contains two integer p and q (1 ≤ p ≤ q ≤ length(S)).

output :

For each case, print the case number and the number of distinct names that can be made.

Sample :

input:

1

abcdef

2 5

answer:

Case 1: 14

I'm new with Suffix array, i already solve DISUBSTR. and here is my code.

i'm asking how i can modified my code to get the above problem AC ?

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it