Compile Error

foo.cc: In function 'int main()':
foo.cc:35:2: error: reference to 'rank' is ambiguous
  rank[0]+=1;
  ^~~~
foo.cc:25:4: note: candidates are: int rank [35000]
 ll rank[35000];
    ^~~~
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:51:3: error: reference to 'rank' is ambiguous
   rank[c[i]]+=1;
   ^~~~
foo.cc:25:4: note: candidates are: int rank [35000]
 ll rank[35000];
    ^~~~
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:55:9: error: reference to 'rank' is ambiguous
   cout<<rank[i]<<endl;
         ^~~~
foo.cc:25:4: note: candidates are: int rank [35000]
 ll rank[35000];
    ^~~~
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
            ^~~~
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。

信息

递交者
类型
递交
题目
「一本通 4.1 例 2」数星星 Stars
语言
C++
递交时间
2021-03-14 18:50:59
评测时间
2021-03-14 18:50:59
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes