foo.cc: In function 'void calc(int, int)':
foo.cc:9:10: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses]
9 | if(ans>minn|now>6) return;
| ~~~^~~~~
foo.cc:24:13: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
24 | if(a[5]==0 & ans<minn) minn=ans;
| ~~~~^~~
foo.cc: In function 'int main()':
foo.cc:44:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
44 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
foo.cc:54:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
54 | scanf("%s",b);
| ~~~~~^~~~~~~~
foo.cc:47:11: warning: iteration 8 invokes undefined behavior [-Waggressive-loop-optimizations]
47 | has[i]=has[i-1]<<1;
| ~~~~~~^~~~~~~~~~~~
foo.cc:46:16: note: within this loop
46 | for(int i=2;i<=10;i++)
| ~^~~~
[Hydro](https://hydro.ac)提供评测服务