USAMTS Checker App
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
3.0 KiB

1 year ago
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>USAMTS 2/5/35 Solution</title>
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css">
  8. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous">
  9. <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js" integrity="sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8" crossorigin="anonymous"></script>
  10. <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"
  11. onload="renderMathInElement(document.body);"></script>
  12. </head>
  13. <body>
  14. <main class="container">
  15. <strong><h3>Problem</h3></strong>
  16. <p>
  17. Let \(m\) and \(n\) be positive integers. Let \(S\) be the set of all points
  18. \((x, y)\) with integer coordinates such that \(1 \leq x, y \leq m + n − 1\)
  19. and \(m + 1 \leq x + y \leq 2m + n − 1\). Let L be the set of the \(3m + 3n −
  20. 3\) lines parallel to one of \(x = 0\), \(y = 0\), or \(x + y = 0\) and passing
  21. through at least one point in \(S\). For which pairs \((m, n)\) does there
  22. exist a subset \(T\) of \(S\) such that every line in \(L\) intersects an odd
  23. number of elements of \(T\)?
  24. </p>
  25. <strong><h3>Proof</h3></strong>
  26. <p>
  27. The answer is just all \((m,n)\) such that \( (m+n-1)(m-n) \) is divisible
  28. by 4. The sum of all the x and y coordinates should clearly be even, but
  29. the sum of all \(x+y \mod 2\) is \( \frac{(m+n-1)(3m+n)}{2} \). For a
  30. construction to even be viable, this quantity clearly needs to be even.
  31. </p>
  32. <strong><h3>Constructor</h3></strong>
  33. {% if invalid %}
  34. <p> Invalid Input! </p>
  35. {% endif %}
  36. {% if nosol %}
  37. <p> No Valid Solution is Possible! </p>
  38. {% endif %}
  39. {% if image %}
  40. <img src="{{ image }}" alt="Solution Image" />
  41. {% endif %}
  42. {% if works == False %}
  43. <p> Claimed Construction Fails!!!! </p>
  44. {% endif %}
  45. <form method="POST" action="{{url_for ('index')}}">
  46. <table role="grid">
  47. <tbody>
  48. <tr>
  49. <td>
  50. <label for="M">Value for M:</label>
  51. </td>
  52. <td>
  53. <input type="number" name="M" min="1" max="40" value="{{M}}" required />
  54. </td>
  55. </tr>
  56. <tr>
  57. <td>
  58. <label for="N">Value for N:</label>
  59. </td>
  60. <td>
  61. <input type="number" name="N" min="1" max="40" value="{{N}}" required />
  62. </td>
  63. </tr>
  64. </tbody>
  65. </table>
  66. <input type="submit" value="Construct">
  67. </form>
  68. </main>
  69. </body>
  70. </html>