/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void step1()':
foo.cpp:11:11: warning: unused variable 'q' [-Wunused-variable]
  edge *p,*q;
           ^
foo.cpp: In function 'int main()':
foo.cpp:45:2: error: reference to 'hash' is ambiguous
  hash[1]=1;
  ^
foo.cpp:8:42: note: candidates are: int hash [100001]
 int m,n,jg[100001],ma[100001],mi[100001],hash[100001],dl[100001];
                                          ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.h:3033:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\string:52,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\locale_classes.h:40,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\ios_base.h:41,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:42,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\tdm-gcc-32\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:50:3: error: reference to 'hash' is ambiguous
   hash[dl[p]]=0;
   ^
foo.cpp:8:42: note: candidates are: int hash [100001]
 int m,n,jg[100001],ma[100001],mi[100001],hash[100001],dl[100001];
                                          ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.h:3033:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\string:52,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\locale_classes.h:40,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\ios_base.h:41,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:42,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\tdm-gcc-32\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:57:8: error: reference to 'hash' is ambiguous
     if(hash[g->num]==0)
        ^
foo.cpp:8:42: note: candidates are: int hash [100001]
 int m,n,jg[100001],ma[100001],mi[100001],hash[100001],dl[100001];
                                          ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.h:3033:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\string:52,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\locale_classes.h:40,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\ios_base.h:41,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:42,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
                 from foo.cpp:1:
c:\tdm-gcc-32\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:60:6: error: reference to 'hash' is ambiguous
      hash[g->num]==1; 
      ^
foo.cpp:8:42: note: candidates are: int hash [100001]
 int m,n,jg[100001],ma[100001],mi[100001],hash[100001],dl[100001];
                                          ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.h:3033:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\string:52,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\locale_classes.h:40,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\ios_base.h:41,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\ios:42,

信息

递交者
类型
递交
题目
P1754 最优贸易
语言
C++
递交时间
2015-07-22 15:33:25
评测时间
2015-07-22 15:33:27
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes