{"id":2377,"date":"2022-01-25T14:15:58","date_gmt":"2022-01-25T06:15:58","guid":{"rendered":"http:\/\/139.9.1.231\/?p=2377"},"modified":"2022-01-25T14:15:59","modified_gmt":"2022-01-25T06:15:59","slug":"leetcodeday73","status":"publish","type":"post","link":"http:\/\/139.9.1.231\/index.php\/2022\/01\/25\/leetcodeday73\/","title":{"rendered":"leetcodeday73&#8211;\u77e9\u9635\u7f6e\u96f6"},"content":{"rendered":"\n<p>\u7ed9\u5b9a\u4e00\u4e2a&nbsp;<code><em>m<\/em> x <em>n<\/em><\/code>&nbsp;\u7684\u77e9\u9635\uff0c\u5982\u679c\u4e00\u4e2a\u5143\u7d20\u4e3a&nbsp;<strong>0&nbsp;<\/strong>\uff0c\u5219\u5c06\u5176\u6240\u5728\u884c\u548c\u5217\u7684\u6240\u6709\u5143\u7d20\u90fd\u8bbe\u4e3a&nbsp;<strong>0<\/strong>&nbsp;\u3002\u8bf7\u4f7f\u7528&nbsp;<strong><a href=\"http:\/\/baike.baidu.com\/item\/%E5%8E%9F%E5%9C%B0%E7%AE%97%E6%B3%95\" target=\"_blank\" rel=\"noreferrer noopener\">\u539f\u5730<\/a><\/strong>&nbsp;\u7b97\u6cd5<strong>\u3002<\/strong><\/p>\n\n\n\n<ul><li><\/li><\/ul>\n\n\n\n<p><strong>\u793a\u4f8b 1\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image is-style-default\"><img src=\"https:\/\/assets.leetcode.com\/uploads\/2020\/08\/17\/mat1.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>\u8f93\u5165\uff1a<\/strong>matrix = &#91;&#91;1,1,1],&#91;1,0,1],&#91;1,1,1]]\n<strong>\u8f93\u51fa\uff1a<\/strong>&#91;&#91;1,0,1],&#91;0,0,0],&#91;1,0,1]]<\/code><\/pre>\n\n\n\n<p>\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># @lc app=leetcode.cn id=73 lang=python3\r\n#\r\n# &#91;73] \u77e9\u9635\u7f6e\u96f6\r\n#\r\n\r\n# @lc code=start\r\nclass Solution:\r\n    def setZeroes(self, matrix: List&#91;List&#91;int]]) -> None:\r\n        \"\"\"\r\n        Do not return anything, modify matrix in-place instead.\r\n        \"\"\"\r\n        m=len(matrix)\r\n        n=len(matrix&#91;0])\r\n        res=list()\r\n        for i in range(m):\r\n            for j in range(n):\r\n                if matrix&#91;i]&#91;j]==0:\r\n                    res.append(&#91;i,j])\r\n        for l in res:\r\n            matrix&#91;l&#91;0]]=&#91;0]*n\r\n            for  x in matrix:\r\n                x&#91;l&#91;1]]=0 \r\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img loading=\"lazy\" width=\"923\" height=\"296\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/01\/image-289.png\" alt=\"\" class=\"wp-image-2378\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/01\/image-289.png 923w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/01\/image-289-300x96.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/01\/image-289-768x246.png 768w\" sizes=\"(max-width: 923px) 100vw, 923px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u7ed9\u5b9a\u4e00\u4e2a&nbsp;m x n&nbsp;\u7684\u77e9\u9635\uff0c\u5982\u679c\u4e00\u4e2a\u5143\u7d20\u4e3a&nbsp;0&nbsp;\uff0c\u5219\u5c06\u5176\u6240\u5728\u884c\u548c\u5217\u7684 &hellip; <a href=\"http:\/\/139.9.1.231\/index.php\/2022\/01\/25\/leetcodeday73\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">leetcodeday73&#8211;\u77e9\u9635\u7f6e\u96f6<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/2377"}],"collection":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/comments?post=2377"}],"version-history":[{"count":1,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/2377\/revisions"}],"predecessor-version":[{"id":2379,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/2377\/revisions\/2379"}],"wp:attachment":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/media?parent=2377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/categories?post=2377"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/tags?post=2377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}