werewolf97's blog

By werewolf97, history, 3 years ago, In English

Given a string A. You need to solve Q queries. In each queries, you will be given a string B[i]. You need to find the count of the number of substrings of A which are anagrams of B[i].

Contraints:

1<=|A|, |B[i]|<=10^5 1<=Q<=10^5 summation|B[i]|<=2x10^5 All the strings consists of lowercase English letters.

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it