/in/foo.cc: In function 'int main()':
/in/foo.cc:44:35: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
while (scanf("%d%d%d",&a,&p,&b)!=EOF)
^
/in/foo.cc:44:35: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long long int*' [-Wformat=]
/in/foo.cc:44:35: warning: format '%d' expects argument of type 'int*', but argument 4 has type 'long long int*' [-Wformat=]
/in/foo.cc:47:39: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
if (ans!=-1) printf("%d\n",ans);
^