#C5141. Count Substrings (Case-Insensitive)

    ID: 48758 Type: Default 1000ms 256MiB

Count Substrings (Case-Insensitive)

Count Substrings (Case-Insensitive)

Given a list of strings and a target string, your task is to count how many of the strings contain the target as a substring, regardless of case. In other words, for each string in the list, if the target string appears at least once (ignoring character case), then it should be counted.

Note: Each string is counted at most once even if the target string appears multiple times in it.

Input/Output: The input will be provided via standard input and the output must be printed to standard output.

Formally, if you have a list of strings \(S = [s_1, s_2, \dots, s_n]\) and a target string \(T\), you need to count the number of strings \(s_i\) such that \(T\) is a substring of \(s_i\) when both are converted to lowercase.

inputFormat

The input is read from standard input as follows:

  1. The first line contains a single integer \(n\) representing the number of strings.
  2. The following \(n\) lines each contain one string.
  3. The last line contains the target string.

outputFormat

Output a single integer, which is the count of strings in which the target string appears as a substring (case-insensitive).

## sample
4
hello
world
HELLO
wORLD
hello
2