Write a GPU program that counts the number of elements with the integer value k in an 2D array of 32-bit integers.
The program should count the number of elements with k in an 2D array.
You are given an input 2D array input of length N x M and integer k.
solve function signature must remain unchangedoutput variable
Input: input [[1, 2, 3],
[4, 5, 1]]
k = 1
Output: output = 2
Input: input [[5, 10],
[5, 2]]
k = 1
Output: output = 0
N, M ≤ 10,000input[i], k ≤ 100K = 1, M = 10,000, N = 10,000