记录详情

Compile Error

/in/foo.cc:3:7: error: 'i' was not declared in this scope
 int w[i],c[i];
       ^
/in/foo.cc:3:12: error: 'i' was not declared in this scope
 int w[i],c[i];
            ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:9:29: error: 'w' was not declared in this scope
  for(int i=1;i<=n;i++) cin>>w[i]>>c[i];
                             ^
/in/foo.cc:9:35: error: 'c' was not declared in this scope
  for(int i=1;i<=n;i++) cin>>w[i]>>c[i];
                                   ^
/in/foo.cc:11:18: error: 'w' was not declared in this scope
   for(int j=m;j>=w[i];j++)
                  ^
/in/foo.cc:12:31: error: 'c' was not declared in this scope
    dp[j]=max(dp[j],dp[j-w[i]]+c[i]);
                               ^

信息

递交者
类型
自测
题目
P1011 [蓝桥杯省赛 2021 中级组] 最大价值
语言
C++
递交时间
2024-01-27 19:18:44
评测时间
2024-01-27 19:18:44
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes