/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int dfs(int)':
foo.cpp:35:5: error: reference to 'hash' is ambiguous
  if(hash[tp]) return hash[tp];
     ^
foo.cpp:22:5: note: candidates are: int hash [16777216]
 int hash[1<<24],id[nmax][5];
     ^
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++\random:41,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:3:
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:35:22: error: reference to 'hash' is ambiguous
  if(hash[tp]) return hash[tp];
                      ^
foo.cpp:22:5: note: candidates are: int hash [16777216]
 int hash[1<<24],id[nmax][5];
     ^
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++\random:41,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:3:
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:44:31: error: reference to 'hash' is ambiguous
    rep(j,i+4,cur) a[j]--,mins(hash[tp],dfs(tmp+1));
                               ^
foo.cpp:22:5: note: candidates are: int hash [16777216]
 int hash[1<<24],id[nmax][5];
     ^
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++\random:41,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:3:
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:56:32: error: reference to 'hash' is ambiguous
    rep(j,i+2,cur) a[j]-=2,mins(hash[tp],dfs(tmp+1));
                                ^
foo.cpp:22:5: note: candidates are: int hash [16777216]
 int hash[1<<24],id[nmax][5];
     ^
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++\random:41,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:3:
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:32: error: reference to 'hash' is ambiguous
    rep(j,i+1,cur) a[j]-=3,mins(hash[tp],dfs(tmp+1));
                                ^
foo.cpp:22:5: note: candidates are: int hash [16777216]
 int hash[1<<24],id[nmax][5];
     ^
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++\random:41,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:3:
c:\mingw\lib\gcc\mingw32

信息

递交者
类型
递交
题目
P1980 斗地主
语言
C++
递交时间
2016-10-10 14:35:32
评测时间
2016-10-10 14:35:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes