We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Practice
  • Certification
  • Compete
  • Career Fair
  • Hiring developers?
  1. Practice
  2. Functional Programming
  3. Ad Hoc
  4. Game of Kyles
  5. Discussions

Game of Kyles

Problem
Submissions
Leaderboard
Discussions

Sort 12 Discussions, By:

votes

Please Login in order to post a comment

  • karoyakani 4 years ago+ 0 comments

    The title should read "... Kayles". OEIS A002186 Sprague-Grundy values for the game of Kayles (octal games .77 and .771).

    Hasekll excerpt

    kayles = (==0) . foldl1 xor . map (grundy!!)
    
    grundy = map g [0..]
        where
        g 0 = 0
        g n = mex n [grundy!!l `xor` grundy!!r | m<-[n-1,n-2],l<-[0..m`div`2],let r=m-l]
        mex n = minimum . ([1..n] \\)
    
    3|
    Permalink
  • piyushmishra 3 years ago+ 0 comments

    does dynamic programming work.

    1|
    Permalink
  • skanaley 5 years ago+ 0 comments

    In test case 1, how are the last two "IXIXIII" and "XIIIXIXXIX" wins? And are there different test cases for different languages?

    1|
    Permalink
  • piyushmishra 6 years ago+ 0 comments

    Hi Abhiranjan,

    What does it mean if both player play optimally?

    0|
    Permalink
  • spotifypremiumf1 1 year ago+ 0 comments

    Coming up with your hot favorite article about download free music from hacked Spotify. Similarly, In this tutorial i’m gonna show you to get free music in how to get spotify premium

    -1|
    Permalink
Load more conversations

Need Help?


View top submissions
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature