The problem is to find the law. Small data is pretty easy to think about. Big data has to be analyzed in more depth.
The test instructions is quite round.
is actually a string conversion. The string can only have two letters, l or G. Given K and C, the target string can be generated from the rule.
So, if you know the K and C, and the target string, then you can roll out the original string.
Now the problem is, the target string is not all for you to see, limit you to see the most S. However, it does not require you to completely pour out the original string, but only to know that the original string is not at least a G character can be.
The small data is extremely simple, for what, because S=k, and see the s target string character can completely pour out the original string ah.
Because the 1th character of the original string will be the 1th character of the target string, the 2nd character of the original string will be the first k+2 character of the target string, and the 3rd character of the original string will be the 2*k+3 character of the target string ...
However, just to know if there is at least one G character in the original string, there is no need to see so much. Then continue the analysis.
GCJ Qualification Round D