POJ 2774 - Long Long Message

The first problem using Linear Sufix Array to solve.
There are 4 problems make.
1. pe should indicate the last element of rk.
2. the recursive parameter of the largest value should be the largest number plus one.
3. "a?b:c" has the less priority than " || "
4. in merge. i is the current index of sa, j is the index of say, k is the index of sax.