leetcode.cn 2026-04-29
🔴3225.maximum-score-from-grid-operations
🏷️ Tags
#array #dynamic_programming #matrix #prefix_sum
🔴3225.maximum-score-from-grid-operations
🏷️ Tags
#array #dynamic_programming #matrix #prefix_sum
Telegraph
maximum-score-from-grid-operations
给你一个大小为 n x n 的二维矩阵 grid ,一开始所有格子都是白色的。一次操作中,你可以选择任意下标为 (i, j) 的格子,并将第 j 列中从最上面到第 i 行所有格子改成黑色。 如果格子 (i, j) 为白色,且左边或者右边的格子至少一个格子为黑色,那么我们将 grid[i][j] 加到最后网格图的总分中去。 请你返回执行任意次操作以后,最终网格图的 最大 总分数。 示例 1: 输入:grid = [[0,0,0,0,0],[0,0,3,0,0],[0,1,0,0,0],[5,0,0,3…
leetcode.com 2026-04-29
🔴3225.maximum-score-from-grid-operations
🏷️ Tags
#array #dynamic_programming #matrix #prefix_sum
🔴3225.maximum-score-from-grid-operations
🏷️ Tags
#array #dynamic_programming #matrix #prefix_sum
Telegraph
maximum-score-from-grid-operations
You are given a 2D matrix grid of size n x n. Initially, all cells of the grid are colored white. In one operation, you can select any cell of indices (i, j), and color black all the cells of the jth column starting from the top row down to the ith row. The…
leetcode.cn 2026-05-10
🟡2770.maximum-number-of-jumps-to-reach-the-last-index
🏷️ Tags
#array #dynamic_programming
🟡2770.maximum-number-of-jumps-to-reach-the-last-index
🏷️ Tags
#array #dynamic_programming
Telegraph
maximum-number-of-jumps-to-reach-the-last-index
给你一个下标从 0 开始、由 n 个整数组成的数组 nums 和一个整数 target 。 你的初始位置在下标 0 。在一步操作中,你可以从下标 i 跳跃到任意满足下述条件的下标 j :
leetcode.com 2026-05-10
🟡2770.maximum-number-of-jumps-to-reach-the-last-index
🏷️ Tags
#array #dynamic_programming
🟡2770.maximum-number-of-jumps-to-reach-the-last-index
🏷️ Tags
#array #dynamic_programming
Telegraph
maximum-number-of-jumps-to-reach-the-last-index
You are given a 0-indexed array nums of n integers and an integer target. You are initially positioned at index 0. In one step, you can jump from index i to any index j such that: