/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void qpush(int)':
/in/foo.cc:15:5: error: reference to 'ref' is ambiguous
     ref[x] = lq;
     ^~~
/in/foo.cc:11:33: note: candidates are: int ref [3010]
 int lq = 0, q[3010], inq[3010], ref[3010];
                                 ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:71:0,
                 from /in/foo.cc:1:
/usr/include/c++/6/functional:491:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(std::reference_wrapper<_Tp>)
     ref(reference_wrapper<_Tp> __t) noexcept
     ^~~
/usr/include/c++/6/functional:483:10: note:                 template<class _Tp> void std::ref(const _Tp&&)
     void ref(const _Tp&&) = delete;
          ^~~
/usr/include/c++/6/functional:473:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&)
     ref(_Tp& __t) noexcept
     ^~~
/in/foo.cc:18:14: error: reference to 'ref' is ambiguous
         swap(ref[q[id]], ref[q[id >> 1]]);
              ^~~
/in/foo.cc:11:33: note: candidates are: int ref [3010]
 int lq = 0, q[3010], inq[3010], ref[3010];
                                 ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:71:0,
                 from /in/foo.cc:1:
/usr/include/c++/6/functional:491:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(std::reference_wrapper<_Tp>)
     ref(reference_wrapper<_Tp> __t) noexcept
     ^~~
/usr/include/c++/6/functional:483:10: note:                 template<class _Tp> void std::ref(const _Tp&&)
     void ref(const _Tp&&) = delete;
          ^~~
/usr/include/c++/6/functional:473:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&)
     ref(_Tp& __t) noexcept
     ^~~
/in/foo.cc:18:26: error: reference to 'ref' is ambiguous
         swap(ref[q[id]], ref[q[id >> 1]]);
                          ^~~
/in/foo.cc:11:33: note: candidates are: int ref [3010]
 int lq = 0, q[3010], inq[3010], ref[3010];
                                 ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:71:0,
                 from /in/foo.cc:1:
/usr/include/c++/6/functional:491:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(std::reference_wrapper<_Tp>)
     ref(reference_wrapper<_Tp> __t) noexcept
     ^~~
/usr/include/c++/6/functional:483:10: note:                 template<class _Tp> void std::ref(const _Tp&&)
     void ref(const _Tp&&) = delete;
          ^~~
/usr/include/c++/6/functional:473:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&)
     ref(_Tp& __t) noexcept
     ^~~
/in/foo.cc: In function 'void qrefresh(int)':
/in/foo.cc:26:14: error: reference to 'ref' is ambiguous
         swap(ref[q[x]], ref[q[x >> 1]]);
              ^~~
/in/foo.cc:11:33: note: candidates are: int ref [3010]
 int lq = 0, q[3010], inq[3010], ref[3010];
                                 ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:71:0,
                 from /in/foo.cc:1:
/usr/include/c++/6/functional:491:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(std::reference_wrapper<_Tp>)
     ref(reference_wrapper<_Tp> __t) noexcept
     ^~~
/usr/include/c++/6/functional:483:10: note:                 template<class _Tp> void std::ref(const _Tp&&)
     void ref(const _Tp&&) = delete;
          ^~~
/usr/include/c++/6/functional:473:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&)
     ref(_Tp& __t) noexcept
     ^~~
/in/foo.cc:26:25: error: reference to 'ref' is ambiguous
         swap(ref[q[x]], ref[q[x >> 1]]);
                         ^~~
/in/foo.cc:11:33: note: candidates are: int ref [3010]
 int lq = 0, q[3010], inq[3010], ref[3010];
                                 ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:71:0,
                 from /in/foo.cc:1:
/usr/include/c++/6/functional:491:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(std::reference_wrapper<_Tp>)
     ref(reference_wrapper<_Tp> __t) noexcept
     ^~~
/usr/include/c++/6/functional:483:10: note:                 template<class _Tp> void std::ref(const _Tp&&)
     void ref(const _Tp&&) = delete;
          ^~~
/usr/include/c++/6/functional:473:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&)
     ref(_Tp& __t) noexcept
     ^~~
/in/foo.cc: In function 'void qpop()':
/in/foo.cc:33:5: error: reference to 'ref' is ambiguous
     ref[q[1]] = 0;
     ^~~
/in/foo.cc:11:33: note: candidates are: int ref [3010]
 int lq = 0, q[3010], inq[3010], ref[3010];
                                 ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:71:0,
                 from /in/foo.cc:1:
/usr/include/c++/6/functional:491:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(std::reference_wrapper<_Tp>)
     ref(reference_wrapper<_Tp> __t) noexcept
     ^~~
/usr/include/c++/6/functional:483:10: note:                 template<class _Tp> void std::ref(const _Tp&&)
     void ref(const _Tp&&) = delete;
          ^~~
/usr/include/c++/6/functional:473:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&)
     ref(_Tp& __t) noexcept
     ^~~
/in/foo.cc:34:5: error: reference to 'ref' is ambiguous
     ref[q[lq]] = 1;
     ^~~
/in/foo.cc:11:33: note: candidates are: int ref [3010]
 int lq = 0, q[3010], inq[3010], ref[3010];
                                 ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:71:0,
                 from /in/foo.cc:1:
/usr/include/c++/6/functional:491:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(std::reference_wrapper<_Tp>)
     ref(reference_wrapper<_Tp> __t) noexcept
     ^~~
/usr/include/c++/6/functional:483:10: note:                 template<class _Tp> void std::ref(const _Tp&&)
     void ref(const _Tp&&) = delete;
          ^~~
/usr/include/c++/6/functional:473:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&)
     ref(_Tp& __t) noexcept
     ^~~
/in/foo.cc:41:22: error: reference to 'ref' is ambiguous
                 swap(ref[q[id]], ref[q[id * 2]]);
                      ^~~
/in/foo.cc:11:33: note: candidates are: int ref [3010]
 int lq = 0, q[3010], inq[3010], ref[3010];
                                 ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:71:0,
                 from /in/foo.cc:1:
/usr/include/c++/6/functional:491:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(std::reference_wrapper<_Tp>)
     ref(reference_wrapper<_Tp> __t) noexcept
     ^~~
/usr/include/c++/6/functional:483:10: note:                 template<class _Tp> void std::ref(const _Tp&&)
     void ref(const _Tp&&) = delete;
          ^~~
/usr/include/c++/6/functional:473:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&)
     ref(_Tp& __t) noexcept
     ^~~
/in/foo.cc:41:34: error: reference to 'ref' is ambiguous
                 swap(ref[q[id]], ref[q[id * 2]]);
                                  ^~~
/in/foo.cc:11:33: note: candidates are: int ref [3010]
 int lq = 0, q[3010], inq[3010], ref[3010];
                                 ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:71:0,
                 from /in/foo.cc:1:
/usr/include/c++/6/functional:491:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(std::reference_wrapper<_Tp>)
     ref(reference_wrapper<_Tp> __t) noexcept
     ^~~
/usr/include/c++/6/functional:483:10: note:                 template<class _Tp> void std::ref(const _Tp&&)
     void ref(const _Tp&&) = delete;
          ^~~
/usr/include/c++/6/functional:473:5: note:                 template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&)
     ref(_Tp& __t) noexcept
     ^~~
/in/foo.cc:48:26: error: reference to 'ref' is ambiguous
                     swap(ref[q[id]], ref[q[id * 2]]);
 

信息

递交者
类型
递交
题目
P1054 牛场围栏
语言
C++
递交时间
2018-08-02 19:36:06
评测时间
2018-08-02 19:36:06
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes