/ Vijos /

记录详情

Compile Error

foo.c: In function 'main':
foo.c:9:23: warning: statement with no effect [-Wunused-value]
    9 |         for(int j=V;;j>=v[i];j--)
      |                      ~^~~~~~
foo.c:9:29: error: expected ')' before ';' token
    9 |         for(int j=V;;j>=v[i];j--)
      |            ~                ^
      |                             )
foo.c:10:19: warning: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   10 |             dp[j]=max(dp[j],dp[j-v[i]]+v[i]);
      |                   ^~~
foo.c:11:22: error: 'm' undeclared (first use in this function)
   11 |     printf("%d",V-dp[m]);
      |                      ^
foo.c:11:22: note: each undeclared identifier is reported only once for each function it appears in
foo.c:5:9: warning: unused variable 'vleft' [-Wunused-variable]
    5 |     int vleft=V,dp[20001];
      |         ^~~~~
foo.c:4:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    4 |     scanf("%d%d",&V,&n);
      |     ^~~~~~~~~~~~~~~~~~~
foo.c:7:9: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    7 |         scanf("%d",&v[i]);
      |         ^~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1133 装箱问题
语言
C
递交时间
2022-05-09 22:28:39
评测时间
2022-05-09 22:28:39
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes