When I got up on Sunday, it was already past 11, so I joined the contest 40 minutes late. I solved the first two problems smoothly. I took some detours on the third problem and only solved it after the contest. If there had been enough time, solving the third problem should not have been an issue.
1071. Greatest Common Divisor of Strings
Intuition: This problem is equivalent to finding the greatest common divisor of two numbers. The length of Greatest Common Divisor must be equal to the greatest common divisor or 0. A simple proof is as follows: Suppose the answer length is x. Since str1 is composed of x, x must be a divisor of str1.length. Similarly, it is also a divisor of str2.length. If x is not the greatest common divisor but can form both str1 and str2, then the greatest common divisor must also be able to form both str1 and str2.