foo.cc: In function 'int main()':
foo.cc:39:22: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[15]' [-Wformat=]
scanf("%s",&x);
~~^
foo.cc:40:14: error: reference to 'hash' is ambiguous
a[i]=hash(x);
^~~~
foo.cc:14:12: note: candidates are: ULL hash(char*)
inline ULL hash(char st[MAXC]) {
^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587:0,
from /usr/include/c++/7/string:52,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
foo.cc:44:22: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[15]' [-Wformat=]
scanf("%s",&x);
~~^
foo.cc:45:14: error: reference to 'hash' is ambiguous
t[i]=hash(x);
^~~~
foo.cc:14:12: note: candidates are: ULL hash(char*)
inline ULL hash(char st[MAXC]) {
^~~~
In file included from /usr/include/c++/7/bits/basic_string.h:6587:0,
from /usr/include/c++/7/string:52,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from foo.cc:1:
/usr/include/c++/7/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
foo.cc:37:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
foo.cc:39:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s",&x);
~~~~~^~~~~~~~~
foo.cc:42:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&m);
~~~~~^~~~~~~~~
foo.cc:44:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s",&x);
~~~~~^~~~~~~~~
自豪的采用 HydroJudge 进行评测(github.com/hydro-dev/HydroJudge)