夏天的枫_

关注

Leetcode 中等

夏天的枫_

关注

阅读 28

2022-02-12

Leetcode

  • [2017. 网格游戏](https://leetcode-cn.com/problems/grid-game/)

2017. 网格游戏

class Solution:
    def gridGame(self, G: List[List[int]]) -> int:
        T = [0] + list(accumulate(G[0]))
        B = [0] + list(accumulate(G[1]))
        return min(max(T[len(T) - 1] - T[i], B[i-1]) for i in range(1, len(T)))

相关推荐

卿卿如梦

空格替换LeetCode中等题

卿卿如梦 51 0 0

8052cf60ff5c

LeetCode [中等]矩阵置零

8052cf60ff5c 48 0 0

西风白羽

Leetcode—86.分隔链表【中等】

西风白羽 41 0 0

伊人幽梦

Leetcode—328. 奇偶链表【中等】

伊人幽梦 27 0 0

迪莉娅1979

LeetCode[中等] 279.完全平方

迪莉娅1979 12 0 0

you的日常

leetcode数据库中等题目

you的日常 31 0 0

知年_7740

Leetcode—46.全排列【中等】

知年_7740 59 0 0

书坊尚

LeetCode-707设计链表-中等

书坊尚 48 0 0

老罗话编程

LeetCode(65)LRU 缓存【链表】【中等】

老罗话编程 47 0 0

有态度的萌狮子

LeetCode中等题之整数反转

有态度的萌狮子 42 0 0

精彩评论(0)

0 0 举报