foo.cpp: In function 'matrix Jie(long long int, long long int, int&, int&, long long int)':
foo.cpp:90:8: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (x1<0) x1+=p;if (x2<0) x2+=p;
^~
foo.cpp:90:24: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if (x1<0) x1+=p;if (x2<0) x2+=p;
^~
foo.cpp: In function 'void Work()':
foo.cpp:108:21: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
memset(flag,0,k+1<<2);
~^~
foo.cpp: In function 'int main()':
foo.cpp:158:31: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
scanf("%I64d%d%d",&n,&k,&p);
^