Given is a matrix M with dimensions 1 = m,n = 1000. It is first filled with integers in a row major order, sequentially from 1 to m x n.
Processing a list of inquiries while manipulating M is the task, and each query must be one of the following three. M's xth and yth rows are switched in R(x, y), where x and y range from 1 to m. M's xth and yth columns, where x and y range from 1 to n, are switched by the function C(x, y). P(x, y) prints the element located at the xth row and the yth column, where x ranges from 1 to m and y ranges from 1 to n.
Learn more about range here-
https://brainly.com/question/8723490
#SPJ4