/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:80:3: error: reference to 'rank' is ambiguous
   rank[i]=i;
   ^~~~
/in/foo.cc:61:7: note: candidates are: int rank [100010]
 int n,rank[MAXN],m=0;
       ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/stl_pair.h:59,
                 from /usr/include/c++/6/utility:70,
                 from /usr/include/c++/6/algorithm:60,
                 from /in/foo.cc:2:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:82:7: error: reference to 'rank' is ambiguous
  sort(rank+1,rank+1+n,cmp);
       ^~~~
/in/foo.cc:61:7: note: candidates are: int rank [100010]
 int n,rank[MAXN],m=0;
       ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/stl_pair.h:59,
                 from /usr/include/c++/6/utility:70,
                 from /usr/include/c++/6/algorithm:60,
                 from /in/foo.cc:2:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:82:14: error: reference to 'rank' is ambiguous
  sort(rank+1,rank+1+n,cmp);
              ^~~~
/in/foo.cc:61:7: note: candidates are: int rank [100010]
 int n,rank[MAXN],m=0;
       ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/stl_pair.h:59,
                 from /usr/include/c++/6/utility:70,
                 from /usr/include/c++/6/algorithm:60,
                 from /in/foo.cc:2:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:87:5: error: reference to 'rank' is ambiguous
   h[rank[i]]=m;
     ^~~~
/in/foo.cc:61:7: note: candidates are: int rank [100010]
 int n,rank[MAXN],m=0;
       ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/stl_pair.h:59,
                 from /usr/include/c++/6/utility:70,
                 from /usr/include/c++/6/algorithm:60,
                 from /in/foo.cc:2:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:93:18: error: reference to 'rank' is ambiguous
   ll res=ask(1,h[rank[L]],h[rank[R]]);
                  ^~~~
/in/foo.cc:61:7: note: candidates are: int rank [100010]
 int n,rank[MAXN],m=0;
       ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/stl_pair.h:59,
                 from /usr/include/c++/6/utility:70,
                 from /usr/include/c++/6/algorithm:60,
                 from /in/foo.cc:2:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:93:29: error: reference to 'rank' is ambiguous
   ll res=ask(1,h[rank[L]],h[rank[R]]);
                             ^~~~
/in/foo.cc:61:7: note: candidates are: int rank [100010]
 int n,rank[MAXN],m=0;
       ^~~~
In file included from /usr/include/c++/6/bits/move.h:57:0,
                 from /usr/include/c++/6/bits/stl_pair.h:59,
                 from /usr/include/c++/6/utility:70,
                 from /usr/include/c++/6/algorithm:60,
                 from /in/foo.cc:2:
/usr/include/c++/6/type_traits:1482:12: note:                 template<class> struct std::rank
     struct rank
            ^~~~
/in/foo.cc:98:37: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
  if(maxv(1)!=1)printf("%d\n",maxv(1));
                                     ^

信息

递交者
类型
递交
题目
P1183 Fish && kitty
语言
C++
递交时间
2018-02-07 13:23:13
评测时间
2018-02-07 13:23:13
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes