//【题意】 给定newx,k,m,方程(x^k)%m=newx,求在模m意义下的所有解x//【限制】 0 <= newx,m,k <= 1.5*10^15; m是素数# include <bits/stdc++.h>using namespace std;# define LL __int64LL mul(LL a,LL b,LL m){ LL ret=0; a%=m; while(b){ if(b&1) ret=(ret+a)%m; a=(a+a)%m; b>>=1; } return ret;}LL quick_pow(LL a,LL b,LL m){ LL ret=1; a%=m; while(b){ if(b&1) ret=mul(ret,a,m); a=mul(a,a,m); b>>=1; } return ret;}LL ext_gcd(LL a,LL b,LL &x,LL &y){ if(b==0){ x=1,y=0; return a; } LL ret=ext_gcd(b,a%b,y,x); y-=a/b*x; return ret;}vector<LL> a;bool g_test(LL g,LL p){ for(LL i=0;i<a.size();i++){ if(quick_pow(g,(p-1)/a[i],p)==1) return 0; } return 1;}LL pri_root(LL p){ a.clear(); LL tmp=p-1; for(LL i=2;i<=tmp/i;i++){ if(tmp%i==0){