Submission #00195
ソースコード
ステータス
項目 |
データ |
問題 |
0005 - 知識の証明 |
ユーザー名 |
ei1710
|
投稿日時 |
2019-03-29 15:29:21 |
言語 |
C++17 |
状態 |
Compile Error |
得点 |
0
|
ソースコード長 |
1713 Byte |
最大実行時間 |
-
|
最大メモリ使用量 |
|
コンパイルメッセージ
./Main.cpp: In function ‘int main()’:
./Main.cpp:32:21: error: reference to ‘hash’ is ambiguous
p = hash(bnf, pass);
^~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string_view:43,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:48,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:52,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/functional_hash.h:58:12: note: candidates are: ‘template<class _Tp> struct std::hash’
struct hash;
^~~~
./Main.cpp:13:14: note: ‘unsigned int hash(std::__cxx11::string, unsigned int*)’
unsigned int hash(string bnf, unsigned int pass[]);
^~~~
./Main.cpp:43:68: error: reference to ‘hash’ is ambiguous
unsigned int tmp = hash(bnf, pass);
^~~~
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string_view:43,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:48,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:52,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ostream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/functional_hash.h:58:12: note: candidates are: ‘template<class _Tp> struct std::hash’
struct hash;
^~~~
./Main.cpp:13:14: note: ‘unsigned int hash(std::__cxx11::string, unsigned int*)’
unsigned int hash(string bnf, unsigned int pass[]);
^~~~
セット
テストケース