#K7436. Counting Passing Widgets
Counting Passing Widgets
Counting Passing Widgets
You are given a series of widgets, each with several quality metrics. A widget passes the quality check if at most one of its quality metrics is less than 50. Formally, for each widget with metrics \(a_1, a_2, \ldots, a_k\), the widget passes if:
\(\#\{ i : a_i < 50 \} \le 1\).
Your task is to count the number of widgets that pass the quality check.
inputFormat
The input is given via standard input and includes:
- The first line contains an integer \(m\) representing the number of widgets.
- The following \(m\) lines each begin with an integer \(k\), the number of quality metrics for the widget, followed by \(k\) integers representing the metrics.
outputFormat
Output a single integer to standard output: the number of widgets that pass the quality check.
## sample3
5 55 60 47 72 88
3 49 51 52
4 49 48 50 50
2