Gusfield Algorithm

IOICJ 35 Stamp Problem ( Z-value, Union Find )

Problem Description: You are given a string S. You want to find minimum length of string A, such that you could print S with A stamped on a paper arbitrary times. When making a new stamp, it is allowed to cover part of the string on the pa…