Hi! this is an SRM problem on topcoder..i tried solving it using the property of periodicity of wins 'W' and loses 'L' along with the property that result for a particular position(number of coins left) depends on atmost k position back..k is the maximum number of coins a player can pick..my question is how to decide the periodic length "q" for a given set moves[]..so that I will not iterate all over to MAXN and just use periodicity of this string with length "q"..