A magical grid of n rows and m columns contains integers from 0 to k 1. Each element in the grid goes through the following transformation after each unit of time. grid [i] [j] becomes (grid[i] [j]+1 ) \% k after each unit of time. You are given a 2D array of q queries in the format [t, val, Lx,ly,rx,ry]. Each query contains - t (time) - val (value) - Ix, ly (coordinates of top left corner of subgrid) - rx, ry (coordinates of bottom right corner of subgrid) For each query, find the number of elements in the given subgrid at time t that have the value val. Return an array with the answer to each query. Note: The grid starts at time t=0 and the indices are 0 -based. All Problems K Transformation Accuracy: 66.67% Submissions: 6 Points: 35 Example 1: Input : n=2,m=2k=3grid={{0,1},{2,2}}q=1queries={{1,0,0,0,1,1}} Output: {2} Explanation: Given query can be interpreted as t (time )=1 - val (value) =0 - lx, ly (coordinates of top left corner of subgrid) =(,) - rx,ry (coordinates of bottom right corner of subgrid) =(1,1) Here, the subgrid is the given grid itself. All Problems K Transformation Accuracy: 66.67% Submissions: 6 Points: 35 Output: {2} Explanation: Given query can be interpreted as t (time) =1 - val (value) =0 - lx, ly (coordinates of top left corner of subgrid) =(,) - rx, ry (coordinates of bottom right corner of subgrid) =(1,1) Here, the subgrid is the given grid itself. The count of s at time =1 in the given subgrid is 2 . Your Task: You don't need to read input or print anything. Your task is to complete the function k_Transformation() which takes an integers n,m,k, a 2D array grid, an integer q, and a 2D array queries as input parameters. It returns an array of length q where ith elements correspond to the answer of ith query. Constraints: 1n,m6001k50grid[i][j],val