/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void search()':
/in/foo.cc:22:2: error: reference to 'hash' is ambiguous
  hash[0]=1;
  ^~~~
/in/foo.cc:3:13: note: candidates are: bool hash [1024]
 bool st[11],hash[1024];
             ^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:36:8: error: reference to 'hash' is ambiguous
    if(!hash[x])
        ^~~~
/in/foo.cc:3:13: note: candidates are: bool hash [1024]
 bool st[11],hash[1024];
             ^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:38:5: error: reference to 'hash' is ambiguous
     hash[x]=1;
     ^~~~
/in/foo.cc:3:13: note: candidates are: bool hash [1024]
 bool st[11],hash[1024];
             ^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:44:7: error: reference to 'hash' is ambiguous
    if(hash[finish])
       ^~~~
/in/foo.cc:3:13: note: candidates are: bool hash [1024]
 bool st[11],hash[1024];
             ^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc: At global scope:
/in/foo.cc:63:1: error: expected unqualified-id before numeric constant
 1
 ^
/in/foo.cc:127:11: error: redefinition of 'bool st [11]'
 bool st[11],hash[1024];
           ^
/in/foo.cc:3:6: note: 'bool st [11]' previously declared here
 bool st[11],hash[1024];
      ^~
/in/foo.cc:127:22: error: redefinition of 'bool hash [1024]'
 bool st[11],hash[1024];
                      ^
/in/foo.cc:3:13: note: 'bool hash [1024]' previously declared here
 bool st[11],hash[1024];
             ^~~~
/in/foo.cc:128:15: error: redefinition of 'int mp [101][11]'
 int mp[101][11];
               ^
/in/foo.cc:4:5: note: 'int mp [101][11]' previously declared here
 int mp[101][11];
     ^~
/in/foo.cc:129:5: error: redefinition of 'int n'
 int n,m;//疾病数,药剂数 
     ^
/in/foo.cc:5:5: note: 'int n' previously declared here
 int n,m;//疾病数,药剂数 
     ^
/in/foo.cc:129:7: error: redefinition of 'int m'
 int n,m;//疾病数,药剂数 
       ^
/in/foo.cc:5:7: note: 'int m' previously declared here
 int n,m;//疾病数,药剂数 
       ^
/in/foo.cc:130:5: error: redefinition of 'int finish'
 int finish;
     ^~~~~~
/in/foo.cc:6:5: note: 'int finish' previously declared here
 int finish;
     ^~~~~~
/in/foo.cc:131:15: error: redefinition of 'int d [1024][10]'
 int d[1024][10];
               ^
/in/foo.cc:7:5: note: 'int d [1024][10]' previously declared here
 int d[1024][10];
     ^
/in/foo.cc: In function 'int Hash(bool*)':
/in/foo.cc:132:12: error: redefinition of 'int Hash(bool*)'
 inline int Hash(bool a[])//二进制转十进制
            ^~~~
/in/foo.cc:8:12: note: 'int Hash(bool*)' previously defined here
 inline int Hash(bool a[])//二进制转十进制
            ^~~~
/in/foo.cc: In function 'void search()':
/in/foo.cc:142:6: error: redefinition of 'void search()'
 void search()
      ^~~~~~
/in/foo.cc:18:6: note: 'void search()' previously defined here
 void search()
      ^~~~~~
/in/foo.cc:146:2: error: reference to 'hash' is ambiguous
  hash[0]=1;
  ^~~~
/in/foo.cc:3:13: note: candidates are: bool hash [1024]
 bool st[11],hash[1024];
             ^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:160:8: error: reference to 'hash' is ambiguous
    if(!hash[x])
        ^~~~
/in/foo.cc:3:13: note: candidates are: bool hash [1024]
 bool st[11],hash[1024];
             ^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:162:5: error: reference to 'hash' is ambiguous
     hash[x]=1;
     ^~~~
/in/foo.cc:3:13: note: candidates are: bool hash [1024]
 bool st[11],hash[1024];
             ^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc:168:7: error: reference to 'hash' is ambiguous
    if(hash[finish])
       ^~~~
/in/foo.cc:3:13: note: candidates are: bool hash [1024]
 bool st[11],hash[1024];
             ^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^~~~
/in/foo.cc: In functio

信息

递交者
类型
递交
题目
P1026 毒药?解药?
语言
C++
递交时间
2020-12-13 21:01:47
评测时间
2020-12-13 21:01:47
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes