illmondo's blog

By illmondo, history, 4 weeks ago, In English,

Hello, coders. Here is an interesting problem I created.
You are given a list of strings with total size n. We define subanagram of a string s, such string s1 that for every character c (a-z letters only) count(c, s1) <= count(c, s) . You are given q queries. Each consists of a single string s. You have to output the number of subanagrams of s in the given list of strings. Constraints: n<= 10^6. Length of every string <= 30. q<= 10^4.

 
 
 
 

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by illmondo (previous revision, new revision, compare).

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Do you mean the number of subanagrams that appear in the given list?