/in/foo.cc: In function 'int main()':
/in/foo.cc:11:26: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
scanf("%I64d%I64d",&n,&p);
~~ ^
/in/foo.cc:11:26: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long long int*' [-Wformat=]
/in/foo.cc:12:43: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
for(int i=1;i<=n;i++) scanf("%I64d",&a[i]);
~~~~~^
/in/foo.cc:28:34: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
if(flag) printf("%I64d\n",f[n]%p);
~~~~~~^
/in/foo.cc:29:30: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
else printf("%I64d\n",f[1]%p);
~~~~~~^