/in/foo.cc: In function 'int main()':
/in/foo.cc:20:26: error: reference to 'rank' is ambiguous
for(int i=1;i<=n;i++)rank[a[i].p]=i;
^~~~
/in/foo.cc:10:7: note: candidates are: int rank [40001]
int n,rank[40001];//排序后每个点的位置
^~~~
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:15: error: reference to 'rank' is ambiguous
int ans=a[rank[1]].v;
^~~~
/in/foo.cc:10:7: note: candidates are: int rank [40001]
int n,rank[40001];//排序后每个点的位置
^~~~
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:15: error: reference to 'rank' is ambiguous
int x=rank[i];
^~~~
/in/foo.cc:10:7: note: candidates are: int rank [40001]
int n,rank[40001];//排序后每个点的位置
^~~~
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
^~~~