/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void dfs(int, int, int)':
foo.cpp:78:47: error: reference to 'ref' is ambiguous
   for (int i = 1; i <= M; ++i) if (!e[i].del) ref[e[i].u] = ref[e[i].v] = 1;
                                               ^
foo.cpp:26:24: note: candidates are: int ref [55]
 int deg[55], prec[55], ref[55], fa[55];
                        ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:66:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\functional:493:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(std::reference_wrapper<_Tp>)
     ref(reference_wrapper<_Tp> __t) noexcept
     ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\functional:485:10: note:                 template<class _Tp> void std::ref(const _Tp&&)
     void ref(const _Tp&&) = delete;
          ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\functional:475:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&)
     ref(_Tp& __t) noexcept
     ^
foo.cpp:78:61: error: reference to 'ref' is ambiguous
   for (int i = 1; i <= M; ++i) if (!e[i].del) ref[e[i].u] = ref[e[i].v] = 1;
                                                             ^
foo.cpp:26:24: note: candidates are: int ref [55]
 int deg[55], prec[55], ref[55], fa[55];
                        ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:66:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\functional:493:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(std::reference_wrapper<_Tp>)
     ref(reference_wrapper<_Tp> __t) noexcept
     ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\functional:485:10: note:                 template<class _Tp> void std::ref(const _Tp&&)
     void ref(const _Tp&&) = delete;
          ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\functional:475:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&)
     ref(_Tp& __t) noexcept
     ^
foo.cpp:82:36: error: reference to 'ref' is ambiguous
   for (int i = 1; i <= N; ++i) if (ref[i]) comFa = (comFa == -1) ? getFa(i) : (comFa != getFa(i) ? -2 : comFa);
                                    ^
foo.cpp:26:24: note: candidates are: int ref [55]
 int deg[55], prec[55], ref[55], fa[55];
                        ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:66:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\functional:493:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(std::reference_wrapper<_Tp>)
     ref(reference_wrapper<_Tp> __t) noexcept
     ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\functional:485:10: note:                 template<class _Tp> void std::ref(const _Tp&&)
     void ref(const _Tp&&) = delete;
          ^
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\functional:475:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&)
     ref(_Tp& __t) noexcept
     ^
foo.cpp:83:47: error: reference to 'ref' is ambiguous
   for (int i = 1; i <= M; ++i) if (!e[i].del) ref[e[i].u] = ref[e[i].v] = 0;
                                               ^
foo.cpp:26:24: note: candidates are: int ref [55]
 int deg[55], prec[55], ref[55], fa[55];
                        ^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:66:0,
                 from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
                 from foo.cpp:1:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\functional:493:5: note:                 template<class _Tp> std::reference_w

信息

递交者
类型
递交
题目
P1694 Miku_Black Diamond
语言
C++
递交时间
2015-07-16 21:05:31
评测时间
2015-07-16 21:05:34
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes