记录详情

Compile Error

/in/foo.cc: In function 'void initial()':
/in/foo.cc:9:10: error: reference to 'rank' is ambiguous
  fa[i]=i,rank[i]=0;
          ^~~~
/in/foo.cc:4:5: note: candidates are: int rank [10000]
 int rank[10000];
     ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/nested_exception.h:40,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc: In function 'void Union(int, int)':
/in/foo.cc:21:5: error: reference to 'rank' is ambiguous
  if(rank[x]>rank[y])
     ^~~~
/in/foo.cc:4:5: note: candidates are: int rank [10000]
 int rank[10000];
     ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/nested_exception.h:40,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:21:13: error: reference to 'rank' is ambiguous
  if(rank[x]>rank[y])
             ^~~~
/in/foo.cc:4:5: note: candidates are: int rank [10000]
 int rank[10000];
     ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/nested_exception.h:40,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:23:10: error: reference to 'rank' is ambiguous
  else if(rank[x]<rank[y])
          ^~~~
/in/foo.cc:4:5: note: candidates are: int rank [10000]
 int rank[10000];
     ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/nested_exception.h:40,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:23:18: error: reference to 'rank' is ambiguous
  else if(rank[x]<rank[y])
                  ^~~~
/in/foo.cc:4:5: note: candidates are: int rank [10000]
 int rank[10000];
     ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/nested_exception.h:40,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:27:3: error: reference to 'rank' is ambiguous
   rank[y]++;
   ^~~~
/in/foo.cc:4:5: note: candidates are: int rank [10000]
 int rank[10000];
     ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/nested_exception.h:40,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~

信息

递交者
类型
递交
题目
P1036 家族
语言
C++
递交时间
2021-05-06 20:42:36
评测时间
2021-05-06 20:42:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes