/ Vijos /

记录详情

Accepted

/in/foo.cc: In function 'int main()':
/in/foo.cc:5:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for(scanf("%d%d",&n,&m);n--;)for(scanf("%d%d",&j,&k),i=m;i>=k;--i)dp[i]=max(dp[i],dp[i-k]+j);printf("%d\n",dp[m]);
     ^~~
/in/foo.cc:5:98: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
     for(scanf("%d%d",&n,&m);n--;)for(scanf("%d%d",&j,&k),i=m;i>=k;--i)dp[i]=max(dp[i],dp[i-k]+j);printf("%d\n",dp[m]);
                                                                                                  ^~~~~~
# 状态 耗时 内存占用
#1 Accepted 2ms 472.0 KiB
#2 Accepted 2ms 952.0 KiB
#3 Accepted 1ms 216.0 KiB
#4 Accepted 1ms 216.0 KiB
#5 Accepted 1ms 216.0 KiB
#6 Accepted 1ms 216.0 KiB
#7 Accepted 1ms 216.0 KiB
#8 Accepted 1ms 216.0 KiB
#9 Accepted 1ms 216.0 KiB
#10 Accepted 1ms 216.0 KiB

信息

递交者
类型
递交
题目
P1025 小飞侠的游园方案
语言
C++
递交时间
2018-12-20 07:42:08
评测时间
2018-12-20 07:42:08
评测机
分数
100
总耗时
15ms
峰值内存
952.0 KiB