Compile Error

foo.cc:3:5: error: expected class-name before 'maxValue'
 def maxValue(self, grid: List[List[int]]) -> int:
     ^~~~~~~~
foo.cc:3:5: error: expected '{' before 'maxValue'
foo.cc:3:14: error: 'self' was not declared in this scope
 def maxValue(self, grid: List[List[int]]) -> int:
              ^~~~
foo.cc:3:24: error: found ':' in nested-name-specifier, expected '::'
 def maxValue(self, grid: List[List[int]]) -> int:
                        ^
foo.cc:3:20: error: 'grid' has not been declared
 def maxValue(self, grid: List[List[int]]) -> int:
                    ^~~~
foo.cc:3:31: error: 'List' was not declared in this scope
 def maxValue(self, grid: List[List[int]]) -> int:
                               ^~~~
foo.cc:3:31: note: suggested alternative: 'int'
 def maxValue(self, grid: List[List[int]]) -> int:
                               ^~~~
                               int
foo.cc:3:36: error: expected primary-expression before 'int'
 def maxValue(self, grid: List[List[int]]) -> int:
                                    ^~~
foo.cc:3:36: error: expected ']' before 'int'
foo.cc:3:36: error: expected ']' before 'int'
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1131 最少数量的礼物
语言
C++
递交时间
2021-10-24 16:52:42
评测时间
2021-10-24 16:52:43
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes