F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_28936810_27195.cpp:16:22: error: expected ';' at end of member declaration
     static const int MAXN + 10 = S << 1;
                      ^
0_0_28936810_27195.cpp:16:27: error: expected unqualified-id before '+' token
     static const int MAXN + 10 = S << 1;
                           ^
0_0_28936810_27195.cpp:18:17: error: array bound is not an integer constant before ']' token
  int s[MAXN + 10];
                 ^
0_0_28936810_27195.cpp:19:18: error: array bound is not an integer constant before ']' token
  int sa[MAXN + 10], rnk[MAXN + 10], bin[MAXN + 10], tmp[MAXN + 10], height[MAXN + 10], ST[MAXN + 10][logN + 2];
                  ^
0_0_28936810_27195.cpp:19:34: error: array bound is not an integer constant before ']' token
  int sa[MAXN + 10], rnk[MAXN + 10], bin[MAXN + 10], tmp[MAXN + 10], height[MAXN + 10], ST[MAXN + 10][logN + 2];
                                  ^
0_0_28936810_27195.cpp:19:50: error: array bound is not an integer constant before ']' token
  int sa[MAXN + 10], rnk[MAXN + 10], bin[MAXN + 10], tmp[MAXN + 10], height[MAXN + 10], ST[MAXN + 10][logN + 2];
                                                  ^
0_0_28936810_27195.cpp:19:66: error: array bound is not an integer constant before ']' token
  int sa[MAXN + 10], rnk[MAXN + 10], bin[MAXN + 10], tmp[MAXN + 10], height[MAXN + 10], ST[MAXN + 10][logN + 2];
                                                                  ^
0_0_28936810_27195.cpp:19:85: error: array bound is not an integer constant before ']' token
  int sa[MAXN + 10], rnk[MAXN + 10], bin[MAXN + 10], tmp[MAXN + 10], height[MAXN + 10], ST[MAXN + 10][logN + 2];
                                                                                     ^
0_0_28936810_27195.cpp:19:100: error: array bound is not an integer constant before ']' token
  int sa[MAXN + 10], rnk[MAXN + 10], bin[MAXN + 10], tmp[MAXN + 10], height[MAXN + 10], ST[MAXN + 10][logN + 2];
                                                                                                    ^
0_0_28936810_27195.cpp: In member function 'void SuffixArray<S>::clear()':
0_0_28936810_27195.cpp:22:16: error: 'sa' was not declared in this scope
         memset(sa, 0, sizeof(sa));
                ^
0_0_28936810_27195.cpp:23:16: error: 'rnk' was not declared in this scope
         memset(rnk, 0, sizeof(rnk));
                ^
0_0_28936810_27195.cpp:24:16: error: 'height' was not declared in this scope
         memset(height, 0, sizeof(height));
                ^
0_0_28936810_27195.cpp: In member function 'void SuffixArray<S>::radixSort()':
0_0_28936810_27195.cpp:27:41: error: 'bin' was not declared in this scope
         for (int i = 1; i <= size; ++i) bin[i] = 0;
                                         ^
0_0_28936810_27195.cpp:28:42: error: 'bin' was not declared in this scope
         for (int i = 1; i <= len; ++i) ++bin[rnk[i]];
                                          ^
0_0_28936810_27195.cpp:28:46: error: 'rnk' was not declared in this scope
         for (int i = 1; i <= len; ++i) ++bin[rnk[i]];
                                              ^
0_0_28936810_27195.cpp:29:41: error: 'bin' was not declared in this scope
         for (int i = 1; i <= size; ++i) bin[i] += bin[i - 1];
                                         ^
0_0_28936810_27195.cpp:30:35: error: 'sa' was not declared in this scope
         for (int i = len; i; --i) sa[bin[rnk[tmp[i]]]--] = tmp[i];
                                   ^
0_0_28936810_27195.cpp:30:38: error: 'bin' was not declared in this scope
         for (int i = len; i; --i) sa[bin[rnk[tmp[i]]]--] = tmp[i];
                                      ^
0_0_28936810_27195.cpp:30:42: error: 'rnk' was not declared in this scope
         for (int i = len; i; --i) sa[bin[rnk[tmp[i]]]--] = tmp[i];
                                          ^
0_0_28936810_27195.cpp:30:46: error: 'tmp' was not declared in this scope
         for (int i = len; i; --i) sa[bin[rnk[tmp[i]]]--] = tmp[i];
                                              ^
0_0_28936810_27195.cpp: In member function 'void SuffixArray<S>::getSA(Tp*, int, int)':
0_0_28936810_27195.cpp:37:40: error: 'rnk' was not declared in this scope
         for (int i = 1; i <= len; ++i) rnk[i] = s[i], tmp[i] = i;
                                        ^
0_0_28936810_27195.cpp:37:55: error: 'tmp' was not declared in this scope
         for (int i = 1; i <= len; ++i) rnk[i] = s[i], tmp[i] = i;
                                                       ^
0_0_28936810_27195.cpp:41:54: error: 'tmp' was not declared in this scope
             for (int i = len - l + 1; i <= len; ++i) tmp[++p] = i;
                                                      ^
0_0_28936810_27195.cpp:43:9: error: 'sa' was not declared in this scope
     if (sa[i] > l) tmp[++p] = sa[i] - l;
         ^
0_0_28936810_27195.cpp:43:20: error: 'tmp' was not declared in this scope
     if (sa[i] > l) tmp[++p] = sa[i] - l;
                    ^
0_0_28936810_27195.cpp:45:23: error: 'rnk' was not declared in this scope
             std::swap(rnk, tmp);
                       ^
0_0_28936810_27195.cpp:45:28: error: 'tmp' was not declared in this scope
             std::swap(rnk, tmp);
                            ^
0_0_28936810_27195.cpp:46:21: error: 'sa' was not declared in this scope
             p = rnk[sa[1]] = 1;
                     ^
0_0_28936810_27195.cpp: In member function 'void SuffixArray<S>::getHeight()':
0_0_28936810_27195.cpp:53:39: error: 'height' was not declared in this scope
   for (int i = 1, j, k = 0; i <= len; height[rnk[i++]] = k)
                                       ^
0_0_28936810_27195.cpp:53:46: error: 'rnk' was not declared in this scope
   for (int i = 1, j, k = 0; i <= len; height[rnk[i++]] = k)
                                              ^
0_0_28936810_27195.cpp:54:37: error: 'sa' was not declared in this scope
    for (k = std::max(0, k - 1), j = sa[rnk[i] - 1]; s[i + k] == s[j + k]; ++k);
                                     ^
0_0_28936810_27195.cpp:55:3: error: 'height' was not declared in this scope
   height[1] = 0;
   ^
0_0_28936810_27195.cpp: In member function 'void SuffixArray<S>::buildST()':
0_0_28936810_27195.cpp:59:51: error: 'height' was not declared in this scope
         for (int i = 1; i <= len; ++i) ST[i][0] = height[i];
                                                   ^
0_0_28936810_27195.cpp: In member function 'int SuffixArray<S>::LCP(int, int)':
0_0_28936810_27195.cpp:68:13: error: 'rnk' was not declared in this scope
         l = rnk[l], r = rnk[r];
             ^
0_0_28936810_27195.cpp: In function 'int main()':
0_0_28936810_27195.cpp:107:19: error: 'struct SuffixArray<100015>' has no member named 'rnk'
         buildST(A.rnk, len);
                   ^
0_0_28936810_27195.cpp:116:54: error: 'struct SuffixArray<100015>' has no member named 'sa'
                     if (mn < rnk) rnk = mn, ansL = A.sa[mn], ansR = ansL + mx * l - 1;
                                                      ^


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-07-05 00:23:16, Gzip enabled