F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39453652_4639.cpp: In function 'void dfs1(int, int)':
0_0_39453652_4639.cpp:24:9: error: reference to 'ref' is ambiguous
   24 |         ref[tot]=u;
      |         ^~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:52,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/locale_classes.h:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ios_base.h:41,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ios:44,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ostream:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:41,
                 from 0_0_39453652_4639.cpp:2:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:394:5: note: candidates are: 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(reference_wrapper<_Tp>)'
  394 |     ref(reference_wrapper<_Tp> __t) noexcept
      |     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:385:10: note:                 'template<class _Tp> void std::ref(const _Tp&&)'
  385 |     void ref(const _Tp&&) = delete;
      |          ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:374:5: note:                 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(_Tp&)'
  374 |     ref(_Tp& __t) noexcept
      |     ^~~
0_0_39453652_4639.cpp:16:26: note:                 'int ref [500005]'
   16 | int siz[N],son[N],dfn[N],ref[N],tot;
      |                          ^~~
0_0_39453652_4639.cpp: In function 'void dsu_on_tree(int, int, int)':
0_0_39453652_4639.cpp:79:62: error: reference to 'ref' is ambiguous
   79 |                                 ans[u]+=query1(1e6)-query1(a[ref[j]])+query2(a[ref[j]])*a[ref[j]]*a[ref[j]];
      |                                                              ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:394:5: note: candidates are: 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(reference_wrapper<_Tp>)'
  394 |     ref(reference_wrapper<_Tp> __t) noexcept
      |     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:385:10: note:                 'template<class _Tp> void std::ref(const _Tp&&)'
  385 |     void ref(const _Tp&&) = delete;
      |          ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:374:5: note:                 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(_Tp&)'
  374 |     ref(_Tp& __t) noexcept
      |     ^~~
0_0_39453652_4639.cpp:16:26: note:                 'int ref [500005]'
   16 | int siz[N],son[N],dfn[N],ref[N],tot;
      |                          ^~~
0_0_39453652_4639.cpp:79:80: error: reference to 'ref' is ambiguous
   79 |                                 ans[u]+=query1(1e6)-query1(a[ref[j]])+query2(a[ref[j]])*a[ref[j]]*a[ref[j]];
      |                                                                                ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:394:5: note: candidates are: 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(reference_wrapper<_Tp>)'
  394 |     ref(reference_wrapper<_Tp> __t) noexcept
      |     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:385:10: note:                 'template<class _Tp> void std::ref(const _Tp&&)'
  385 |     void ref(const _Tp&&) = delete;
      |          ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:374:5: note:                 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(_Tp&)'
  374 |     ref(_Tp& __t) noexcept
      |     ^~~
0_0_39453652_4639.cpp:16:26: note:                 'int ref [500005]'
   16 | int siz[N],son[N],dfn[N],ref[N],tot;
      |                          ^~~
0_0_39453652_4639.cpp:79:91: error: reference to 'ref' is ambiguous
   79 |                                 ans[u]+=query1(1e6)-query1(a[ref[j]])+query2(a[ref[j]])*a[ref[j]]*a[ref[j]];
      |                                                                                           ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:394:5: note: candidates are: 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(reference_wrapper<_Tp>)'
  394 |     ref(reference_wrapper<_Tp> __t) noexcept
      |     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:385:10: note:                 'template<class _Tp> void std::ref(const _Tp&&)'
  385 |     void ref(const _Tp&&) = delete;
      |          ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:374:5: note:                 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(_Tp&)'
  374 |     ref(_Tp& __t) noexcept
      |     ^~~
0_0_39453652_4639.cpp:16:26: note:                 'int ref [500005]'
   16 | int siz[N],son[N],dfn[N],ref[N],tot;
      |                          ^~~
0_0_39453652_4639.cpp:79:101: error: reference to 'ref' is ambiguous
   79 |                                 ans[u]+=query1(1e6)-query1(a[ref[j]])+query2(a[ref[j]])*a[ref[j]]*a[ref[j]];
      |                                                                                                     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:394:5: note: candidates are: 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(reference_wrapper<_Tp>)'
  394 |     ref(reference_wrapper<_Tp> __t) noexcept
      |     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:385:10: note:                 'template<class _Tp> void std::ref(const _Tp&&)'
  385 |     void ref(const _Tp&&) = delete;
      |          ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:374:5: note:                 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(_Tp&)'
  374 |     ref(_Tp& __t) noexcept
      |     ^~~
0_0_39453652_4639.cpp:16:26: note:                 'int ref [500005]'
   16 | int siz[N],son[N],dfn[N],ref[N],tot;
      |                          ^~~
0_0_39453652_4639.cpp:82:40: error: reference to 'ref' is ambiguous
   82 |                                 add1(a[ref[j]],a[ref[j]]*a[ref[j]]);
      |                                        ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:394:5: note: candidates are: 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(reference_wrapper<_Tp>)'
  394 |     ref(reference_wrapper<_Tp> __t) noexcept
      |     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:385:10: note:                 'template<class _Tp> void std::ref(const _Tp&&)'
  385 |     void ref(const _Tp&&) = delete;
      |          ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:374:5: note:                 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(_Tp&)'
  374 |     ref(_Tp& __t) noexcept
      |     ^~~
0_0_39453652_4639.cpp:16:26: note:                 'int ref [500005]'
   16 | int siz[N],son[N],dfn[N],ref[N],tot;
      |                          ^~~
0_0_39453652_4639.cpp:82:50: error: reference to 'ref' is ambiguous
   82 |                                 add1(a[ref[j]],a[ref[j]]*a[ref[j]]);
      |                                                  ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:394:5: note: candidates are: 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(reference_wrapper<_Tp>)'
  394 |     ref(reference_wrapper<_Tp> __t) noexcept
      |     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:385:10: note:                 'template<class _Tp> void std::ref(const _Tp&&)'
  385 |     void ref(const _Tp&&) = delete;
      |          ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:374:5: note:                 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(_Tp&)'
  374 |     ref(_Tp& __t) noexcept
      |     ^~~
0_0_39453652_4639.cpp:16:26: note:                 'int ref [500005]'
   16 | int siz[N],son[N],dfn[N],ref[N],tot;
      |                          ^~~
0_0_39453652_4639.cpp:82:60: error: reference to 'ref' is ambiguous
   82 |                                 add1(a[ref[j]],a[ref[j]]*a[ref[j]]);
      |                                                            ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:394:5: note: candidates are: 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(reference_wrapper<_Tp>)'
  394 |     ref(reference_wrapper<_Tp> __t) noexcept
      |     ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:385:10: note:                 'template<class _Tp> void std::ref(const _Tp&&)'
  385 |     void ref(const _Tp&&) = delete;
      |          ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/refwrap.h:374:5: note:                 'template<class _Tp> constexpr std::reference_wrapper<_Tp> std::ref(_Tp&)'
  374 |     ref(_Tp& __t) noexcept
      |     ^~~
0_0_39453652_4639.cpp:16:26: note:                 'int ref [500005]'
   16 | int siz[N],son[N],dfn[N],ref[N],tot;
      |                          ^~~
0_0_39453652_4639.cpp:83:40: error: reference to 'ref' is ambiguous
   83 |                                 add2(a[


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-25 15:27:46, Gzip enabled