#K65477. Count Influencers in Social Media Accounts

    ID: 32206 Type: Default 1000ms 256MiB

Count Influencers in Social Media Accounts

Count Influencers in Social Media Accounts

You are given n social media accounts and a threshold value l. Each account has a number of posts and each post has a certain number of likes. An account is considered an influencer if all of its posts have at least l likes. Note that if an account has no posts, it is trivially considered as an influencer.

In mathematical terms, an account with m posts and likes \(a_1, a_2, \ldots, a_m\) is an influencer if:

\[ \forall i \in \{1, 2, \ldots, m\},\; a_i \ge l \]

Your task is to count the total number of influencer accounts.

inputFormat

The input is given via stdin and has the following format:

n l
m1
like1,1 like1,2 ... like1,m1
...
mn
liken,1 liken,2 ... liken,mn

Here, the first line contains two integers: n (the number of accounts) and l (the like threshold). For each account, the first line provides an integer m which is the number of posts of the account, followed by a line with m integers representing the likes for each post. If m is 0, the following line will be empty.

outputFormat

Output a single integer on stdout representing the number of influencer accounts.

## sample
3 10
3
15 20 25
2
5 15
4
10 10 10 10
2