Блог пользователя epsilon_573

Автор epsilon_573, история, 19 месяцев назад, По-английски

I recently watched a video by Matt Parker, who you might have seen a lot on the Numberphile Channel.

He shared an interesting problem in the video, which has attracted many coders to come up with faster solutions for the same or you can say speedrun?

He also made another video detailing the problem. Here's the podcast for the same.

For those of you lazy enough to go through the videos, here is the text version.

Problem:
Example:

I would like to see how the CP Community tackles this. As for the accepted wordlist, you can use any famous ones you can find such as this one.

Feel free to discuss approaches, and share your codes/times.

  • Проголосовать: нравится
  • +13
  • Проголосовать: не нравится

»
19 месяцев назад, # |
Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

Bitmask DP :P

UPD: Wait, do you mean valid english words? We might like some heuristics to get it faster in this case.

»
19 месяцев назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

edit: seems like the word list is fixed. so the best solution is to use some heuristics. for example, you know a 5-tuple of word only works if it appears in your precomputed solution list.

  • »
    »
    19 месяцев назад, # ^ |
      Проголосовать: нравится -8 Проголосовать: не нравится

    As the heuristics, I believe we could use some pruning, to prevent searching words with impossible substrings such as "ghj" and "zwx".