Wrong Answer
/in/foo.cc: In function 'int main()': /in/foo.cc:21:57: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized] if(s[ans]==st[ans]) printf("%lld\n",min(q*p[ans],s[ans+1]*p[ans+1])); ~~~^~
/in/foo.cc: In function 'int main()': /in/foo.cc:21:57: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized] if(s[ans]==st[ans]) printf("%lld\n",min(q*p[ans],s[ans+1]*p[ans+1])); ~~~^~