
28 Jun
2020
28 Jun
'20
12:48 p.m.
On 2020-06-28 11:26 a.m., Doug McIlroy wrote:
I'm currently stuck on the Two Knights problem. Having placed one knight on the board, in how many places can you put the other?
If you check the website indicated, it's a slight variation on that: "Your task is to count for k=1,2,…,nthe number of ways two knights can be placed on a k×kchessboard so that they do not attack each other." The input is n (an integer that can range from 1 to 10000), the output is a single integer for each value from 1 to n, one per line, the memory limit is 512MB, and the maximum runtime is 1.00 seconds.