1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-06 07:51:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2023-12-09 19:57:46 +08:00
parent 9bc4722a45
commit 3770b44d1e
4792 changed files with 10889 additions and 10886 deletions

View File

@@ -155,7 +155,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"7.4K\", \"totalSubmission\": \"12.1K\", \"totalAcceptedRaw\": 7408, \"totalSubmissionRaw\": 12102, \"acRate\": \"61.2%\"}",
"stats": "{\"totalAccepted\": \"7.4K\", \"totalSubmission\": \"12.1K\", \"totalAcceptedRaw\": 7412, \"totalSubmissionRaw\": 12106, \"acRate\": \"61.2%\"}",
"hints": [
"Imagine each row as a separate array. Instead of updating the whole submatrix together, we can use prefix sum to update each row separately.",
"For each query, iterate over the rows i in the range [row1, row2] and add 1 to prefix sum S[i][col1], and subtract 1 from S[i][col2 + 1].",