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

Автор Chy_Chy, история, 6 лет назад, По-английски

Is there anyone who can can help me on Uva 847. This is a problem of game theory.I have been stuck in this problem for a while. Thanks in advance. https://onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=788

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

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
Hint 1
Hint 2
Hint 3
»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Actually the naive recursive "dp" works really fast even on the largest value of n. This is because there are less than $$$\log_2(n) \cdot \log_3(n) \cdot \dots \cdot \log_9(n) = 2164612996$$$ states. There are actually much less than this because the numbers 2-9 share many prime factors so this estimate overcounted many states. I got AC with it. Just try to answer the question: If the current number is p and it is my turn, do I win?