Compile Error

foo.cc:4:1: error: expected initializer before '}' token
    4 | }
      | ^
foo.cc:4:1: error: expected declaration before '}' token
foo.cc:5:2: error: expected unqualified-id before 'if'
    5 |  if(n==1) return 0;
      |  ^~
foo.cc:6:2: error: expected unqualified-id before 'for'
    6 |  for(int i=2;i<=sqrt(n);i++)
      |  ^~~
foo.cc:6:14: error: 'i' does not name a type
    6 |  for(int i=2;i<=sqrt(n);i++)
      |              ^
foo.cc:6:25: error: 'i' does not name a type
    6 |  for(int i=2;i<=sqrt(n);i++)
      |                         ^
foo.cc:13:3: error: expected unqualified-id before 'return'
   13 |   return 1;
      |   ^~~~~~
foo.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1056 动态规划
语言
C++
递交时间
2022-04-22 17:56:30
评测时间
2022-04-22 17:56:30
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes