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:45:3: error: reference to 'hash' is ambiguous
45 | hash[1]=1;
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6722,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:4:7: note: 'int hash [10]'
4 | int n,hash[10],minn=9879841;
| ^~~~
foo.cc:47:5: error: reference to 'hash' is ambiguous
47 | hash[i]=hash[i-1]<<1;
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6722,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:4:7: note: 'int hash [10]'
4 | int n,hash[10],minn=9879841;
| ^~~~
foo.cc:47:13: error: reference to 'hash' is ambiguous
47 | hash[i]=hash[i-1]<<1;
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6722,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:4:7: note: 'int hash [10]'
4 | int n,hash[10],minn=9879841;
| ^~~~
foo.cc:56:27: error: reference to 'hash' is ambiguous
56 | if(b[5-j]=='0') a[i]+=hash[j];
| ^~~~
In file included from /usr/include/c++/9/bits/basic_string.h:6722,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/functional_hash.h:58:12: note: candidates are: 'template<class _Tp> struct std::hash'
58 | struct hash;
| ^~~~
foo.cc:4:7: note: 'int hash [10]'
4 | int n,hash[10],minn=9879841;
| ^~~~
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);
| ~~~~~^~~~~~~~
[Hydro](https://hydro.ac)提供评测服务