记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:11:8: error: reference to 'rank' is ambiguous
   cin>>rank[i];
        ^~~~
foo.cc:3:5: note: candidates are: int rank [1005]
 int rank[1005];
     ^~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
                 from /usr/include/c++/7/bits/nested_exception.h:40,
                 from /usr/include/c++/7/exception:143,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/type_traits:1468:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
foo.cc:12:12: error: reference to 'rank' is ambiguous
   r1=min(m-rank[i]+r1,m-1);
            ^~~~
foo.cc:3:5: note: candidates are: int rank [1005]
 int rank[1005];
     ^~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
                 from /usr/include/c++/7/bits/nested_exception.h:40,
                 from /usr/include/c++/7/exception:143,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/type_traits:1468:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
foo.cc:13:10: error: reference to 'rank' is ambiguous
   re=min(rank[i]-1+re,m-1);
          ^~~~
foo.cc:3:5: note: candidates are: int rank [1005]
 int rank[1005];
     ^~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
                 from /usr/include/c++/7/bits/nested_exception.h:40,
                 from /usr/include/c++/7/exception:143,
                 from /usr/include/c++/7/ios:39,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/type_traits:1468:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
排名 (rank.cpp/c/pas)
题目数据
下载
语言
C++
递交时间
2021-10-11 08:53:53
评测时间
2021-10-11 08:53:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes