/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int main()':
foo.cpp:46:5: error: reference to 'hash' is ambiguous
     hash[s] = 1;
     ^
foo.cpp:13:5: note: candidates are: int hash [10000001]
 int hash[10000001];
     ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.h:3033:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:52,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\locale_classes.h:40,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\ios_base.h:41,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:42,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^
foo.cpp:67:28: error: reference to 'hash' is ambiguous
                         if(hash[xxx] == 0) {
                            ^
foo.cpp:13:5: note: candidates are: int hash [10000001]
 int hash[10000001];
     ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.h:3033:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:52,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\locale_classes.h:40,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\ios_base.h:41,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:42,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^
foo.cpp:68:42: error: reference to 'hash' is ambiguous
                             q.push(xxx), hash[xxx] = hash[q.front()] + 1;
                                          ^
foo.cpp:13:5: note: candidates are: int hash [10000001]
 int hash[10000001];
     ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.h:3033:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:52,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\locale_classes.h:40,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\ios_base.h:41,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:42,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^
foo.cpp:68:54: error: reference to 'hash' is ambiguous
                             q.push(xxx), hash[xxx] = hash[q.front()] + 1;
                                                      ^
foo.cpp:13:5: note: candidates are: int hash [10000001]
 int hash[10000001];
     ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.h:3033:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:52,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\locale_classes.h:40,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\ios_base.h:41,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:42,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\functional_hash.h:58:12: note:                 template<class _Tp> struct std::hash
     struct hash;
            ^
foo.cp

信息

递交者
类型
递交
题目
P1206 CoVH之再破难关
语言
C++
递交时间
2016-09-21 18:30:50
评测时间
2016-09-21 18:30:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes