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.

71 lines
3.0 KiB

12 months ago
12 months ago
12 months 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. <h1> USAMTS 5/2/35 </h1>
  16. <strong><h3>Problem</h3></strong>
  17. <p>
  18. Let \(m\) and \(n\) be positive integers. Let \(S\) be the set of all points
  19. \((x, y)\) with integer coordinates such that \(1 \leq x, y \leq m + n − 1\)
  20. and \(m + 1 \leq x + y \leq 2m + n − 1\). Let L be the set of the \(3m + 3n −
  21. 3\) lines parallel to one of \(x = 0\), \(y = 0\), or \(x + y = 0\) and passing
  22. through at least one point in \(S\). For which pairs \((m, n)\) does there
  23. exist a subset \(T\) of \(S\) such that every line in \(L\) intersects an odd
  24. number of elements of \(T\)?
  25. </p>
  26. <strong><h3>Proof</h3></strong>
  27. <p>
  28. The answer is just all \((m,n)\) such that \( (m+n-1)(m-n) \) is divisible
  29. by 4. The sum of all the x and y coordinates should clearly be even, but
  30. the sum of all \(x+y \mod 2\) is \( \frac{(m+n-1)(3m+n)}{2} \). For a
  31. construction to even be viable, this quantity clearly needs to be even.
  32. </p>
  33. <strong><h3>Constructor</h3></strong>
  34. <form method="POST" action="{{url_for ('index')}}">
  35. <table role="grid">
  36. <tbody>
  37. <tr>
  38. <td>
  39. <label for="M">Value for M:</label>
  40. </td>
  41. <td>
  42. <input type="number" name="M" min="1" max="40" value="{{M}}" required />
  43. </td>
  44. </tr>
  45. <tr>
  46. <td>
  47. <label for="N">Value for N:</label>
  48. </td>
  49. <td>
  50. <input type="number" name="N" min="1" max="40" value="{{N}}" required />
  51. </td>
  52. </tr>
  53. </tbody>
  54. </table>
  55. <input type="submit" value="Construct">
  56. </form>
  57. {% if invalid %}
  58. <p> Invalid Input! </p>
  59. {% endif %}
  60. {% if nosol %}
  61. <p> No Valid Solution is Possible! </p>
  62. {% endif %}
  63. {% if image %}
  64. <img src="{{ image }}" alt="Solution Image" />
  65. {% endif %}
  66. {% if works == False %}
  67. <p> Claimed Construction Fails!!!! </p>
  68. {% endif %}
  69. </main>
  70. </body>
  71. </html>