为什么编译失败?
代码:
#include<bits/stdc++.h>
using namespace std;
int a[1000000005];
int main()
{
int n,mm=-1;
cin>>n;
for(int i=1; i<=n; i++)
{
int t;
cin>>t;
mm=max(mm,t);
a[t]++;
}
int maxn=0;
for(int i=1; i<=mm; i++) maxn=max(maxn,a[i]);
int tot=0;
for(int i=1; i<=mm; i++) if(a[i]==maxn) tot++;
cout<<tot<<endl;
for(int i=1; i<=mm; i++) if(a[i]==maxn) cout<<i<<" ";
return 0;
}
错误信息:
No valid executable file was produced by the compiler
./ccpn9aAa.o: in function `__static_initialization_and_destruction_0(int, int)':
src:(.text+0x1a0): relocation truncated to fit: R_X86_64_PC32 against `.bss'
src:(.text+0x1b9): relocation truncated to fit: R_X86_64_PC32 against `.bss'
collect2: 错误:ld 返回 1