首页 > 其他 > 详细

leetcode-1476-子矩形查询

时间:2020-06-17 18:46:43      阅读:55      评论:0      收藏:0      [点我收藏+]

技术分享图片

 

 提交:

class SubrectangleQueries:

    def __init__(self, rectangle: List[List[int]]):
        self.list = rectangle

    def updateSubrectangle(self, row1: int, col1: int, row2: int, col2: int, newValue: int) -> None:
        for i in range(row1,row2+1):
            for j in range(col1,col2+1):
                self.list[i][j] = newValue

    def getValue(self, row: int, col: int) -> int:
        return self.list[row][col]

 

leetcode-1476-子矩形查询

原文:https://www.cnblogs.com/oldby/p/13153806.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!