请大佬看一下为什么CE了(在编译器上编译时360助手就显示有木马)
#include <bits/stdc++.h>
using namespace std;
long long a[2000001]={0,1},h[100000001],o=1e9+7,nxt[2000001],tot=0,real_[2000001];
inline void insert(long long x)
{
tot++;
nxt[tot]=h[x%o];
h[x%o]=tot;
real_[tot]=x;
}
inline int find(long long x)
{
for(int i=h[x%o];i;i=nxt[i])
{
if(real_[i]==x)
return 1;
}
return 0;
}
int main()
{
int n,m,p;
cin>>n>>m>>p;
insert(1);
for(int i=1;i<=2000000;i++)
{
a[i]=(n*a[i-1]+a[i-1]%m)%p;
if(find(a[i]))
{
cout<<i;
return 0;
}
else
{
insert(a[i]);
}
}
cout<<-1;
return 0;
}