No valid executable file was produced by the compiler
./cc77eA63.o: in function _GLOBAL__sub_I_src': src:(.text.startup+0x1d7): relocation truncated to fit: R_X86_64_PC32 against .bss'
src:(.text.startup+0x1f1): relocation truncated to fit: R_X86_64_PC32 against `.bss'
collect2: 错误:ld 返回 1
代码:
#include<bits/stdc++.h>
using namespace std;
int c,n;
int vi,wi,dp[2005][1000005];
int i,j,k;
int main( ) {
cin>>c>>n;
for(k=1;k<=n;k++){
cin>>vi>>wi;
for(i=1;i<=n;i++){
for(j=1;j<=c;j++){
dp[i][j]=max(dp[i-1][j],dp[i][j-vi]+wi);
}
}
}
cout<<dp[n][c];
return 0;
}
显示报错,编译器正常通过,求助,谢谢