/ new_bzoj /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:51:35: error: reference to 'rank' is ambiguous
  for(int i=1,w;i<=m;i++) w=read(),rank[w]=i; 
                                   ^~~~
/in/foo.cc:14:21: note: candidates are: int rank [220000]
 int m,n,val[maxm*2],rank[maxm*2];
                     ^~~~
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:2:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:53:28: error: reference to 'rank' is ambiguous
  for(int i=1;i<=n;i++) if(!rank[i]) rank[i]=++tot;
                            ^~~~
/in/foo.cc:14:21: note: candidates are: int rank [220000]
 int m,n,val[maxm*2],rank[maxm*2];
                     ^~~~
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:2:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:53:37: error: reference to 'rank' is ambiguous
  for(int i=1;i<=n;i++) if(!rank[i]) rank[i]=++tot;
                                     ^~~~
/in/foo.cc:14:21: note: candidates are: int rank [220000]
 int m,n,val[maxm*2],rank[maxm*2];
                     ^~~~
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:2:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:54:35: error: reference to 'rank' is ambiguous
  for(int i=1;i<=n;i++) a[i].x=tot-rank[a[i].z]+1;
                                   ^~~~
/in/foo.cc:14:21: note: candidates are: int rank [220000]
 int m,n,val[maxm*2],rank[maxm*2];
                     ^~~~
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:2:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~

信息

递交者
类型
递交
题目
动态逆序对
语言
C++
递交时间
2018-01-15 16:01:59
评测时间
2018-01-15 16:01:59
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes