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

<!DOCTYPE html>
<html lang="en">
<head>
<title>USAMTS 2/5/35 Solution</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js" integrity="sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>
</head>
<body>
<main class="container">
<strong><h3>Problem</h3></strong>
<p>
Let \(m\) and \(n\) be positive integers. Let \(S\) be the set of all points
\((x, y)\) with integer coordinates such that \(1 \leq x, y \leq m + n − 1\)
and \(m + 1 \leq x + y \leq 2m + n − 1\). Let L be the set of the \(3m + 3n −
3\) lines parallel to one of \(x = 0\), \(y = 0\), or \(x + y = 0\) and passing
through at least one point in \(S\). For which pairs \((m, n)\) does there
exist a subset \(T\) of \(S\) such that every line in \(L\) intersects an odd
number of elements of \(T\)?
</p>
<strong><h3>Proof</h3></strong>
<p>
The answer is just all \((m,n)\) such that \( (m+n-1)(m-n) \) is divisible
by 4. The sum of all the x and y coordinates should clearly be even, but
the sum of all \(x+y \mod 2\) is \( \frac{(m+n-1)(3m+n)}{2} \). For a
construction to even be viable, this quantity clearly needs to be even.
</p>
<strong><h3>Constructor</h3></strong>
{% if invalid %}
<p> Invalid Input! </p>
{% endif %}
{% if nosol %}
<p> No Valid Solution is Possible! </p>
{% endif %}
{% if image %}
<img src="{{ image }}" alt="Solution Image" />
{% endif %}
{% if works == False %}
<p> Claimed Construction Fails!!!! </p>
{% endif %}
<form method="POST" action="{{url_for ('index')}}">
<table role="grid">
<tbody>
<tr>
<td>
<label for="M">Value for M:</label>
</td>
<td>
<input type="number" name="M" min="1" max="40" value="{{M}}" required />
</td>
</tr>
<tr>
<td>
<label for="N">Value for N:</label>
</td>
<td>
<input type="number" name="N" min="1" max="40" value="{{N}}" required />
</td>
</tr>
</tbody>
</table>
<input type="submit" value="Construct">
</form>
</main>
</body>
</html>