You Win!

From programming_contest
Jump to navigation Jump to search

Pretty simple state explosion. We need to know which letters we've typed from our final word, the current value of the spinner, and the current cursor location. That's 2^20*26*20 = 500 million

Then for each action, we can move, or spin the spinner or type the letter under the cursor, which is 5 constant time operations. Borderline, but should run fast enough with lax midatl timeouts.