Home STD Contest Notification Clarification Problems Ranklist Status Print Sign Out

View Compilation Error

1_798_2240_21260.cpp: In function 'int main()':
1_798_2240_21260.cpp:41:31: error: reference to 'rank' is ambiguous
         for (int i=1;i<=n;i++)rank[a[i].idx]=i;
                               ^
1_798_2240_21260.cpp:9:5: note: candidates are: int rank [210000]
 int rank[N],root[N];
     ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/move.h:57:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:59,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/utility:70,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:60,
                 from 1_798_2240_21260.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/type_traits:1340:12: note:                 template<class> struct std::rank
     struct rank
            ^
1_798_2240_21260.cpp:45:20: error: reference to 'rank' is ambiguous
             insert(rank[i],root[i],1,n);
                    ^
1_798_2240_21260.cpp:9:5: note: candidates are: int rank [210000]
 int rank[N],root[N];
     ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/move.h:57:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:59,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/utility:70,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:60,
                 from 1_798_2240_21260.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/type_traits:1340:12: note:                 template<class> struct std::rank
     struct rank
            ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-06-26 17:24:06, Gzip enabled