/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int main()':
foo.cpp:19:1: error: reference to 'get' is ambiguous
 get[c]=get[c/10]+get[c%10];
 ^
foo.cpp:5:5: note: candidates are: int get [1000000]
 int get[1000000]={6,2,5,5,4,5,6,3,7,6};
     ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:60:0,
                 from foo.cpp:3:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/utility:153:5: note:                 template<unsigned int _Int, class _Tp1, class _Tp2> constexpr const typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(const std::pair<_Tp1, _Tp2>&)
     get(const std::pair<_Tp1, _Tp2>& __in) noexcept
     ^
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/utility:148:5: note:                 template<unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&& std::get(std::pair<_Tp1, _Tp2>&&)
     get(std::pair<_Tp1, _Tp2>&& __in) noexcept
     ^
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/utility:143:5: note:                 template<unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(std::pair<_Tp1, _Tp2>&)
     get(std::pair<_Tp1, _Tp2>& __in) noexcept
     ^
foo.cpp:19:8: error: reference to 'get' is ambiguous
 get[c]=get[c/10]+get[c%10];
        ^
foo.cpp:5:5: note: candidates are: int get [1000000]
 int get[1000000]={6,2,5,5,4,5,6,3,7,6};
     ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:60:0,
                 from foo.cpp:3:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/utility:153:5: note:                 template<unsigned int _Int, class _Tp1, class _Tp2> constexpr const typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(const std::pair<_Tp1, _Tp2>&)
     get(const std::pair<_Tp1, _Tp2>& __in) noexcept
     ^
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/utility:148:5: note:                 template<unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&& std::get(std::pair<_Tp1, _Tp2>&&)
     get(std::pair<_Tp1, _Tp2>&& __in) noexcept
     ^
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/utility:143:5: note:                 template<unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(std::pair<_Tp1, _Tp2>&)
     get(std::pair<_Tp1, _Tp2>& __in) noexcept
     ^
foo.cpp:19:18: error: reference to 'get' is ambiguous
 get[c]=get[c/10]+get[c%10];
                  ^
foo.cpp:5:5: note: candidates are: int get [1000000]
 int get[1000000]={6,2,5,5,4,5,6,3,7,6};
     ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:60:0,
                 from foo.cpp:3:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/utility:153:5: note:                 template<unsigned int _Int, class _Tp1, class _Tp2> constexpr const typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(const std::pair<_Tp1, _Tp2>&)
     get(const std::pair<_Tp1, _Tp2>& __in) noexcept
     ^
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/utility:148:5: note:                 template<unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&& std::get(std::pair<_Tp1, _Tp2>&&)
     get(std::pair<_Tp1, _Tp2>&& __in) noexcept
     ^
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/utility:143:5: note:                 template<unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(std::pair<_Tp1, _Tp2>&)
     get(std::pair<_Tp1, _Tp2>& __in) noexcept
     ^
foo.cpp:33:4: error: reference to 'get' is ambiguous
 if(get[a]+get[b]+get[e]+3==n)
    ^
foo.cpp:5:5: note: candidates are: int get [1000000]
 int get[1000000]={6,2,5,5,4,5,6,3,7,6};
     ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:60:0,
                 from foo.cpp:3

信息

递交者
类型
递交
题目
P1967 夜夜的花裙子
比赛
夜夜的模拟赛之十三岁的梦想
语言
C++
递交时间
2015-10-03 21:22:56
评测时间
2015-10-03 21:52:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes