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_38597169_8962.cpp: In function 'int main()':
0_0_38597169_8962.cpp:58:23: error: reference to 'size' is ambiguous
         CLR(dept);CLR(size);CLR(fath);CLR(bson);CLR(ntop);CLR(dfsn);
                       ^~~~
0_0_38597169_8962.cpp:16:25: note: in definition of macro 'MST'
 #define MST(a,b) memset(a,b,sizeof(a))
                         ^
0_0_38597169_8962.cpp:58:19: note: in expansion of macro 'CLR'
         CLR(dept);CLR(size);CLR(fath);CLR(bson);CLR(ntop);CLR(dfsn);
                   ^~~
In file included from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/string:51,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/locale_classes.h:40,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/ios_base.h:41,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ios:42,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ostream:38,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/iostream:39,
                 from 0_0_38597169_8962.cpp:6:
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/range_access.h:252:5: note: candidates are: 'template<class _Tp, long long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
     size(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/range_access.h:242:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
     ^~~~
0_0_38597169_8962.cpp:36:16: note:                 'int size [100010]'
 int dept[maxn],size[maxn],fath[maxn],bson[maxn],ntop[maxn],dfsn[maxn];
                ^~~~
0_0_38597169_8962.cpp:58:23: error: reference to 'size' is ambiguous
         CLR(dept);CLR(size);CLR(fath);CLR(bson);CLR(ntop);CLR(dfsn);
                       ^~~~
0_0_38597169_8962.cpp:16:36: note: in definition of macro 'MST'
 #define MST(a,b) memset(a,b,sizeof(a))
                                    ^
0_0_38597169_8962.cpp:58:19: note: in expansion of macro 'CLR'
         CLR(dept);CLR(size);CLR(fath);CLR(bson);CLR(ntop);CLR(dfsn);
                   ^~~
In file included from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/string:51,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/locale_classes.h:40,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/ios_base.h:41,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ios:42,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ostream:38,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/iostream:39,
                 from 0_0_38597169_8962.cpp:6:
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/range_access.h:252:5: note: candidates are: 'template<class _Tp, long long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
     size(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/range_access.h:242:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
     ^~~~
0_0_38597169_8962.cpp:36:16: note:                 'int size [100010]'
 int dept[maxn],size[maxn],fath[maxn],bson[maxn],ntop[maxn],dfsn[maxn];
                ^~~~
0_0_38597169_8962.cpp: In function 'void dfs1(int)':
0_0_38597169_8962.cpp:120:5: error: reference to 'size' is ambiguous
     size[u]=1;
     ^~~~
In file included from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/string:51,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/locale_classes.h:40,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/ios_base.h:41,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ios:42,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ostream:38,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/iostream:39,
                 from 0_0_38597169_8962.cpp:6:
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/range_access.h:252:5: note: candidates are: 'template<class _Tp, long long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
     size(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/range_access.h:242:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
     ^~~~
0_0_38597169_8962.cpp:36:16: note:                 'int size [100010]'
 int dept[maxn],size[maxn],fath[maxn],bson[maxn],ntop[maxn],dfsn[maxn];
                ^~~~
0_0_38597169_8962.cpp:129:12: error: reference to 'size' is ambiguous
         if(size[v]>tmax)
            ^~~~
In file included from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/string:51,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/locale_classes.h:40,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/ios_base.h:41,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ios:42,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ostream:38,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/iostream:39,
                 from 0_0_38597169_8962.cpp:6:
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/range_access.h:252:5: note: candidates are: 'template<class _Tp, long long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
     size(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/range_access.h:242:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
     ^~~~
0_0_38597169_8962.cpp:36:16: note:                 'int size [100010]'
 int dept[maxn],size[maxn],fath[maxn],bson[maxn],ntop[maxn],dfsn[maxn];
                ^~~~
0_0_38597169_8962.cpp:131:18: error: reference to 'size' is ambiguous
             tmax=size[v];
                  ^~~~
In file included from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/string:51,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/locale_classes.h:40,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/ios_base.h:41,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ios:42,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ostream:38,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/iostream:39,
                 from 0_0_38597169_8962.cpp:6:
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/range_access.h:252:5: note: candidates are: 'template<class _Tp, long long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
     size(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/range_access.h:242:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
     ^~~~
0_0_38597169_8962.cpp:36:16: note:                 'int size [100010]'
 int dept[maxn],size[maxn],fath[maxn],bson[maxn],ntop[maxn],dfsn[maxn];
                ^~~~
0_0_38597169_8962.cpp:134:9: error: reference to 'size' is ambiguous
         size[u]+=size[v];
         ^~~~
In file included from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/string:51,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/locale_classes.h:40,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/ios_base.h:41,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ios:42,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/ostream:38,
                 from gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/iostream:39,
                 from 0_0_38597169_8962.cpp:6:
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/range_access.h:252:5: note: candidates are: 'template<class _Tp, long long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
     size(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~
gcc-8.5.0/lib/gcc/x86_64-w64-mingw32/8.5.0/include/c++/bits/range_access.h:242:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
     ^~~~
0_0_38597169_8962.cpp:36:16: note:                 'int size [100010]'
 int dept[maxn],size[maxn],fat


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-01-10 17:27:49, Gzip enabled