/ XMU_ACM /

记录详情

Compile Error

/in/foo.cc: In function 'bool cmp(int, int)':
/in/foo.cc:14:8: error: reference to 'rank' is ambiguous
     if(rank[i] != rank[j]) return rank[i] < rank[j];
        ^~~~
/in/foo.cc:10:5: note: candidates are: int rank [100005]
 int rank[maxn],lcp[maxn],tmp[maxn],sa[maxn];
     ^~~~
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:14:19: error: reference to 'rank' is ambiguous
     if(rank[i] != rank[j]) return rank[i] < rank[j];
                   ^~~~
/in/foo.cc:10:5: note: candidates are: int rank [100005]
 int rank[maxn],lcp[maxn],tmp[maxn],sa[maxn];
     ^~~~
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:14:35: error: reference to 'rank' is ambiguous
     if(rank[i] != rank[j]) return rank[i] < rank[j];
                                   ^~~~
/in/foo.cc:10:5: note: candidates are: int rank [100005]
 int rank[maxn],lcp[maxn],tmp[maxn],sa[maxn];
     ^~~~
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:14:45: error: reference to 'rank' is ambiguous
     if(rank[i] != rank[j]) return rank[i] < rank[j];
                                             ^~~~
/in/foo.cc:10:5: note: candidates are: int rank [100005]
 int rank[maxn],lcp[maxn],tmp[maxn],sa[maxn];
     ^~~~
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:16:33: error: reference to 'rank' is ambiguous
         int ri = i + k <= len ? rank[i + k] : -1;
                                 ^~~~
/in/foo.cc:10:5: note: candidates are: int rank [100005]
 int rank[maxn],lcp[maxn],tmp[maxn],sa[maxn];
     ^~~~
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:17:33: error: reference to 'rank' is ambiguous
         int rj = j + k <= len ? rank[j + k] : -1;
                                 ^~~~
/in/foo.cc:10:5: note: candidates are: int rank [100005]
 int rank[maxn],lcp[maxn],tmp[maxn],sa[maxn];
     ^~~~
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: In function 'void Creat_sa()':
/in/foo.cc:26:9: error: reference to 'rank' is ambiguous
         rank[i] = i < n ? s[i] : -1;
         ^~~~
/in/foo.cc:10:5: note: candidates are: int rank [100005]
 int rank[maxn],lcp[maxn],tmp[maxn],sa[maxn];
     ^~~~
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:35:13: error: reference to 'rank' is ambiguous
             rank[i] = tmp[i];
             ^~~~
/in/foo.cc:10:5: note: candidates are: int rank [100005]
 int rank[maxn],lcp[maxn],tmp[maxn],sa[maxn];
     ^~~~
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:40:9: warning: unused variable 'lcp' [-Wunused-variable]
     int lcp[maxn];
         ^~~
/in/foo.cc: In function 'void Creat_lcp()':
/in/foo.cc:45:31: error: reference to 'rank' is ambiguous
     for(int i = 0;i <= n;i++) rank[sa[i]] = i;
                               ^~~~
/in/foo.cc:10:5: note: candidates are: int rank [100005]
 int rank[maxn],lcp[maxn],tmp[maxn],sa[maxn];
     ^~~~
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:49:20: error: reference to 'rank' is ambiguous
         int j = sa[rank[i] - 1];
                    ^~~~
/in/foo.cc:10:5: note: candidates are: int rank [100005]
 int rank[maxn],lcp[maxn],tmp[maxn],sa[maxn];
     ^~~~
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:54:13: error: reference to 'rank' is ambiguous
         lcp[rank[i] - 1] = h;
             ^~~~
/in/foo.cc:10:5: note: candidates are: int rank [100005]
 int rank[maxn],lcp[maxn],tmp[maxn],sa[maxn];
     ^~~~
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: In function 'int main()':
/in/foo.cc:64:10: error: reference to 'rank' is ambiguous
   memset(rank,0,sizeof(rank));
          ^~~~
/in/foo.cc:10:5: note: candidates are: int rank [100005]
 int rank[maxn],lcp[maxn],tmp[maxn],sa[maxn];
     ^~~~
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:64:24: error: reference to 'rank' is ambiguous
   memset(rank,0,sizeof(rank));
                        ^~~~
/in/foo.cc:10:5: note: candidates are: int rank [100005]
 int rank[maxn],lcp[maxn],tmp[maxn],sa[maxn];
     ^~~~
In file included from /usr/include

信息

递交者
类型
递交
题目
Detect the Secret
语言
C++
递交时间
2018-04-28 19:51:12
评测时间
2018-04-28 19:51:12
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes