想了好久还以为可以开13w个变量天真的我
因为最多那个超过了一半,所以用它来和其他的杂七杂八的对消剩下的一定是它
然后消掉就好了,还有就是,千万别include iostream,内存会稍微爆掉的
#include<cstdio>
using namespace std;
int tot,t,n,x;
int main()
{
scanf("%d",&n);
while(n--)
{
scanf("%d",&x);
if(!tot)
{
t=x;
tot++;
}else
if(x==t)tot++;
else tot--;
}
printf("%d\n",t);
return 0;
}