Compile Error

/in/foo.cc: In function 'bool isValley(int, int)':
/in/foo.cc:20:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   20 | int main() {
      |         ^~
/in/foo.cc:20:9: note: remove parentheses to default-initialize a variable
   20 | int main() {
      |         ^~
      |         --
/in/foo.cc:20:9: note: or replace parentheses with braces to value-initialize a variable
/in/foo.cc:20:12: error: a function-definition is not allowed here before '{' token
   20 | int main() {
      |            ^
/in/foo.cc:31:2: error: expected '}' at end of input
   31 | }
      |  ^
/in/foo.cc:10:29: note: to match this '{'
   10 | bool isValley(int x, int y) {
      |                             ^
/in/foo.cc:31:2: warning: control reaches end of non-void function [-Wreturn-type]
   31 | }
      |  ^

信息

递交者
类型
递交
题目
P3053 山之谷 GESP202603 四级T1
语言
C++
递交时间
2026-04-08 19:13:33
评测时间
2026-04-08 19:13:33
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes