#C3891. Count Cells Greater Than Threshold in a 4x4 Grid

    ID: 47368 Type: Default 1000ms 256MiB

Count Cells Greater Than Threshold in a 4x4 Grid

Count Cells Greater Than Threshold in a 4x4 Grid

Given a $4 \times 4$ grid of integers and an integer threshold $x$, your task is to count the number of cells whose values are greater than $x$.

The grid is represented as 4 rows, each containing 4 space-separated integers, followed by a fifth line with the integer $x$. Output a single integer representing the count of cells with a value greater than $x$.

inputFormat

The input consists of 5 lines:

  • Lines 1-4: Each line contains 4 space-separated integers representing one row of the 4x4 grid.
  • Line 5: A single integer $x$, the threshold value.

outputFormat

Output a single integer: the number of cells in the grid that contain a value greater than $x$.

## sample
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
10
6