<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 2020-06-28 11:26 a.m., Doug McIlroy
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:202006281526.05SFQ6il119550@tahoe.cs.Dartmouth.EDU">
      <pre class="moz-quote-pre" wrap="">
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">I'm currently stuck on the Two Knights problem.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
Having placed one knight on the board, in how many
places can you put the other?
</pre>
    </blockquote>
    <p>If you check the website indicated, it's a slight variation on
      that: <br>
    </p>
    <p>"Your task is to count for <span class="MathJax_Preview"
        style="color: inherit;"></span><span class="MathJax"
        id="MathJax-Element-1-Frame" tabindex="0" style="position:
        relative;" data-mathml="<math
xmlns="http://www.w3.org/1998/Math/MathML"><mi>k</mi><mo>=</mo><mn>1</mn><mo>,</mo><mn>2</mn><mo>,</mo><mo>&#x2026;</mo><mo>,</mo><mi>n</mi></math>"
        role="presentation"><nobr aria-hidden="true"><span class="math"
            id="MathJax-Span-1" role="math" style="width: 7.016em;
            display: inline-block;"><span style="display: inline-block;
              position: relative; width: 6.14em; height: 0px; font-size:
              114%;"><span style="position: absolute; clip:
                rect(1.335em, 1006.12em, 2.551em, -1000em); top:
                -2.193em; left: 0em;"><span class="mrow"
                  id="MathJax-Span-2"><span class="mi"
                    id="MathJax-Span-3" style="font-family:
                    MathJax_Math; font-style: italic;">k</span><span
                    class="mo" id="MathJax-Span-4" style="font-family:
                    MathJax_Main; padding-left: 0.278em;">=</span><span
                    class="mn" id="MathJax-Span-5" style="font-family:
                    MathJax_Main; padding-left: 0.278em;">1</span><span
                    class="mo" id="MathJax-Span-6" style="font-family:
                    MathJax_Main;">,</span><span class="mn"
                    id="MathJax-Span-7" style="font-family:
                    MathJax_Main; padding-left: 0.167em;">2</span><span
                    class="mo" id="MathJax-Span-8" style="font-family:
                    MathJax_Main;">,</span><span class="mo"
                    id="MathJax-Span-9" style="font-family:
                    MathJax_Main; padding-left: 0.167em;">…</span><span
                    class="mo" id="MathJax-Span-10" style="font-family:
                    MathJax_Main; padding-left: 0.167em;">,</span><span
                    class="mi" id="MathJax-Span-11" style="font-family:
                    MathJax_Math; font-style: italic; padding-left:
                    0.167em;">n</span></span><span style="display:
                  inline-block; width: 0px; height: 2.193em;"></span></span></span><span
              style="display: inline-block; overflow: hidden;
              vertical-align: -0.284em; border-left: 0px solid; width:
              0px; height: 1.137em;"></span></span></nobr></span> the
      number of ways two knights can be placed on a <span
        class="MathJax_Preview" style="color: inherit;"></span><span
        class="MathJax" id="MathJax-Element-2-Frame" tabindex="0"
        style="position: relative;" data-mathml="<math
xmlns="http://www.w3.org/1998/Math/MathML"><mi>k</mi><mo>&#x00D7;</mo><mi>k</mi></math>"
        role="presentation"><nobr aria-hidden="true"><span class="math"
            id="MathJax-Span-12" role="math" style="width: 2.578em;
            display: inline-block;"><span style="display: inline-block;
              position: relative; width: 2.248em; height: 0px;
              font-size: 114%;"><span style="position: absolute; clip:
                rect(1.335em, 1002.23em, 2.368em, -1000em); top:
                -2.193em; left: 0em;"><span class="mrow"
                  id="MathJax-Span-13"><span class="mi"
                    id="MathJax-Span-14" style="font-family:
                    MathJax_Math; font-style: italic;">k</span><span
                    class="mo" id="MathJax-Span-15" style="font-family:
                    MathJax_Main; padding-left: 0.222em;">×</span><span
                    class="mi" id="MathJax-Span-16" style="font-family:
                    MathJax_Math; font-style: italic; padding-left:
                    0.222em;">k</span></span><span style="display:
                  inline-block; width: 0px; height: 2.193em;"></span></span></span><span
              style="display: inline-block; overflow: hidden;
              vertical-align: -0.075em; border-left: 0px solid; width:
              0px; height: 0.929em;"></span></span></nobr></span>
      chessboard so that they do not attack each other."<br>
    </p>
    <p>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. <br>
    </p>
    <p><br>
    </p>
  </body>
</html>