MainObject

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
/**
* Created by Const on 4/23/14.
*/
object MainObject {
def main(args: Array[String]) {
var tree = new SuffixTree()
var a = List('!', '@', '#')
tree.maskAllStringsPassed = (1<<3) - 1
for (i <- 0 until 3) {
var ln = Console.readLine
ln = ln + a(i)
tree.addString(ln)
}
tree.findLCP()
print("1")
tree.printLCP()
}
}