/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int init()':
/in/foo.cc:12:3: error: reference to 'rank' is ambiguous
   rank[i]=0;
   ^~~~
/in/foo.cc:5:5: note: candidates are: int rank [5001]
 int rank[5001]; 
     ^~~~
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:14:1: warning: no return statement in function returning non-void [-Wreturn-type]
 } 
 ^
/in/foo.cc: In function 'int comb(int, int)':
/in/foo.cc:24:5: error: reference to 'rank' is ambiguous
  if(rank[x]<=rank[y])
     ^~~~
/in/foo.cc:5:5: note: candidates are: int rank [5001]
 int rank[5001]; 
     ^~~~
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:24:14: error: reference to 'rank' is ambiguous
  if(rank[x]<=rank[y])
              ^~~~
/in/foo.cc:5:5: note: candidates are: int rank [5001]
 int rank[5001]; 
     ^~~~
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:28:5: error: reference to 'rank' is ambiguous
  if(rank[x]==rank[y])
     ^~~~
/in/foo.cc:5:5: note: candidates are: int rank [5001]
 int rank[5001]; 
     ^~~~
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:28:14: error: reference to 'rank' is ambiguous
  if(rank[x]==rank[y])
              ^~~~
/in/foo.cc:5:5: note: candidates are: int rank [5001]
 int rank[5001]; 
     ^~~~
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:29:3: error: reference to 'rank' is ambiguous
   rank[y]++;
   ^~~~
/in/foo.cc:5:5: note: candidates are: int rank [5001]
 int rank[5001]; 
     ^~~~
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:30:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^

信息

递交者
类型
递交
题目
P1034 家族
语言
C++
递交时间
2017-11-10 18:56:48
评测时间
2017-11-10 18:56:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes