/in/foo.cc: In function 'int main()':
/in/foo.cc:17:30: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
if(x==0) while(scanf("%d",&n)!=EOF) printf("%lld\n",a[n]);
~~^
/in/foo.cc:18:30: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
if(x==1) while(scanf("%d",&n)!=EOF) printf("%lld\n",b[n]);
~~^
/in/foo.cc:14:43: warning: iteration 500000 invokes undefined behavior [-Waggressive-loop-optimizations]
for(int i=5;i<=1000005;i+=2,temp+=4) a[i]=a[i-1]+temp,a[i+1]=a[i]+temp;
~~~~^~~~~~~~~~~~
/in/foo.cc:14:15: note: within this loop
for(int i=5;i<=1000005;i+=2,temp+=4) a[i]=a[i-1]+temp,a[i+1]=a[i]+temp;
~^~~~~~~~~
/in/foo.cc:16:62: warning: iteration 499998 invokes undefined behavior [-Waggressive-loop-optimizations]
for(int i=8;i<=1000005;i+=2,temp+=4) b[i]=b[i-1]+temp,b[i+1]=b[i]+temp;
~~~~~~^~~~~~~~~~
/in/foo.cc:16:15: note: within this loop
for(int i=8;i<=1000005;i+=2,temp+=4) b[i]=b[i-1]+temp,b[i+1]=b[i]+temp;
~^~~~~~~~~