1class SubrectangleQueries {2public:3vector<vector<int>> rect;4SubrectangleQueries(vector<vector<int>> &rectangle) {5rect = rectangle;6}78void updateSubrectangle(int row1, int col1, int row2, int col2, int newValue) {9for (int i = row1; i <= row2; ++i) {10for (int j = col1; j <= col2; ++j) {11rect[i][j] = newValue;12}13}14}1516int getValue(int row, int col) {17return rect[row][col];18}19};