/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void Build_Tree(int, int, int)':
foo.cpp:31:42: error: reference to 'rank' is ambiguous
       if ( x==y ) tr[ i ].mintr = E_val[ rank[ x ] ] ;
                                          ^
foo.cpp:15:63: note: candidates are: int rank [300010]
 int head[maxN] ,father[maxN],DFN[maxN],hv[maxN],/*ind[maxN],*/rank[maxN],E_val[maxN],start[maxN],pre[maxN];
                                                               ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\move.h:57:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_pair.h:59,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:64,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\istream:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\sstream:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\complex:45,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ccomplex:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\mingw32\bits\stdc++.h:52,
                 from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\type_traits:1243:12: note:                 template<class> struct std::rank
     struct rank
            ^
foo.cpp: In function 'void DFS(int, int)':
foo.cpp:83:7: error: reference to 'rank' is ambiguous
       rank[ dfs_num ] = x ; 
       ^
foo.cpp:15:63: note: candidates are: int rank [300010]
 int head[maxN] ,father[maxN],DFN[maxN],hv[maxN],/*ind[maxN],*/rank[maxN],E_val[maxN],start[maxN],pre[maxN];
                                                               ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\move.h:57:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_pair.h:59,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:64,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\istream:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\sstream:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\complex:45,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ccomplex:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\mingw32\bits\stdc++.h:52,
                 from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\type_traits:1243:12: note:                 template<class> struct std::rank
     struct rank
            ^
foo.cpp: In function 'void DEBUG__(int)':
foo.cpp:127:61: error: reference to 'rank' is ambiguous
   for ( int i=1 ; i<=n ; ++i )printf ("%d : %d\n", i ,E_val[rank[ i ] ] ) ;
                                                             ^
foo.cpp:15:63: note: candidates are: int rank [300010]
 int head[maxN] ,father[maxN],DFN[maxN],hv[maxN],/*ind[maxN],*/rank[maxN],E_val[maxN],start[maxN],pre[maxN];
                                                               ^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\move.h:57:0,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_pair.h:59,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:64,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\char_traits.h:39,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:40,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\istream:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\sstream:38,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\complex:45,
                 from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ccomplex:38,
                 from c:\mingw\lib\gcc

信息

递交者
类型
递交
题目
P1843 货车运输
语言
C++
递交时间
2016-10-02 11:32:09
评测时间
2016-10-02 11:32:11
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes