#include #include #include using namespace std; int solve(int n,int M,const vector &x){ vector v(n);v[0]=1; for(int i=1;i>=1){ if(y&1)z=z*x%mod; x=x*x%mod; } return z; } int main(){ int n,m; scanf("%d%d",&n,&m); vectorx(m); for(int i=0;i