Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:26:17: error: 'intans' was not declared in this scope
   26 |                 intans=0;
      |                 ^~~~~~
/in/foo.cc:27:21: error: 'intk' was not declared in this scope; did you mean 'int'?
   27 |                 for(intk=0; k<=x; k++)ans=max(ans,dp[m][k]);
      |                     ^~~~
      |                     int
/in/foo.cc:27:29: error: 'k' was not declared in this scope
   27 |                 for(intk=0; k<=x; k++)ans=max(ans,dp[m][k]);
      |                             ^
/in/foo.cc:27:39: error: 'ans' was not declared in this scope; did you mean 'abs'?
   27 |                 for(intk=0; k<=x; k++)ans=max(ans,dp[m][k]);
      |                                       ^~~
      |                                       abs
/in/foo.cc:28:31: error: 'ans' was not declared in this scope; did you mean 'abs'?
   28 |                 printf("%d\n",ans);
      |                               ^~~
      |                               abs

信息

递交者
类型
递交
题目
P2816 矩阵移动7级2 2024.9
语言
C++
递交时间
2026-08-08 16:24:50
评测时间
2026-08-08 16:24:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes