我的dev编译不了,换到洛谷ide上也是同样的报错,求救
No valid executable file was produced by the compiler
/usr/bin/ld: ./cc9AKYn4.o: in function `__static_initialization_and_destruction_0(int, int)':
src:(.text+0x200): relocation truncated to fit: R_X86_64_PC32 against `.bss'
/usr/bin/ld: src:(.text+0x213): relocation truncated to fit: R_X86_64_PC32 against `.bss'
collect2: 错误:ld 返回 1
以下是代码
#include<iostream>
using namespace std;
int ans=0;
struct sea{
int t,k;
int x[10000];
}s[100000];
int x1[100000];
int main(){
int n;
cin>>n;
for(int i=1;i<=n;i++){
cin>>s[i].t>>s[i].k;
for(int j=1;j<=s[i].k;j++)cin>>s[i].x[i];
}
int tx=s[n].t-86400;
for(int i=1;i<=n;i++){
if(tx<s[i].t){
for(int q=1;q<=s[q].k;q++){
if(s[q].x[q]!=s[q].x[q+1]){
ans++;
cout<<ans<<endl;
}
}
}
}
return 0;
}