Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_1.html/1_1.html +95 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_1.html/checkanswer.js +281 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_1.html/index.html +41 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_1.html/minor-edits.html +66 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_2.html/1_2.html +44 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_2.html/checkanswer.js +281 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_2.html/first-round-puzzle.html +31 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_2.html/index.html +54 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_3.html/1_3.html +153 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_3.html/a-pile-of-letters.html +68 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_3.html/checkanswer.js +281 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_index.html/1_7.html +44 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_index.html/asset_index.html +54 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_index.html/checkanswer.js +281 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_index.html/index.html +41 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_index.html/m1.html +48 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_1.html/2_1.html +76 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_1.html/checkanswer.js +281 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_1.html/company-picnic.html +53 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_1.html/index.html +54 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_2.html/2_2.html +45 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_2.html/checkanswer.js +281 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_2.html/index.html +54 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_2.html/shredded-what.html +66 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_3.html/2_3.html +107 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_3.html/abducted.html +24 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_3.html/checkanswer.js +281 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_3.html/index.html +54 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_4.html/2_4.html +71 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_4.html/checkanswer.js +281 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_4.html/index.html +54 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_4.html/that-mixer.html +86 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_5.html/2_5.html +132 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_5.html/chaotic.html +254 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_5.html/checkanswer.js +281 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_5.html/index.html +54 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_5.html/realm.html +77 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_5.html/road-signs.html +58 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_6.html/2_6.html +66 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_6.html/checkanswer.js +281 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_6.html/index.html +54 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_6.html/what-goes-around.html +86 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_7.html/2_7.html +47 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_7.html/a-problem-with-printing.html +200 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_7.html/a-problem-with-printing.ps +118 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_7.html/checkanswer.js +281 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_7.html/index.html +54 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_8.html/2_8.html +195 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_8.html/checkanswer.js +281 -0
- benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_8.html/index.html +54 -0
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_1.html/1_1.html
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="ACMECorp">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="Document Archivists">
|
| 7 |
+
<TITLE>Minor Edits</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff"><!--CUT--><div align=right><small><a href="../../solutions/minor-edits.html">(Solution)</a></small></div><!--CUT--><font face="arial">
|
| 10 |
+
<table width 100%><tr><td>
|
| 11 |
+
<img src="images/head1.jpg">
|
| 12 |
+
</td></tr></table>
|
| 13 |
+
<h2>Document 1.1: Minor Edits</h2>
|
| 14 |
+
|
| 15 |
+
<p>
|
| 16 |
+
|
| 17 |
+
<em>On the back of an insurance claim (it seems your boss's winter
|
| 18 |
+
home burned down under suspicious circumstances), your boss has
|
| 19 |
+
written, "My psychic tells me that the more things change, the more
|
| 20 |
+
they stay the same. I'm redoubling my efforts to understand her
|
| 21 |
+
advice."</em>
|
| 22 |
+
|
| 23 |
+
<p>
|
| 24 |
+
|
| 25 |
+
LIDERATEDSFUSE<br>
|
| 26 |
+
COPYRCHRUS
|
| 27 |
+
|
| 28 |
+
<p>
|
| 29 |
+
|
| 30 |
+
FOROFFERDENLATE<br>
|
| 31 |
+
YESTTAL
|
| 32 |
+
|
| 33 |
+
<p>
|
| 34 |
+
|
| 35 |
+
TFONET<br>
|
| 36 |
+
MATULEASE
|
| 37 |
+
|
| 38 |
+
<p>
|
| 39 |
+
|
| 40 |
+
TVIENT<br>
|
| 41 |
+
ASSEIZE
|
| 42 |
+
|
| 43 |
+
<p>
|
| 44 |
+
|
| 45 |
+
COLORELLECT<br>
|
| 46 |
+
QUINGESTEDRN
|
| 47 |
+
|
| 48 |
+
<p>
|
| 49 |
+
|
| 50 |
+
GREAPULL<br>
|
| 51 |
+
EVERYTHMOLD
|
| 52 |
+
|
| 53 |
+
<p>
|
| 54 |
+
|
| 55 |
+
TETHSTEALRS<br>
|
| 56 |
+
SKILLRUNK
|
| 57 |
+
|
| 58 |
+
<p>
|
| 59 |
+
|
| 60 |
+
PRAISEBREAKIEST<br>
|
| 61 |
+
ATHFORMERUPS
|
| 62 |
+
|
| 63 |
+
<p>
|
| 64 |
+
|
| 65 |
+
POINTLATEAUVERS<br>
|
| 66 |
+
DONKWATCHRTIVE
|
| 67 |
+
|
| 68 |
+
<p>
|
| 69 |
+
|
| 70 |
+
TSHOWECRIMSON<br>
|
| 71 |
+
AEDGEPRESSION
|
| 72 |
+
|
| 73 |
+
<p>
|
| 74 |
+
|
| 75 |
+
TCHARGEBLES<br>
|
| 76 |
+
QUESTIOFRESH<br>
|
| 77 |
+
<p><p><br>
|
| 78 |
+
<a href="index.html">Back to the index</a>
|
| 79 |
+
|
| 80 |
+
<table width 100%><tr><td>
|
| 81 |
+
<img src="images/foot1.jpg">
|
| 82 |
+
</td></tr></table>
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
</body><script type="module" src="/checkanswer.js"></script><script type="module" src="/checkanswer.js"></script>
|
| 87 |
+
</HTML>
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_1.html/checkanswer.js
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Do this first so that layout shift isn't too bad:
|
| 2 |
+
const container = document.createElement("div");
|
| 3 |
+
container.style = `
|
| 4 |
+
font-size: 16px;
|
| 5 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 6 |
+
height: 2.5em;
|
| 7 |
+
`;
|
| 8 |
+
document.body.prepend(container);
|
| 9 |
+
|
| 10 |
+
import { React, html, css, render } from "./package.js";
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Remove non-alphanumeric characters.
|
| 14 |
+
*/
|
| 15 |
+
const normalizeAnswer = (answer) => {
|
| 16 |
+
if (getYear() === 2003) {
|
| 17 |
+
if (document.URL.includes("teamGuest/2")) {
|
| 18 |
+
// Special case: 2003 R2, whose answers are emoji.
|
| 19 |
+
return answer.trim();
|
| 20 |
+
} else if (document.URL.includes("6_3")) {
|
| 21 |
+
// Special case: Answer is literal Greek letter.
|
| 22 |
+
return answer.trim();
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
return answer.toUpperCase().replaceAll(/[^A-Z0-9]/g, "");
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Returns the year of the hunt we're in.
|
| 30 |
+
*/
|
| 31 |
+
const getYear = () => {
|
| 32 |
+
return Number(RegExp(`^.*/([0-9]{4})/.*$`).exec(document.URL)?.[1] ?? 0);
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Fetches the answers as a list of {url, answer, prompt, intermediate}.
|
| 37 |
+
*/
|
| 38 |
+
const getData = async () => {
|
| 39 |
+
const res = await fetch("/answers.tsv");
|
| 40 |
+
const data = await res.text();
|
| 41 |
+
const [header, ...body] = data.split("\n");
|
| 42 |
+
const headers = header.trim().split("\t");
|
| 43 |
+
return body.map((row) => {
|
| 44 |
+
const res = {};
|
| 45 |
+
row.split("\t").forEach((item, i) => {
|
| 46 |
+
res[headers[i]] = item.trim();
|
| 47 |
+
});
|
| 48 |
+
return res;
|
| 49 |
+
});
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Gets the base URL; removes trailing index.html and .html, removes everything
|
| 54 |
+
* before the year, and then removes trailing slash.
|
| 55 |
+
*/
|
| 56 |
+
const getBase = (url) => {
|
| 57 |
+
const root =
|
| 58 |
+
RegExp(`^(.*/)index.html`).exec(url)?.[1] ??
|
| 59 |
+
RegExp(`^(.*).html`).exec(url)?.[1] ??
|
| 60 |
+
url;
|
| 61 |
+
const base = RegExp(`^.*/([0-9]{4}/.*)$`).exec(root)?.[1] ?? root;
|
| 62 |
+
return base.endsWith("/") ? base.slice(0, -1) : base;
|
| 63 |
+
};
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* Get all rows in the data corresponding to a given URL. Group by same prompt.
|
| 67 |
+
*/
|
| 68 |
+
const getAnswers = (data, url) => {
|
| 69 |
+
const base = getBase(url);
|
| 70 |
+
const rows = data.filter((row) => getBase(row.url) === base);
|
| 71 |
+
const prompts = [];
|
| 72 |
+
for (const row of rows) {
|
| 73 |
+
const { prompt } = row;
|
| 74 |
+
const group = prompts.find((group) => group.prompt === prompt);
|
| 75 |
+
if (group) {
|
| 76 |
+
group.rows.push(row);
|
| 77 |
+
} else {
|
| 78 |
+
prompts.push({ prompt, rows: [row] });
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
return prompts;
|
| 82 |
+
};
|
| 83 |
+
|
| 84 |
+
/**
|
| 85 |
+
* A single textbox and submit button in the rows of possible responses.
|
| 86 |
+
*/
|
| 87 |
+
const ResponseRow = ({ prompt, rows, setFeedback }) => {
|
| 88 |
+
const [response, setResponse] = React.useState("");
|
| 89 |
+
|
| 90 |
+
const form = css`
|
| 91 |
+
align-items: baseline;
|
| 92 |
+
display: flex;
|
| 93 |
+
justify-content: right;
|
| 94 |
+
margin-bottom: 0.5em;
|
| 95 |
+
|
| 96 |
+
@media (max-width: 600px) {
|
| 97 |
+
align-items: flex-start;
|
| 98 |
+
flex-direction: column;
|
| 99 |
+
}
|
| 100 |
+
`;
|
| 101 |
+
|
| 102 |
+
const input = css`
|
| 103 |
+
background: #fafafa;
|
| 104 |
+
border: 1px solid #aaa;
|
| 105 |
+
border-radius: 2px;
|
| 106 |
+
color: #121212;
|
| 107 |
+
font-family: inherit;
|
| 108 |
+
font-size: 100%;
|
| 109 |
+
line-height: 1.2;
|
| 110 |
+
margin: 0 0.5em;
|
| 111 |
+
padding: 0.25em 0.5em;
|
| 112 |
+
|
| 113 |
+
@media (max-width: 600px) {
|
| 114 |
+
margin: 0 0 0.25em;
|
| 115 |
+
}
|
| 116 |
+
`;
|
| 117 |
+
|
| 118 |
+
const onSubmit = (e) => {
|
| 119 |
+
e.preventDefault();
|
| 120 |
+
let set = false;
|
| 121 |
+
for (const row of rows) {
|
| 122 |
+
const correct = normalizeAnswer(row.answer) === normalizeAnswer(response);
|
| 123 |
+
if (correct) {
|
| 124 |
+
setFeedback(
|
| 125 |
+
row.intermediate?.trim() === "TRUE"
|
| 126 |
+
? "Correct! See the solution page for the answer."
|
| 127 |
+
: `Solved! The answer was ${row.answer}.`
|
| 128 |
+
);
|
| 129 |
+
set = true;
|
| 130 |
+
break;
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
if (!set) {
|
| 134 |
+
setFeedback("Incorrect.");
|
| 135 |
+
}
|
| 136 |
+
};
|
| 137 |
+
|
| 138 |
+
const onChange = (e) => setResponse(e.target.value);
|
| 139 |
+
|
| 140 |
+
return html`
|
| 141 |
+
<form class=${form} onSubmit=${onSubmit}>
|
| 142 |
+
<label htmlFor=${prompt + " prompt"}>
|
| 143 |
+
${prompt || "Enter your guess"}:
|
| 144 |
+
</label>
|
| 145 |
+
<input
|
| 146 |
+
class=${input}
|
| 147 |
+
id=${prompt + " prompt"}
|
| 148 |
+
onChange=${onChange}
|
| 149 |
+
required
|
| 150 |
+
type="text"
|
| 151 |
+
value=${response}
|
| 152 |
+
/>
|
| 153 |
+
<button type="submit">Submit</button>
|
| 154 |
+
</form>
|
| 155 |
+
`;
|
| 156 |
+
};
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* Check answer button, rendered at top of page.
|
| 160 |
+
*/
|
| 161 |
+
const CheckButton = ({ prompts }) => {
|
| 162 |
+
const [open, setOpen] = React.useState(false);
|
| 163 |
+
const [feedback, setFeedback] = React.useState("Call in an answer.");
|
| 164 |
+
|
| 165 |
+
const wrapper = css`
|
| 166 |
+
font-family: "PT Sans", sans-serif;
|
| 167 |
+
font-size: 16px;
|
| 168 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 169 |
+
height: 2.5em;
|
| 170 |
+
|
| 171 |
+
button {
|
| 172 |
+
background: #555;
|
| 173 |
+
border: none;
|
| 174 |
+
border-radius: 2px;
|
| 175 |
+
color: #fff;
|
| 176 |
+
cursor: pointer;
|
| 177 |
+
display: inline-block;
|
| 178 |
+
font-size: 1em;
|
| 179 |
+
font-family: "PT Sans", sans-serif;
|
| 180 |
+
font-weight: bold;
|
| 181 |
+
line-height: 1.2;
|
| 182 |
+
padding: 0.25em 1em;
|
| 183 |
+
text-align: center;
|
| 184 |
+
text-decoration: none;
|
| 185 |
+
text-transform: none;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
p {
|
| 189 |
+
margin: 0 0 1em;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
a {
|
| 193 |
+
color: inherit !important;
|
| 194 |
+
}
|
| 195 |
+
`;
|
| 196 |
+
|
| 197 |
+
const btnTop = [2015, 2016].includes(getYear())
|
| 198 |
+
? "50px"
|
| 199 |
+
: [2012].includes(getYear())
|
| 200 |
+
? "-2.5em"
|
| 201 |
+
: "0px";
|
| 202 |
+
|
| 203 |
+
const button = css`
|
| 204 |
+
box-sizing: border-box;
|
| 205 |
+
height: 2.5em;
|
| 206 |
+
left: 0;
|
| 207 |
+
position: absolute;
|
| 208 |
+
top: ${btnTop};
|
| 209 |
+
width: 100%;
|
| 210 |
+
z-index: 9999;
|
| 211 |
+
`;
|
| 212 |
+
|
| 213 |
+
const dropdownWrapper = css`
|
| 214 |
+
background: #edeff0;
|
| 215 |
+
color: #121212;
|
| 216 |
+
left: 0;
|
| 217 |
+
position: absolute;
|
| 218 |
+
right: 0;
|
| 219 |
+
top: calc(2.5em + ${btnTop});
|
| 220 |
+
z-index: 9999;
|
| 221 |
+
`;
|
| 222 |
+
|
| 223 |
+
const dropdown = css`
|
| 224 |
+
margin: 0 auto;
|
| 225 |
+
max-width: 40em;
|
| 226 |
+
padding: 1em;
|
| 227 |
+
z-index: 9999;
|
| 228 |
+
`;
|
| 229 |
+
|
| 230 |
+
const responses = css`
|
| 231 |
+
margin: 0 auto;
|
| 232 |
+
width: fit-content;
|
| 233 |
+
|
| 234 |
+
@media (max-width: 600px) {
|
| 235 |
+
width: auto;
|
| 236 |
+
}
|
| 237 |
+
`;
|
| 238 |
+
|
| 239 |
+
const onClick = () => setOpen(!open);
|
| 240 |
+
|
| 241 |
+
const body =
|
| 242 |
+
prompts.length > 0
|
| 243 |
+
? prompts.map(
|
| 244 |
+
(group) =>
|
| 245 |
+
html`<${ResponseRow} setFeedback=${setFeedback} ...${group} />`
|
| 246 |
+
)
|
| 247 |
+
: html`<p>
|
| 248 |
+
No answers found on this page. Please report this to${" "}
|
| 249 |
+
<a href="mailto:puzzle@mit.edu">puzzle@mit.edu</a>.
|
| 250 |
+
</p>`;
|
| 251 |
+
|
| 252 |
+
return html`
|
| 253 |
+
<style>
|
| 254 |
+
@import url("https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&display=swap");
|
| 255 |
+
|
| 256 |
+
${[2015, 2016].includes(getYear()) &&
|
| 257 |
+
".navbar-fixed-top { z-index: 10000 }"}
|
| 258 |
+
${[2012].includes(getYear()) &&
|
| 259 |
+
"body { top: 2.5em } #check-answer, #shortcuts { z-index: 10000 !important }"}
|
| 260 |
+
${[2006].includes(getYear()) && 'img[alt="Check Answer"] { display: none }'}
|
| 261 |
+
</style>
|
| 262 |
+
<div class=${wrapper}>
|
| 263 |
+
<button class=${button} onClick=${onClick}>
|
| 264 |
+
Check your answers spoiler-free
|
| 265 |
+
</button>
|
| 266 |
+
${open &&
|
| 267 |
+
html`
|
| 268 |
+
<div class=${dropdownWrapper}>
|
| 269 |
+
<div class=${dropdown}>
|
| 270 |
+
<p>${feedback}</p>
|
| 271 |
+
<div class=${responses}>${body}</div>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
`}
|
| 275 |
+
</div>
|
| 276 |
+
`;
|
| 277 |
+
};
|
| 278 |
+
|
| 279 |
+
const data = await getData();
|
| 280 |
+
const prompts = getAnswers(data, document.URL);
|
| 281 |
+
render(html`<${CheckButton} prompts=${prompts} />`, container);
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_1.html/index.html
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>AcmeCorp: Section 1</title>
|
| 5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6 |
+
</head>
|
| 7 |
+
|
| 8 |
+
<body bgcolor=white><!--CUT--><div align=right><small><a href="../../solutions/m1.html">(Meta-puzzle solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 10 |
+
<tr>
|
| 11 |
+
<td><img src="images/head1.jpg"></td>
|
| 12 |
+
</tr>
|
| 13 |
+
</table>
|
| 14 |
+
<font face="Arial"><strong>Section 1</strong>
|
| 15 |
+
<p>
|
| 16 |
+
<em>Today (Friday) the boss came into work to do what he always does at work. Whatever that is--you realize you're not entirely positive what it is he did here. On his desk, though, there's a small stack of...how very odd. Are these puzzles?</em>
|
| 17 |
+
|
| 18 |
+
<p><ol>
|
| 19 |
+
<li><a href="1_1.html">Minor Edits</a></li>
|
| 20 |
+
<li><a href="1_2.html">First Round Puzzle</a></li>
|
| 21 |
+
<li><a href="1_3.html">A Pile of Letters</a></li>
|
| 22 |
+
<li><a href="1_4.html">Something in Common</a></li>
|
| 23 |
+
<li><a href="1_5.html">Job Performance Predictor</a></li>
|
| 24 |
+
<li><a href="1_6.html">Making Connections</a></li>
|
| 25 |
+
<li><a href="1_7.html">Financial Report</a></li>
|
| 26 |
+
</ol>
|
| 27 |
+
</p>
|
| 28 |
+
<p> </p>
|
| 29 |
+
<p> </p>
|
| 30 |
+
<p> </p>
|
| 31 |
+
<p> </p>
|
| 32 |
+
<p> </p>
|
| 33 |
+
<a href="../index.html">Back to the index</a>
|
| 34 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 35 |
+
<tr>
|
| 36 |
+
<td><img src="images/foot1.jpg"></td>
|
| 37 |
+
</tr>
|
| 38 |
+
</table>
|
| 39 |
+
</font>
|
| 40 |
+
</body><script type="module" src="/checkanswer.js"></script>
|
| 41 |
+
</html>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_1.html/minor-edits.html
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="AcmeCorp">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="Document Archivists">
|
| 7 |
+
<TITLE>Title</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff">
|
| 10 |
+
|
| 11 |
+
<h2>Round 1 Puzzle: Minor Edits</h2>
|
| 12 |
+
<h3>by Lance Nathan</h3>
|
| 13 |
+
|
| 14 |
+
<p>
|
| 15 |
+
|
| 16 |
+
Each string of letters can have a substring replaced with a synonym to form a new string, which can have a substring replaced with a synonym to form a word. In each pair of strings, the second word contains all of the letters of the first word but one.
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<pre>
|
| 21 |
+
F: LIDERATEDSFUSE --> TOPERATEDSFUSE --> TRANSFUSE
|
| 22 |
+
COPYRCHRUS --> APERCHRUS --> ANESTRUS
|
| 23 |
+
|
| 24 |
+
E: FOROFFERDENLATE --> FORBIDDENLATE --> TABULATE
|
| 25 |
+
YESTTAL --> AYETTAL --> ABUTTAL
|
| 26 |
+
|
| 27 |
+
L: TFONET --> TFACET --> TANGLE
|
| 28 |
+
MATULEASE --> MATURENT --> AGENT
|
| 29 |
+
|
| 30 |
+
L: TVIENT --> TCOMPETENT --> TABLE
|
| 31 |
+
ASSEIZE --> ASTAKE --> ABET
|
| 32 |
+
|
| 33 |
+
O: COLORELLECT --> TINTELLECT --> TREASON
|
| 34 |
+
QUINGESTEDRN --> QUATERN --> ASTERN
|
| 35 |
+
|
| 36 |
+
W: GREAPULL --> GREATOW --> TALLOW
|
| 37 |
+
EVERYTHMOLD --> EVERYTHINGOT --> ALLOT
|
| 38 |
+
|
| 39 |
+
E: TETHSTEALRS --> TETHROBRS --> TEACHERS
|
| 40 |
+
SKILLRUNK --> ARTRUNK --> ARCHEST
|
| 41 |
+
|
| 42 |
+
R: PRAISEBREAKIEST --> TOUTBREAKIEST --> TRASHIEST
|
| 43 |
+
ATHFORMERUPS --> ATHOLDUPS --> ATHEISTS
|
| 44 |
+
|
| 45 |
+
M: POINTLATEAUVERS --> TIPLATEAUVERS --> TIMESAVERS
|
| 46 |
+
DONKWATCHRTIVE --> DONKEYERTIVE --> ASSERTIVE
|
| 47 |
+
|
| 48 |
+
I: TSHOWECRIMSON --> TSHOWERED --> TRAINED
|
| 49 |
+
AEDGEPRESSION --> ARIMPRESSION --> ARDENT
|
| 50 |
+
|
| 51 |
+
T: TCHARGEBLES --> TFEEBLES --> TWEAKS
|
| 52 |
+
QUESTIOFRESH --> QUESTIONEW --> ASKEW
|
| 53 |
+
</pre>
|
| 54 |
+
|
| 55 |
+
<p>
|
| 56 |
+
|
| 57 |
+
The letters that appear in the first words but not the second are FELLOWERMIT, which by the same process becomes CHAPERMIT and finally the answer, which is CHALET.
|
| 58 |
+
|
| 59 |
+
<p>
|
| 60 |
+
|
| 61 |
+
Also, each pair of words begins with the same letters, which are the hidden bigram TA.
|
| 62 |
+
|
| 63 |
+
</BODY>
|
| 64 |
+
</HTML>
|
| 65 |
+
|
| 66 |
+
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_2.html/1_2.html
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="ACMECorp">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="Document Archivists">
|
| 7 |
+
<TITLE>First Round Puzzle</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff"><!--CUT--><div align=right><small><a href="../../solutions/first-round-puzzle.html">(Solution)</a></small></div><!--CUT--><font face="arial">
|
| 10 |
+
<table width="100%">
|
| 11 |
+
<tr>
|
| 12 |
+
<td><img src="images/head1.jpg"></td>
|
| 13 |
+
</tr>
|
| 14 |
+
</table>
|
| 15 |
+
<h2>Document 1.2: First Round Puzzle</h2>
|
| 16 |
+
|
| 17 |
+
<p>
|
| 18 |
+
|
| 19 |
+
<em>Oh, no. It would appear that your boss, just like everybody else, was in the process of writing a screenplay or a cheap sci-fi novel or something. For some reason, this snippet from a monologue was repeatedly cut-and-pasted into about two dozen different files. Feeling a little exhausted already, you pull up a chair and start reading. Man, who knew puzzle solving was such thirsty work?</em>
|
| 20 |
+
|
| 21 |
+
<p>
|
| 22 |
+
|
| 23 |
+
<center><img src="images/first-round-puzzle.gif"></center>
|
| 24 |
+
|
| 25 |
+
<br><strong>NOTE: When printing this puzzle, Human Resources suggest the use of Internet Explorer.</strong>
|
| 26 |
+
|
| 27 |
+
<p><p><br>
|
| 28 |
+
<a href="../index.html">Back to the index</a>
|
| 29 |
+
|
| 30 |
+
<table width 100%><tr><td>
|
| 31 |
+
<img src="images/foot1.jpg">
|
| 32 |
+
</td></tr></table>
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
</font>
|
| 36 |
+
</body><script type="module" src="/checkanswer.js"></script><script type="module" src="/checkanswer.js"></script>
|
| 37 |
+
</HTML>
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_2.html/checkanswer.js
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Do this first so that layout shift isn't too bad:
|
| 2 |
+
const container = document.createElement("div");
|
| 3 |
+
container.style = `
|
| 4 |
+
font-size: 16px;
|
| 5 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 6 |
+
height: 2.5em;
|
| 7 |
+
`;
|
| 8 |
+
document.body.prepend(container);
|
| 9 |
+
|
| 10 |
+
import { React, html, css, render } from "./package.js";
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Remove non-alphanumeric characters.
|
| 14 |
+
*/
|
| 15 |
+
const normalizeAnswer = (answer) => {
|
| 16 |
+
if (getYear() === 2003) {
|
| 17 |
+
if (document.URL.includes("teamGuest/2")) {
|
| 18 |
+
// Special case: 2003 R2, whose answers are emoji.
|
| 19 |
+
return answer.trim();
|
| 20 |
+
} else if (document.URL.includes("6_3")) {
|
| 21 |
+
// Special case: Answer is literal Greek letter.
|
| 22 |
+
return answer.trim();
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
return answer.toUpperCase().replaceAll(/[^A-Z0-9]/g, "");
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Returns the year of the hunt we're in.
|
| 30 |
+
*/
|
| 31 |
+
const getYear = () => {
|
| 32 |
+
return Number(RegExp(`^.*/([0-9]{4})/.*$`).exec(document.URL)?.[1] ?? 0);
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Fetches the answers as a list of {url, answer, prompt, intermediate}.
|
| 37 |
+
*/
|
| 38 |
+
const getData = async () => {
|
| 39 |
+
const res = await fetch("/answers.tsv");
|
| 40 |
+
const data = await res.text();
|
| 41 |
+
const [header, ...body] = data.split("\n");
|
| 42 |
+
const headers = header.trim().split("\t");
|
| 43 |
+
return body.map((row) => {
|
| 44 |
+
const res = {};
|
| 45 |
+
row.split("\t").forEach((item, i) => {
|
| 46 |
+
res[headers[i]] = item.trim();
|
| 47 |
+
});
|
| 48 |
+
return res;
|
| 49 |
+
});
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Gets the base URL; removes trailing index.html and .html, removes everything
|
| 54 |
+
* before the year, and then removes trailing slash.
|
| 55 |
+
*/
|
| 56 |
+
const getBase = (url) => {
|
| 57 |
+
const root =
|
| 58 |
+
RegExp(`^(.*/)index.html`).exec(url)?.[1] ??
|
| 59 |
+
RegExp(`^(.*).html`).exec(url)?.[1] ??
|
| 60 |
+
url;
|
| 61 |
+
const base = RegExp(`^.*/([0-9]{4}/.*)$`).exec(root)?.[1] ?? root;
|
| 62 |
+
return base.endsWith("/") ? base.slice(0, -1) : base;
|
| 63 |
+
};
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* Get all rows in the data corresponding to a given URL. Group by same prompt.
|
| 67 |
+
*/
|
| 68 |
+
const getAnswers = (data, url) => {
|
| 69 |
+
const base = getBase(url);
|
| 70 |
+
const rows = data.filter((row) => getBase(row.url) === base);
|
| 71 |
+
const prompts = [];
|
| 72 |
+
for (const row of rows) {
|
| 73 |
+
const { prompt } = row;
|
| 74 |
+
const group = prompts.find((group) => group.prompt === prompt);
|
| 75 |
+
if (group) {
|
| 76 |
+
group.rows.push(row);
|
| 77 |
+
} else {
|
| 78 |
+
prompts.push({ prompt, rows: [row] });
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
return prompts;
|
| 82 |
+
};
|
| 83 |
+
|
| 84 |
+
/**
|
| 85 |
+
* A single textbox and submit button in the rows of possible responses.
|
| 86 |
+
*/
|
| 87 |
+
const ResponseRow = ({ prompt, rows, setFeedback }) => {
|
| 88 |
+
const [response, setResponse] = React.useState("");
|
| 89 |
+
|
| 90 |
+
const form = css`
|
| 91 |
+
align-items: baseline;
|
| 92 |
+
display: flex;
|
| 93 |
+
justify-content: right;
|
| 94 |
+
margin-bottom: 0.5em;
|
| 95 |
+
|
| 96 |
+
@media (max-width: 600px) {
|
| 97 |
+
align-items: flex-start;
|
| 98 |
+
flex-direction: column;
|
| 99 |
+
}
|
| 100 |
+
`;
|
| 101 |
+
|
| 102 |
+
const input = css`
|
| 103 |
+
background: #fafafa;
|
| 104 |
+
border: 1px solid #aaa;
|
| 105 |
+
border-radius: 2px;
|
| 106 |
+
color: #121212;
|
| 107 |
+
font-family: inherit;
|
| 108 |
+
font-size: 100%;
|
| 109 |
+
line-height: 1.2;
|
| 110 |
+
margin: 0 0.5em;
|
| 111 |
+
padding: 0.25em 0.5em;
|
| 112 |
+
|
| 113 |
+
@media (max-width: 600px) {
|
| 114 |
+
margin: 0 0 0.25em;
|
| 115 |
+
}
|
| 116 |
+
`;
|
| 117 |
+
|
| 118 |
+
const onSubmit = (e) => {
|
| 119 |
+
e.preventDefault();
|
| 120 |
+
let set = false;
|
| 121 |
+
for (const row of rows) {
|
| 122 |
+
const correct = normalizeAnswer(row.answer) === normalizeAnswer(response);
|
| 123 |
+
if (correct) {
|
| 124 |
+
setFeedback(
|
| 125 |
+
row.intermediate?.trim() === "TRUE"
|
| 126 |
+
? "Correct! See the solution page for the answer."
|
| 127 |
+
: `Solved! The answer was ${row.answer}.`
|
| 128 |
+
);
|
| 129 |
+
set = true;
|
| 130 |
+
break;
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
if (!set) {
|
| 134 |
+
setFeedback("Incorrect.");
|
| 135 |
+
}
|
| 136 |
+
};
|
| 137 |
+
|
| 138 |
+
const onChange = (e) => setResponse(e.target.value);
|
| 139 |
+
|
| 140 |
+
return html`
|
| 141 |
+
<form class=${form} onSubmit=${onSubmit}>
|
| 142 |
+
<label htmlFor=${prompt + " prompt"}>
|
| 143 |
+
${prompt || "Enter your guess"}:
|
| 144 |
+
</label>
|
| 145 |
+
<input
|
| 146 |
+
class=${input}
|
| 147 |
+
id=${prompt + " prompt"}
|
| 148 |
+
onChange=${onChange}
|
| 149 |
+
required
|
| 150 |
+
type="text"
|
| 151 |
+
value=${response}
|
| 152 |
+
/>
|
| 153 |
+
<button type="submit">Submit</button>
|
| 154 |
+
</form>
|
| 155 |
+
`;
|
| 156 |
+
};
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* Check answer button, rendered at top of page.
|
| 160 |
+
*/
|
| 161 |
+
const CheckButton = ({ prompts }) => {
|
| 162 |
+
const [open, setOpen] = React.useState(false);
|
| 163 |
+
const [feedback, setFeedback] = React.useState("Call in an answer.");
|
| 164 |
+
|
| 165 |
+
const wrapper = css`
|
| 166 |
+
font-family: "PT Sans", sans-serif;
|
| 167 |
+
font-size: 16px;
|
| 168 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 169 |
+
height: 2.5em;
|
| 170 |
+
|
| 171 |
+
button {
|
| 172 |
+
background: #555;
|
| 173 |
+
border: none;
|
| 174 |
+
border-radius: 2px;
|
| 175 |
+
color: #fff;
|
| 176 |
+
cursor: pointer;
|
| 177 |
+
display: inline-block;
|
| 178 |
+
font-size: 1em;
|
| 179 |
+
font-family: "PT Sans", sans-serif;
|
| 180 |
+
font-weight: bold;
|
| 181 |
+
line-height: 1.2;
|
| 182 |
+
padding: 0.25em 1em;
|
| 183 |
+
text-align: center;
|
| 184 |
+
text-decoration: none;
|
| 185 |
+
text-transform: none;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
p {
|
| 189 |
+
margin: 0 0 1em;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
a {
|
| 193 |
+
color: inherit !important;
|
| 194 |
+
}
|
| 195 |
+
`;
|
| 196 |
+
|
| 197 |
+
const btnTop = [2015, 2016].includes(getYear())
|
| 198 |
+
? "50px"
|
| 199 |
+
: [2012].includes(getYear())
|
| 200 |
+
? "-2.5em"
|
| 201 |
+
: "0px";
|
| 202 |
+
|
| 203 |
+
const button = css`
|
| 204 |
+
box-sizing: border-box;
|
| 205 |
+
height: 2.5em;
|
| 206 |
+
left: 0;
|
| 207 |
+
position: absolute;
|
| 208 |
+
top: ${btnTop};
|
| 209 |
+
width: 100%;
|
| 210 |
+
z-index: 9999;
|
| 211 |
+
`;
|
| 212 |
+
|
| 213 |
+
const dropdownWrapper = css`
|
| 214 |
+
background: #edeff0;
|
| 215 |
+
color: #121212;
|
| 216 |
+
left: 0;
|
| 217 |
+
position: absolute;
|
| 218 |
+
right: 0;
|
| 219 |
+
top: calc(2.5em + ${btnTop});
|
| 220 |
+
z-index: 9999;
|
| 221 |
+
`;
|
| 222 |
+
|
| 223 |
+
const dropdown = css`
|
| 224 |
+
margin: 0 auto;
|
| 225 |
+
max-width: 40em;
|
| 226 |
+
padding: 1em;
|
| 227 |
+
z-index: 9999;
|
| 228 |
+
`;
|
| 229 |
+
|
| 230 |
+
const responses = css`
|
| 231 |
+
margin: 0 auto;
|
| 232 |
+
width: fit-content;
|
| 233 |
+
|
| 234 |
+
@media (max-width: 600px) {
|
| 235 |
+
width: auto;
|
| 236 |
+
}
|
| 237 |
+
`;
|
| 238 |
+
|
| 239 |
+
const onClick = () => setOpen(!open);
|
| 240 |
+
|
| 241 |
+
const body =
|
| 242 |
+
prompts.length > 0
|
| 243 |
+
? prompts.map(
|
| 244 |
+
(group) =>
|
| 245 |
+
html`<${ResponseRow} setFeedback=${setFeedback} ...${group} />`
|
| 246 |
+
)
|
| 247 |
+
: html`<p>
|
| 248 |
+
No answers found on this page. Please report this to${" "}
|
| 249 |
+
<a href="mailto:puzzle@mit.edu">puzzle@mit.edu</a>.
|
| 250 |
+
</p>`;
|
| 251 |
+
|
| 252 |
+
return html`
|
| 253 |
+
<style>
|
| 254 |
+
@import url("https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&display=swap");
|
| 255 |
+
|
| 256 |
+
${[2015, 2016].includes(getYear()) &&
|
| 257 |
+
".navbar-fixed-top { z-index: 10000 }"}
|
| 258 |
+
${[2012].includes(getYear()) &&
|
| 259 |
+
"body { top: 2.5em } #check-answer, #shortcuts { z-index: 10000 !important }"}
|
| 260 |
+
${[2006].includes(getYear()) && 'img[alt="Check Answer"] { display: none }'}
|
| 261 |
+
</style>
|
| 262 |
+
<div class=${wrapper}>
|
| 263 |
+
<button class=${button} onClick=${onClick}>
|
| 264 |
+
Check your answers spoiler-free
|
| 265 |
+
</button>
|
| 266 |
+
${open &&
|
| 267 |
+
html`
|
| 268 |
+
<div class=${dropdownWrapper}>
|
| 269 |
+
<div class=${dropdown}>
|
| 270 |
+
<p>${feedback}</p>
|
| 271 |
+
<div class=${responses}>${body}</div>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
`}
|
| 275 |
+
</div>
|
| 276 |
+
`;
|
| 277 |
+
};
|
| 278 |
+
|
| 279 |
+
const data = await getData();
|
| 280 |
+
const prompts = getAnswers(data, document.URL);
|
| 281 |
+
render(html`<${CheckButton} prompts=${prompts} />`, container);
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_2.html/first-round-puzzle.html
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Lance Nathan">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="me typing damnit">
|
| 7 |
+
<TITLE>First Round Puzzle</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff">
|
| 10 |
+
|
| 11 |
+
<h2>Round 1 Puzzle: First Round Puzzle</h2>
|
| 12 |
+
<h3>by John Chaneski</h3>
|
| 13 |
+
|
| 14 |
+
<p>
|
| 15 |
+
|
| 16 |
+
What makes this a first "round" puzzle is that--as suggested by the clueing in the text such as "barely making ends meet," "wrapped around a twelve ounce bottle of Rolling Rock," "cut off," "tape," and "keep it around, but only reconstruct it"--the way to solve it is to print out the block of text, cut it into strips, tape the strips end to end, and wrap the whole thing around a twelve-ounce bottle of Rolling Rock.
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
When you do, one column of text contains the letters highlighted here in red, and another contains those in bold:
|
| 21 |
+
|
| 22 |
+
<p>
|
| 23 |
+
|
| 24 |
+
<center><img src="first-round-puzzle.gif"></center>
|
| 25 |
+
|
| 26 |
+
<p>
|
| 27 |
+
|
| 28 |
+
The answer is LABORATORY. The hidden bigram is KE.
|
| 29 |
+
|
| 30 |
+
</BODY>
|
| 31 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_2.html/index.html
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>ACMECorp: Index</title>
|
| 5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6 |
+
</head>
|
| 7 |
+
|
| 8 |
+
<body>
|
| 9 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 10 |
+
<tr>
|
| 11 |
+
<td><img src="1/images/headm.jpg"></td>
|
| 12 |
+
</tr>
|
| 13 |
+
</table>
|
| 14 |
+
<p><font size="3" face="Arial">Welcome to the AcmeCorp
|
| 15 |
+
Internal Document Archive. We have done our best to give all of you free
|
| 16 |
+
access to all materials relating to Mr. Adelphia's last activities. We hope you will find these documents helpful. Please feel free to call Human Resources
|
| 17 |
+
if you have problems viewing these documents.</font></p>
|
| 18 |
+
<p><font size="3" face="Arial">Thank you,</p>
|
| 19 |
+
<p>AIDA</font><p>
|
| 20 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 21 |
+
<tr><td><font size="3" face="arial"><ul>
|
| 22 |
+
<li><a href="1/index.html"><strong>Section 1</strong></a>: Friday, January 17</li>
|
| 23 |
+
<li><a href="2/index.html"><strong>Section 2</strong></a>: Thursday, January 16</li>
|
| 24 |
+
<li><a href="3/index.html"><strong>Section 3</strong></a>: Wednesday, January 15</li>
|
| 25 |
+
<li><a href="4/index.html"><strong>Section 4</strong></a>: Tuesday, January 14</li>
|
| 26 |
+
<li><a href="5/index.html"><strong>Section 5</strong></a>: Monday, January 13</li>
|
| 27 |
+
<li><a href="6/index.html"><strong>Section 6</strong></a>: Sunday, January 12</li>
|
| 28 |
+
<li><a href="7/index.html"><strong>Section 7</strong></a>: Saturday,
|
| 29 |
+
January 11</li>
|
| 30 |
+
<li><a href="../solutions/endgame.html"><strong>Meta-Metapuzzle and
|
| 31 |
+
Endgame</li>
|
| 32 |
+
<li><a href="../solutions/stats.txt"><strong>Solving Statistics</li>
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
</ul>
|
| 36 |
+
</font>
|
| 37 |
+
</td>
|
| 38 |
+
<td valign="top">
|
| 39 |
+
<strong><font face="helvetica"><a href="Training/index.html">Training</a></font></strong>
|
| 40 |
+
</td>
|
| 41 |
+
<td valign="top">
|
| 42 |
+
<strong><font face="helvetica"><a href="R/0_000/index.html">Facility R: Entrance</a></font></strong>
|
| 43 |
+
</td>
|
| 44 |
+
|
| 45 |
+
</tr>
|
| 46 |
+
</table></p>
|
| 47 |
+
<p><img src="1/images/foot1.jpg"></p>
|
| 48 |
+
</body><script type="module" src="/checkanswer.js"></script>
|
| 49 |
+
</html>
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_3.html/1_3.html
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="ACMECorp">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="Document Archivists">
|
| 7 |
+
<TITLE>A Pile of Letters</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff"><!--CUT--><div align=right><small><a href="../../solutions/a-pile-of-letters.html">(Solution)</a></small></div><!--CUT--><font face="arial">
|
| 10 |
+
<table width="100%">
|
| 11 |
+
<tr>
|
| 12 |
+
<td><img src="images/head1.jpg"></td>
|
| 13 |
+
</tr>
|
| 14 |
+
</table>
|
| 15 |
+
|
| 16 |
+
<font face="Arial, Helvetica, sans-serif">
|
| 17 |
+
<h2>Document 1.3: A Pile of Letters</h2>
|
| 18 |
+
|
| 19 |
+
<p>
|
| 20 |
+
|
| 21 |
+
<em>As you feel around in a dark desk drawer, you find a pile of letters. Grabbing a handful, you find that what you've pulled out is actually a puzzle grid and some clues sandwiched between some envelopes. You wouldn't want the letters to go missing, so you file them, two at a time, in the appropriate places, and get to work on the puzzle.</em>
|
| 22 |
+
|
| 23 |
+
<p>
|
| 24 |
+
|
| 25 |
+
<center><img src="images/pile-of-letters.gif"></center>
|
| 26 |
+
|
| 27 |
+
<p>
|
| 28 |
+
|
| 29 |
+
<table align="center" border="0" cellspacing="8" cellpadding="0">
|
| 30 |
+
<tr valign="top">
|
| 31 |
+
<td>
|
| 32 |
+
<b>BLACK<b><br>
|
| 33 |
+
<b>Across</b><br>
|
| 34 |
+
<ol>
|
| 35 |
+
<li>Blind singer featured in <cite>Genghis Blues</cite>: 2 wds. (8)</li>
|
| 36 |
+
<li>John Paul II's bulletproof car (10)</li>
|
| 37 |
+
<li>County in a Jack Black movie title (6)</li>
|
| 38 |
+
<li>Hall-of-Famer Tom Mack, et al.: 2 wds. (10)</li>
|
| 39 |
+
<li>Scorch or lambaste (6)</li>
|
| 40 |
+
<li>Mexican peninsula (7)</li>
|
| 41 |
+
<li>Free demo copy (5)
|
| 42 |
+
<br>"Hold ___ your hat!": 2 wds. (4)</li>
|
| 43 |
+
<li>Greeting spoken by Hollywood Indians (3)
|
| 44 |
+
<br><i>Time</i>'s 1977 Man of the Year (5)</li>
|
| 45 |
+
<li>Unagi (3)
|
| 46 |
+
<br>Item hefted by a roadie (3)</li>
|
| 47 |
+
<li>Hard-to-find (4)
|
| 48 |
+
<br>Sticky ooze (3)</li>
|
| 49 |
+
<li>"The Hard Nut" choreographer Morris (4)</li>
|
| 50 |
+
<li>Pigmented parts of irises (5)</li>
|
| 51 |
+
<li>Album featuring the song "Charlie Dance": Hyph. (9)</li>
|
| 52 |
+
<li>Title for Wenceslao Moreno (5)</li>
|
| 53 |
+
<li>Oh or Dee (6)
|
| 54 |
+
</ol>
|
| 55 |
+
</td>
|
| 56 |
+
<td>
|
| 57 |
+
<br>
|
| 58 |
+
<b>Down<b><br>
|
| 59 |
+
<ol>
|
| 60 |
+
<li>Cyclops blinded by Odysseus (10)</li>
|
| 61 |
+
<li>Content cats' sounds (5)</li>
|
| 62 |
+
<li>Father of Deimos (4)
|
| 63 |
+
<br>Layers of paint (5)</li>
|
| 64 |
+
<li>In advance, slangily (5)</li>
|
| 65 |
+
<li>Like actors filming a scene: 2 wds. (8)
|
| 66 |
+
<br>By means of (3)</li>
|
| 67 |
+
<li>Towards Harlem, from Soho (6)</li>
|
| 68 |
+
<li>Not staccato (6)
|
| 69 |
+
<br>Mull over, overnight: 2 wds (7)</li>
|
| 70 |
+
<li>Feb. follower (3)</li>
|
| 71 |
+
<li>Stick out one's lower lip (4)
|
| 72 |
+
<br>Costar, to actors (7)</li>
|
| 73 |
+
<li>Michael Jackson song that begins, "Your butt is mine" (3)</li>
|
| 74 |
+
<li>Morning rush hour hour: 2 wds. (7)
|
| 75 |
+
<br>Word with gloves or stuff (3)</li>
|
| 76 |
+
<li>Scientology founder Hubbard: 2 wds. (4)</li>
|
| 77 |
+
<li>Opposite of "have to": 2 wds. (7)
|
| 78 |
+
<br>Tricky puzzle (5)</li>
|
| 79 |
+
<li>On the bounding main (4)
|
| 80 |
+
</ol>
|
| 81 |
+
</td>
|
| 82 |
+
<td>
|
| 83 |
+
<b>WHITE<b><br>
|
| 84 |
+
<b>Across</b><br>
|
| 85 |
+
<ol>
|
| 86 |
+
<li>___ Cain (partied hard) (6)</li>
|
| 87 |
+
<li>Cheers and Moe's, e.g. (4)</li>
|
| 88 |
+
<li>Not towards: 2 wds. (8)</li>
|
| 89 |
+
<li>Madonna's "La ___ Bonita" (4)</li>
|
| 90 |
+
<li>Up to this point: 2 wds. (8)</li>
|
| 91 |
+
<li>Eggs: Lat. (3)
|
| 92 |
+
<br>Phrase on a memo's subject line: 2 wds. (4)</li>
|
| 93 |
+
<li>Beyond overweight (5)</li>
|
| 94 |
+
<li>Tosses one's hair and smiles, perhaps (6)</li>
|
| 95 |
+
<li>Ye ___ Curiosity Shoppe (4)
|
| 96 |
+
<br><cite>Once ___ a Time in America</cite> (4)</li>
|
| 97 |
+
<li>A carrier pigeon carries it (7)</li>
|
| 98 |
+
<li>Costs, with "for" (7)
|
| 99 |
+
<br>His first book was <cite>Tamerlane and Other Poems</cite> (3)</li>
|
| 100 |
+
<li>"<i>Et in Arcadia</i> ___" (3)
|
| 101 |
+
<br>Like Todd Solondz's <cite>Storytelling</cite>, after the MPAA got its way: 2 wds. (6)</li>
|
| 102 |
+
<li>Lecterns (5)</li>
|
| 103 |
+
<li>Begin, as bad weather: 2 wds. (5)
|
| 104 |
+
<br>Dryer trap buildup (4)</li>
|
| 105 |
+
<li>"They're a modern ___ family...": 2 wds. (8)
|
| 106 |
+
</ol>
|
| 107 |
+
</td>
|
| 108 |
+
<td>
|
| 109 |
+
<br>
|
| 110 |
+
<b>Down<b><br>
|
| 111 |
+
<ol>
|
| 112 |
+
<li>Speed ___ (parking lot impediments) (5)</li>
|
| 113 |
+
<li>Amazon habitat: 2 wds. (10)</li>
|
| 114 |
+
<li>Claim without proof (6)</li>
|
| 115 |
+
<li>Five-time movie role for Kenny Baker, so far: Hyph. (10)</li>
|
| 116 |
+
<li>"If This ___" (Huey Lewis hit): 2 wds. (4)</li>
|
| 117 |
+
<li>Mickey Rooney had eight (5)
|
| 118 |
+
<br>Elvis Presley's middle name (4)</li>
|
| 119 |
+
<li>Film based on "Supertoys Last All Summer Long" (2)</li>
|
| 120 |
+
<li>College course outline (8)
|
| 121 |
+
<br>Bring on board, as cargo (4)</li>
|
| 122 |
+
<li>Agua ___ National Monument, Arizona (4)</li>
|
| 123 |
+
<li>"Rubber Duckie" singer (5)
|
| 124 |
+
<br>Using an alternative to glue (7)</li>
|
| 125 |
+
<li>"Buffy the Vampire Slayer" spin-off (5)</li>
|
| 126 |
+
<li>Wedge that prevents slamming (8)
|
| 127 |
+
<br>Item under a Trouble bubble (3)</li>
|
| 128 |
+
<li>Prevailed (3)</li>
|
| 129 |
+
<li>Captain Hook's henchman (4)
|
| 130 |
+
<br>Treat with scorn: 2 wds. (7)</li>
|
| 131 |
+
</ol>
|
| 132 |
+
</td>
|
| 133 |
+
</table>
|
| 134 |
+
|
| 135 |
+
<p><p><br>
|
| 136 |
+
<a href="index.html">Back to the index</a>
|
| 137 |
+
<table width="100%"><tr><td>
|
| 138 |
+
<img src="images/foot1.jpg">
|
| 139 |
+
</td></tr></table>
|
| 140 |
+
|
| 141 |
+
</font>
|
| 142 |
+
</body><script type="module" src="/checkanswer.js"></script><script type="module" src="/checkanswer.js"></script>
|
| 143 |
+
</HTML>
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_3.html/a-pile-of-letters.html
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Lance Nathan">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="me typing damnit">
|
| 7 |
+
<TITLE>A Pile of Letters</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff">
|
| 10 |
+
|
| 11 |
+
<h2>First Round Puzzle: A Pile of Letters</h2>
|
| 12 |
+
<h3>by Francis Heaney (with help from Frank Longo)</h3>
|
| 13 |
+
|
| 14 |
+
<p>
|
| 15 |
+
|
| 16 |
+
The Black and White clues must be interwoven in the same grid; Black clues only interlock with Black clues, and White clues only interlock with White clues. When both sets of answers are filled in, and the Black clues are shaded in, the grid looks like this:
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<center><img src="pile-of-letters.gif"></center>
|
| 21 |
+
|
| 22 |
+
<p>
|
| 23 |
+
|
| 24 |
+
1 Across and 1 Down in both the Black and White clues contain clues as to what to do next. The Black 1 Across and 1 Down answers are PAUL PENA, a blind blues singer, and POLYPHEMUS, a blind mythological creature. The White 1 Across and 1 Down answers are RAISED and BUMPS. The next step is to divide the puzzle into 2-by-3 rectangles and translate from Braille. This gives:
|
| 25 |
+
|
| 26 |
+
<p>
|
| 27 |
+
|
| 28 |
+
OUTHHRP<br>
|
| 29 |
+
UPSLPIN<br>
|
| 30 |
+
PENROLL<br>
|
| 31 |
+
SALKLIK<br>
|
| 32 |
+
INORAMU
|
| 33 |
+
|
| 34 |
+
<p>
|
| 35 |
+
|
| 36 |
+
These are all English words with two letters removed (and in each case there is only one pair of letters which can be added to make a word). The words are:
|
| 37 |
+
|
| 38 |
+
<p>
|
| 39 |
+
|
| 40 |
+
MOUTHHARP<br>
|
| 41 |
+
UPSLOPING<br>
|
| 42 |
+
PREENROLL<br>
|
| 43 |
+
STALKLIKE<br>
|
| 44 |
+
IGNORAMUS
|
| 45 |
+
|
| 46 |
+
<p>
|
| 47 |
+
|
| 48 |
+
The letters added are:
|
| 49 |
+
|
| 50 |
+
<p>
|
| 51 |
+
|
| 52 |
+
MA<br>
|
| 53 |
+
OG<br>
|
| 54 |
+
RE<br>
|
| 55 |
+
TE<br>
|
| 56 |
+
GS
|
| 57 |
+
|
| 58 |
+
<p>
|
| 59 |
+
|
| 60 |
+
And reading down the "pile" of letters gives the answer MORTGAGEES.
|
| 61 |
+
|
| 62 |
+
<p>
|
| 63 |
+
|
| 64 |
+
There is also a bigram hidden in the puzzle, and if you look at the shaded-in grid, you will see, in white, the letters TH piled on top of each other in the middle of the grid.
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
</BODY>
|
| 68 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_1_3.html/checkanswer.js
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Do this first so that layout shift isn't too bad:
|
| 2 |
+
const container = document.createElement("div");
|
| 3 |
+
container.style = `
|
| 4 |
+
font-size: 16px;
|
| 5 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 6 |
+
height: 2.5em;
|
| 7 |
+
`;
|
| 8 |
+
document.body.prepend(container);
|
| 9 |
+
|
| 10 |
+
import { React, html, css, render } from "./package.js";
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Remove non-alphanumeric characters.
|
| 14 |
+
*/
|
| 15 |
+
const normalizeAnswer = (answer) => {
|
| 16 |
+
if (getYear() === 2003) {
|
| 17 |
+
if (document.URL.includes("teamGuest/2")) {
|
| 18 |
+
// Special case: 2003 R2, whose answers are emoji.
|
| 19 |
+
return answer.trim();
|
| 20 |
+
} else if (document.URL.includes("6_3")) {
|
| 21 |
+
// Special case: Answer is literal Greek letter.
|
| 22 |
+
return answer.trim();
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
return answer.toUpperCase().replaceAll(/[^A-Z0-9]/g, "");
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Returns the year of the hunt we're in.
|
| 30 |
+
*/
|
| 31 |
+
const getYear = () => {
|
| 32 |
+
return Number(RegExp(`^.*/([0-9]{4})/.*$`).exec(document.URL)?.[1] ?? 0);
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Fetches the answers as a list of {url, answer, prompt, intermediate}.
|
| 37 |
+
*/
|
| 38 |
+
const getData = async () => {
|
| 39 |
+
const res = await fetch("/answers.tsv");
|
| 40 |
+
const data = await res.text();
|
| 41 |
+
const [header, ...body] = data.split("\n");
|
| 42 |
+
const headers = header.trim().split("\t");
|
| 43 |
+
return body.map((row) => {
|
| 44 |
+
const res = {};
|
| 45 |
+
row.split("\t").forEach((item, i) => {
|
| 46 |
+
res[headers[i]] = item.trim();
|
| 47 |
+
});
|
| 48 |
+
return res;
|
| 49 |
+
});
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Gets the base URL; removes trailing index.html and .html, removes everything
|
| 54 |
+
* before the year, and then removes trailing slash.
|
| 55 |
+
*/
|
| 56 |
+
const getBase = (url) => {
|
| 57 |
+
const root =
|
| 58 |
+
RegExp(`^(.*/)index.html`).exec(url)?.[1] ??
|
| 59 |
+
RegExp(`^(.*).html`).exec(url)?.[1] ??
|
| 60 |
+
url;
|
| 61 |
+
const base = RegExp(`^.*/([0-9]{4}/.*)$`).exec(root)?.[1] ?? root;
|
| 62 |
+
return base.endsWith("/") ? base.slice(0, -1) : base;
|
| 63 |
+
};
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* Get all rows in the data corresponding to a given URL. Group by same prompt.
|
| 67 |
+
*/
|
| 68 |
+
const getAnswers = (data, url) => {
|
| 69 |
+
const base = getBase(url);
|
| 70 |
+
const rows = data.filter((row) => getBase(row.url) === base);
|
| 71 |
+
const prompts = [];
|
| 72 |
+
for (const row of rows) {
|
| 73 |
+
const { prompt } = row;
|
| 74 |
+
const group = prompts.find((group) => group.prompt === prompt);
|
| 75 |
+
if (group) {
|
| 76 |
+
group.rows.push(row);
|
| 77 |
+
} else {
|
| 78 |
+
prompts.push({ prompt, rows: [row] });
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
return prompts;
|
| 82 |
+
};
|
| 83 |
+
|
| 84 |
+
/**
|
| 85 |
+
* A single textbox and submit button in the rows of possible responses.
|
| 86 |
+
*/
|
| 87 |
+
const ResponseRow = ({ prompt, rows, setFeedback }) => {
|
| 88 |
+
const [response, setResponse] = React.useState("");
|
| 89 |
+
|
| 90 |
+
const form = css`
|
| 91 |
+
align-items: baseline;
|
| 92 |
+
display: flex;
|
| 93 |
+
justify-content: right;
|
| 94 |
+
margin-bottom: 0.5em;
|
| 95 |
+
|
| 96 |
+
@media (max-width: 600px) {
|
| 97 |
+
align-items: flex-start;
|
| 98 |
+
flex-direction: column;
|
| 99 |
+
}
|
| 100 |
+
`;
|
| 101 |
+
|
| 102 |
+
const input = css`
|
| 103 |
+
background: #fafafa;
|
| 104 |
+
border: 1px solid #aaa;
|
| 105 |
+
border-radius: 2px;
|
| 106 |
+
color: #121212;
|
| 107 |
+
font-family: inherit;
|
| 108 |
+
font-size: 100%;
|
| 109 |
+
line-height: 1.2;
|
| 110 |
+
margin: 0 0.5em;
|
| 111 |
+
padding: 0.25em 0.5em;
|
| 112 |
+
|
| 113 |
+
@media (max-width: 600px) {
|
| 114 |
+
margin: 0 0 0.25em;
|
| 115 |
+
}
|
| 116 |
+
`;
|
| 117 |
+
|
| 118 |
+
const onSubmit = (e) => {
|
| 119 |
+
e.preventDefault();
|
| 120 |
+
let set = false;
|
| 121 |
+
for (const row of rows) {
|
| 122 |
+
const correct = normalizeAnswer(row.answer) === normalizeAnswer(response);
|
| 123 |
+
if (correct) {
|
| 124 |
+
setFeedback(
|
| 125 |
+
row.intermediate?.trim() === "TRUE"
|
| 126 |
+
? "Correct! See the solution page for the answer."
|
| 127 |
+
: `Solved! The answer was ${row.answer}.`
|
| 128 |
+
);
|
| 129 |
+
set = true;
|
| 130 |
+
break;
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
if (!set) {
|
| 134 |
+
setFeedback("Incorrect.");
|
| 135 |
+
}
|
| 136 |
+
};
|
| 137 |
+
|
| 138 |
+
const onChange = (e) => setResponse(e.target.value);
|
| 139 |
+
|
| 140 |
+
return html`
|
| 141 |
+
<form class=${form} onSubmit=${onSubmit}>
|
| 142 |
+
<label htmlFor=${prompt + " prompt"}>
|
| 143 |
+
${prompt || "Enter your guess"}:
|
| 144 |
+
</label>
|
| 145 |
+
<input
|
| 146 |
+
class=${input}
|
| 147 |
+
id=${prompt + " prompt"}
|
| 148 |
+
onChange=${onChange}
|
| 149 |
+
required
|
| 150 |
+
type="text"
|
| 151 |
+
value=${response}
|
| 152 |
+
/>
|
| 153 |
+
<button type="submit">Submit</button>
|
| 154 |
+
</form>
|
| 155 |
+
`;
|
| 156 |
+
};
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* Check answer button, rendered at top of page.
|
| 160 |
+
*/
|
| 161 |
+
const CheckButton = ({ prompts }) => {
|
| 162 |
+
const [open, setOpen] = React.useState(false);
|
| 163 |
+
const [feedback, setFeedback] = React.useState("Call in an answer.");
|
| 164 |
+
|
| 165 |
+
const wrapper = css`
|
| 166 |
+
font-family: "PT Sans", sans-serif;
|
| 167 |
+
font-size: 16px;
|
| 168 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 169 |
+
height: 2.5em;
|
| 170 |
+
|
| 171 |
+
button {
|
| 172 |
+
background: #555;
|
| 173 |
+
border: none;
|
| 174 |
+
border-radius: 2px;
|
| 175 |
+
color: #fff;
|
| 176 |
+
cursor: pointer;
|
| 177 |
+
display: inline-block;
|
| 178 |
+
font-size: 1em;
|
| 179 |
+
font-family: "PT Sans", sans-serif;
|
| 180 |
+
font-weight: bold;
|
| 181 |
+
line-height: 1.2;
|
| 182 |
+
padding: 0.25em 1em;
|
| 183 |
+
text-align: center;
|
| 184 |
+
text-decoration: none;
|
| 185 |
+
text-transform: none;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
p {
|
| 189 |
+
margin: 0 0 1em;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
a {
|
| 193 |
+
color: inherit !important;
|
| 194 |
+
}
|
| 195 |
+
`;
|
| 196 |
+
|
| 197 |
+
const btnTop = [2015, 2016].includes(getYear())
|
| 198 |
+
? "50px"
|
| 199 |
+
: [2012].includes(getYear())
|
| 200 |
+
? "-2.5em"
|
| 201 |
+
: "0px";
|
| 202 |
+
|
| 203 |
+
const button = css`
|
| 204 |
+
box-sizing: border-box;
|
| 205 |
+
height: 2.5em;
|
| 206 |
+
left: 0;
|
| 207 |
+
position: absolute;
|
| 208 |
+
top: ${btnTop};
|
| 209 |
+
width: 100%;
|
| 210 |
+
z-index: 9999;
|
| 211 |
+
`;
|
| 212 |
+
|
| 213 |
+
const dropdownWrapper = css`
|
| 214 |
+
background: #edeff0;
|
| 215 |
+
color: #121212;
|
| 216 |
+
left: 0;
|
| 217 |
+
position: absolute;
|
| 218 |
+
right: 0;
|
| 219 |
+
top: calc(2.5em + ${btnTop});
|
| 220 |
+
z-index: 9999;
|
| 221 |
+
`;
|
| 222 |
+
|
| 223 |
+
const dropdown = css`
|
| 224 |
+
margin: 0 auto;
|
| 225 |
+
max-width: 40em;
|
| 226 |
+
padding: 1em;
|
| 227 |
+
z-index: 9999;
|
| 228 |
+
`;
|
| 229 |
+
|
| 230 |
+
const responses = css`
|
| 231 |
+
margin: 0 auto;
|
| 232 |
+
width: fit-content;
|
| 233 |
+
|
| 234 |
+
@media (max-width: 600px) {
|
| 235 |
+
width: auto;
|
| 236 |
+
}
|
| 237 |
+
`;
|
| 238 |
+
|
| 239 |
+
const onClick = () => setOpen(!open);
|
| 240 |
+
|
| 241 |
+
const body =
|
| 242 |
+
prompts.length > 0
|
| 243 |
+
? prompts.map(
|
| 244 |
+
(group) =>
|
| 245 |
+
html`<${ResponseRow} setFeedback=${setFeedback} ...${group} />`
|
| 246 |
+
)
|
| 247 |
+
: html`<p>
|
| 248 |
+
No answers found on this page. Please report this to${" "}
|
| 249 |
+
<a href="mailto:puzzle@mit.edu">puzzle@mit.edu</a>.
|
| 250 |
+
</p>`;
|
| 251 |
+
|
| 252 |
+
return html`
|
| 253 |
+
<style>
|
| 254 |
+
@import url("https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&display=swap");
|
| 255 |
+
|
| 256 |
+
${[2015, 2016].includes(getYear()) &&
|
| 257 |
+
".navbar-fixed-top { z-index: 10000 }"}
|
| 258 |
+
${[2012].includes(getYear()) &&
|
| 259 |
+
"body { top: 2.5em } #check-answer, #shortcuts { z-index: 10000 !important }"}
|
| 260 |
+
${[2006].includes(getYear()) && 'img[alt="Check Answer"] { display: none }'}
|
| 261 |
+
</style>
|
| 262 |
+
<div class=${wrapper}>
|
| 263 |
+
<button class=${button} onClick=${onClick}>
|
| 264 |
+
Check your answers spoiler-free
|
| 265 |
+
</button>
|
| 266 |
+
${open &&
|
| 267 |
+
html`
|
| 268 |
+
<div class=${dropdownWrapper}>
|
| 269 |
+
<div class=${dropdown}>
|
| 270 |
+
<p>${feedback}</p>
|
| 271 |
+
<div class=${responses}>${body}</div>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
`}
|
| 275 |
+
</div>
|
| 276 |
+
`;
|
| 277 |
+
};
|
| 278 |
+
|
| 279 |
+
const data = await getData();
|
| 280 |
+
const prompts = getAnswers(data, document.URL);
|
| 281 |
+
render(html`<${CheckButton} prompts=${prompts} />`, container);
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_index.html/1_7.html
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="ACMECorp">
|
| 6 |
+
<META NAME="Generator CONTENT="Document Archivists">
|
| 7 |
+
<TITLE>Financial Report</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff"><!--CUT--><div align=right><small><a href="../../solutions/financial-report.html">(Solution)</a></small></div><!--CUT--><font face="arial">
|
| 10 |
+
<table width="100%">
|
| 11 |
+
<tr>
|
| 12 |
+
<td>
|
| 13 |
+
<img src="images/head1.jpg">
|
| 14 |
+
</td>
|
| 15 |
+
</tr>
|
| 16 |
+
</table>
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
<h2>Document 1.7: Financial Report</h2>
|
| 20 |
+
|
| 21 |
+
<p>
|
| 22 |
+
|
| 23 |
+
<em>As you may be aware, we have suffered some financial reverses in recent
|
| 24 |
+
quarters. While this is a partial setback, I believe that we will
|
| 25 |
+
return the firm to its original state if we can learn to deal with
|
| 26 |
+
change.</em>
|
| 27 |
+
|
| 28 |
+
<p>
|
| 29 |
+
|
| 30 |
+
<img src="images/financial-report.jpg">
|
| 31 |
+
|
| 32 |
+
<p><br><p>
|
| 33 |
+
<a href="index.html">Back to the index</a>
|
| 34 |
+
|
| 35 |
+
<table width="100%">
|
| 36 |
+
<tr>
|
| 37 |
+
<td>
|
| 38 |
+
<img src="images/foot1.jpg">
|
| 39 |
+
</td>
|
| 40 |
+
</tr>
|
| 41 |
+
</table>
|
| 42 |
+
|
| 43 |
+
</body><script type="module" src="/checkanswer.js"></script><script type="module" src="/checkanswer.js"></script>
|
| 44 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_index.html/asset_index.html
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>ACMECorp: Index</title>
|
| 5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6 |
+
</head>
|
| 7 |
+
|
| 8 |
+
<body>
|
| 9 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 10 |
+
<tr>
|
| 11 |
+
<td><img src="1/images/headm.jpg"></td>
|
| 12 |
+
</tr>
|
| 13 |
+
</table>
|
| 14 |
+
<p><font size="3" face="Arial">Welcome to the AcmeCorp
|
| 15 |
+
Internal Document Archive. We have done our best to give all of you free
|
| 16 |
+
access to all materials relating to Mr. Adelphia's last activities. We hope you will find these documents helpful. Please feel free to call Human Resources
|
| 17 |
+
if you have problems viewing these documents.</font></p>
|
| 18 |
+
<p><font size="3" face="Arial">Thank you,</p>
|
| 19 |
+
<p>AIDA</font><p>
|
| 20 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 21 |
+
<tr><td><font size="3" face="arial"><ul>
|
| 22 |
+
<li><a href="1/index.html"><strong>Section 1</strong></a>: Friday, January 17</li>
|
| 23 |
+
<li><a href="2/index.html"><strong>Section 2</strong></a>: Thursday, January 16</li>
|
| 24 |
+
<li><a href="3/index.html"><strong>Section 3</strong></a>: Wednesday, January 15</li>
|
| 25 |
+
<li><a href="4/index.html"><strong>Section 4</strong></a>: Tuesday, January 14</li>
|
| 26 |
+
<li><a href="5/index.html"><strong>Section 5</strong></a>: Monday, January 13</li>
|
| 27 |
+
<li><a href="6/index.html"><strong>Section 6</strong></a>: Sunday, January 12</li>
|
| 28 |
+
<li><a href="7/index.html"><strong>Section 7</strong></a>: Saturday,
|
| 29 |
+
January 11</li>
|
| 30 |
+
<li><a href="../solutions/endgame.html"><strong>Meta-Metapuzzle and
|
| 31 |
+
Endgame</li>
|
| 32 |
+
<li><a href="../solutions/stats.txt"><strong>Solving Statistics</li>
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
</ul>
|
| 36 |
+
</font>
|
| 37 |
+
</td>
|
| 38 |
+
<td valign="top">
|
| 39 |
+
<strong><font face="helvetica"><a href="Training/index.html">Training</a></font></strong>
|
| 40 |
+
</td>
|
| 41 |
+
<td valign="top">
|
| 42 |
+
<strong><font face="helvetica"><a href="R/0_000/index.html">Facility R: Entrance</a></font></strong>
|
| 43 |
+
</td>
|
| 44 |
+
|
| 45 |
+
</tr>
|
| 46 |
+
</table></p>
|
| 47 |
+
<p><img src="1/images/foot1.jpg"></p>
|
| 48 |
+
</body><script type="module" src="/checkanswer.js"></script>
|
| 49 |
+
</html>
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_index.html/checkanswer.js
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Do this first so that layout shift isn't too bad:
|
| 2 |
+
const container = document.createElement("div");
|
| 3 |
+
container.style = `
|
| 4 |
+
font-size: 16px;
|
| 5 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 6 |
+
height: 2.5em;
|
| 7 |
+
`;
|
| 8 |
+
document.body.prepend(container);
|
| 9 |
+
|
| 10 |
+
import { React, html, css, render } from "./package.js";
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Remove non-alphanumeric characters.
|
| 14 |
+
*/
|
| 15 |
+
const normalizeAnswer = (answer) => {
|
| 16 |
+
if (getYear() === 2003) {
|
| 17 |
+
if (document.URL.includes("teamGuest/2")) {
|
| 18 |
+
// Special case: 2003 R2, whose answers are emoji.
|
| 19 |
+
return answer.trim();
|
| 20 |
+
} else if (document.URL.includes("6_3")) {
|
| 21 |
+
// Special case: Answer is literal Greek letter.
|
| 22 |
+
return answer.trim();
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
return answer.toUpperCase().replaceAll(/[^A-Z0-9]/g, "");
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Returns the year of the hunt we're in.
|
| 30 |
+
*/
|
| 31 |
+
const getYear = () => {
|
| 32 |
+
return Number(RegExp(`^.*/([0-9]{4})/.*$`).exec(document.URL)?.[1] ?? 0);
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Fetches the answers as a list of {url, answer, prompt, intermediate}.
|
| 37 |
+
*/
|
| 38 |
+
const getData = async () => {
|
| 39 |
+
const res = await fetch("/answers.tsv");
|
| 40 |
+
const data = await res.text();
|
| 41 |
+
const [header, ...body] = data.split("\n");
|
| 42 |
+
const headers = header.trim().split("\t");
|
| 43 |
+
return body.map((row) => {
|
| 44 |
+
const res = {};
|
| 45 |
+
row.split("\t").forEach((item, i) => {
|
| 46 |
+
res[headers[i]] = item.trim();
|
| 47 |
+
});
|
| 48 |
+
return res;
|
| 49 |
+
});
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Gets the base URL; removes trailing index.html and .html, removes everything
|
| 54 |
+
* before the year, and then removes trailing slash.
|
| 55 |
+
*/
|
| 56 |
+
const getBase = (url) => {
|
| 57 |
+
const root =
|
| 58 |
+
RegExp(`^(.*/)index.html`).exec(url)?.[1] ??
|
| 59 |
+
RegExp(`^(.*).html`).exec(url)?.[1] ??
|
| 60 |
+
url;
|
| 61 |
+
const base = RegExp(`^.*/([0-9]{4}/.*)$`).exec(root)?.[1] ?? root;
|
| 62 |
+
return base.endsWith("/") ? base.slice(0, -1) : base;
|
| 63 |
+
};
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* Get all rows in the data corresponding to a given URL. Group by same prompt.
|
| 67 |
+
*/
|
| 68 |
+
const getAnswers = (data, url) => {
|
| 69 |
+
const base = getBase(url);
|
| 70 |
+
const rows = data.filter((row) => getBase(row.url) === base);
|
| 71 |
+
const prompts = [];
|
| 72 |
+
for (const row of rows) {
|
| 73 |
+
const { prompt } = row;
|
| 74 |
+
const group = prompts.find((group) => group.prompt === prompt);
|
| 75 |
+
if (group) {
|
| 76 |
+
group.rows.push(row);
|
| 77 |
+
} else {
|
| 78 |
+
prompts.push({ prompt, rows: [row] });
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
return prompts;
|
| 82 |
+
};
|
| 83 |
+
|
| 84 |
+
/**
|
| 85 |
+
* A single textbox and submit button in the rows of possible responses.
|
| 86 |
+
*/
|
| 87 |
+
const ResponseRow = ({ prompt, rows, setFeedback }) => {
|
| 88 |
+
const [response, setResponse] = React.useState("");
|
| 89 |
+
|
| 90 |
+
const form = css`
|
| 91 |
+
align-items: baseline;
|
| 92 |
+
display: flex;
|
| 93 |
+
justify-content: right;
|
| 94 |
+
margin-bottom: 0.5em;
|
| 95 |
+
|
| 96 |
+
@media (max-width: 600px) {
|
| 97 |
+
align-items: flex-start;
|
| 98 |
+
flex-direction: column;
|
| 99 |
+
}
|
| 100 |
+
`;
|
| 101 |
+
|
| 102 |
+
const input = css`
|
| 103 |
+
background: #fafafa;
|
| 104 |
+
border: 1px solid #aaa;
|
| 105 |
+
border-radius: 2px;
|
| 106 |
+
color: #121212;
|
| 107 |
+
font-family: inherit;
|
| 108 |
+
font-size: 100%;
|
| 109 |
+
line-height: 1.2;
|
| 110 |
+
margin: 0 0.5em;
|
| 111 |
+
padding: 0.25em 0.5em;
|
| 112 |
+
|
| 113 |
+
@media (max-width: 600px) {
|
| 114 |
+
margin: 0 0 0.25em;
|
| 115 |
+
}
|
| 116 |
+
`;
|
| 117 |
+
|
| 118 |
+
const onSubmit = (e) => {
|
| 119 |
+
e.preventDefault();
|
| 120 |
+
let set = false;
|
| 121 |
+
for (const row of rows) {
|
| 122 |
+
const correct = normalizeAnswer(row.answer) === normalizeAnswer(response);
|
| 123 |
+
if (correct) {
|
| 124 |
+
setFeedback(
|
| 125 |
+
row.intermediate?.trim() === "TRUE"
|
| 126 |
+
? "Correct! See the solution page for the answer."
|
| 127 |
+
: `Solved! The answer was ${row.answer}.`
|
| 128 |
+
);
|
| 129 |
+
set = true;
|
| 130 |
+
break;
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
if (!set) {
|
| 134 |
+
setFeedback("Incorrect.");
|
| 135 |
+
}
|
| 136 |
+
};
|
| 137 |
+
|
| 138 |
+
const onChange = (e) => setResponse(e.target.value);
|
| 139 |
+
|
| 140 |
+
return html`
|
| 141 |
+
<form class=${form} onSubmit=${onSubmit}>
|
| 142 |
+
<label htmlFor=${prompt + " prompt"}>
|
| 143 |
+
${prompt || "Enter your guess"}:
|
| 144 |
+
</label>
|
| 145 |
+
<input
|
| 146 |
+
class=${input}
|
| 147 |
+
id=${prompt + " prompt"}
|
| 148 |
+
onChange=${onChange}
|
| 149 |
+
required
|
| 150 |
+
type="text"
|
| 151 |
+
value=${response}
|
| 152 |
+
/>
|
| 153 |
+
<button type="submit">Submit</button>
|
| 154 |
+
</form>
|
| 155 |
+
`;
|
| 156 |
+
};
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* Check answer button, rendered at top of page.
|
| 160 |
+
*/
|
| 161 |
+
const CheckButton = ({ prompts }) => {
|
| 162 |
+
const [open, setOpen] = React.useState(false);
|
| 163 |
+
const [feedback, setFeedback] = React.useState("Call in an answer.");
|
| 164 |
+
|
| 165 |
+
const wrapper = css`
|
| 166 |
+
font-family: "PT Sans", sans-serif;
|
| 167 |
+
font-size: 16px;
|
| 168 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 169 |
+
height: 2.5em;
|
| 170 |
+
|
| 171 |
+
button {
|
| 172 |
+
background: #555;
|
| 173 |
+
border: none;
|
| 174 |
+
border-radius: 2px;
|
| 175 |
+
color: #fff;
|
| 176 |
+
cursor: pointer;
|
| 177 |
+
display: inline-block;
|
| 178 |
+
font-size: 1em;
|
| 179 |
+
font-family: "PT Sans", sans-serif;
|
| 180 |
+
font-weight: bold;
|
| 181 |
+
line-height: 1.2;
|
| 182 |
+
padding: 0.25em 1em;
|
| 183 |
+
text-align: center;
|
| 184 |
+
text-decoration: none;
|
| 185 |
+
text-transform: none;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
p {
|
| 189 |
+
margin: 0 0 1em;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
a {
|
| 193 |
+
color: inherit !important;
|
| 194 |
+
}
|
| 195 |
+
`;
|
| 196 |
+
|
| 197 |
+
const btnTop = [2015, 2016].includes(getYear())
|
| 198 |
+
? "50px"
|
| 199 |
+
: [2012].includes(getYear())
|
| 200 |
+
? "-2.5em"
|
| 201 |
+
: "0px";
|
| 202 |
+
|
| 203 |
+
const button = css`
|
| 204 |
+
box-sizing: border-box;
|
| 205 |
+
height: 2.5em;
|
| 206 |
+
left: 0;
|
| 207 |
+
position: absolute;
|
| 208 |
+
top: ${btnTop};
|
| 209 |
+
width: 100%;
|
| 210 |
+
z-index: 9999;
|
| 211 |
+
`;
|
| 212 |
+
|
| 213 |
+
const dropdownWrapper = css`
|
| 214 |
+
background: #edeff0;
|
| 215 |
+
color: #121212;
|
| 216 |
+
left: 0;
|
| 217 |
+
position: absolute;
|
| 218 |
+
right: 0;
|
| 219 |
+
top: calc(2.5em + ${btnTop});
|
| 220 |
+
z-index: 9999;
|
| 221 |
+
`;
|
| 222 |
+
|
| 223 |
+
const dropdown = css`
|
| 224 |
+
margin: 0 auto;
|
| 225 |
+
max-width: 40em;
|
| 226 |
+
padding: 1em;
|
| 227 |
+
z-index: 9999;
|
| 228 |
+
`;
|
| 229 |
+
|
| 230 |
+
const responses = css`
|
| 231 |
+
margin: 0 auto;
|
| 232 |
+
width: fit-content;
|
| 233 |
+
|
| 234 |
+
@media (max-width: 600px) {
|
| 235 |
+
width: auto;
|
| 236 |
+
}
|
| 237 |
+
`;
|
| 238 |
+
|
| 239 |
+
const onClick = () => setOpen(!open);
|
| 240 |
+
|
| 241 |
+
const body =
|
| 242 |
+
prompts.length > 0
|
| 243 |
+
? prompts.map(
|
| 244 |
+
(group) =>
|
| 245 |
+
html`<${ResponseRow} setFeedback=${setFeedback} ...${group} />`
|
| 246 |
+
)
|
| 247 |
+
: html`<p>
|
| 248 |
+
No answers found on this page. Please report this to${" "}
|
| 249 |
+
<a href="mailto:puzzle@mit.edu">puzzle@mit.edu</a>.
|
| 250 |
+
</p>`;
|
| 251 |
+
|
| 252 |
+
return html`
|
| 253 |
+
<style>
|
| 254 |
+
@import url("https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&display=swap");
|
| 255 |
+
|
| 256 |
+
${[2015, 2016].includes(getYear()) &&
|
| 257 |
+
".navbar-fixed-top { z-index: 10000 }"}
|
| 258 |
+
${[2012].includes(getYear()) &&
|
| 259 |
+
"body { top: 2.5em } #check-answer, #shortcuts { z-index: 10000 !important }"}
|
| 260 |
+
${[2006].includes(getYear()) && 'img[alt="Check Answer"] { display: none }'}
|
| 261 |
+
</style>
|
| 262 |
+
<div class=${wrapper}>
|
| 263 |
+
<button class=${button} onClick=${onClick}>
|
| 264 |
+
Check your answers spoiler-free
|
| 265 |
+
</button>
|
| 266 |
+
${open &&
|
| 267 |
+
html`
|
| 268 |
+
<div class=${dropdownWrapper}>
|
| 269 |
+
<div class=${dropdown}>
|
| 270 |
+
<p>${feedback}</p>
|
| 271 |
+
<div class=${responses}>${body}</div>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
`}
|
| 275 |
+
</div>
|
| 276 |
+
`;
|
| 277 |
+
};
|
| 278 |
+
|
| 279 |
+
const data = await getData();
|
| 280 |
+
const prompts = getAnswers(data, document.URL);
|
| 281 |
+
render(html`<${CheckButton} prompts=${prompts} />`, container);
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_index.html/index.html
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>AcmeCorp: Section 1</title>
|
| 5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6 |
+
</head>
|
| 7 |
+
|
| 8 |
+
<body bgcolor=white><!--CUT--><div align=right><small><a href="../../solutions/m1.html">(Meta-puzzle solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 10 |
+
<tr>
|
| 11 |
+
<td><img src="images/head1.jpg"></td>
|
| 12 |
+
</tr>
|
| 13 |
+
</table>
|
| 14 |
+
<font face="Arial"><strong>Section 1</strong>
|
| 15 |
+
<p>
|
| 16 |
+
<em>Today (Friday) the boss came into work to do what he always does at work. Whatever that is--you realize you're not entirely positive what it is he did here. On his desk, though, there's a small stack of...how very odd. Are these puzzles?</em>
|
| 17 |
+
|
| 18 |
+
<p><ol>
|
| 19 |
+
<li><a href="1_1.html">Minor Edits</a></li>
|
| 20 |
+
<li><a href="1_2.html">First Round Puzzle</a></li>
|
| 21 |
+
<li><a href="1_3.html">A Pile of Letters</a></li>
|
| 22 |
+
<li><a href="1_4.html">Something in Common</a></li>
|
| 23 |
+
<li><a href="1_5.html">Job Performance Predictor</a></li>
|
| 24 |
+
<li><a href="1_6.html">Making Connections</a></li>
|
| 25 |
+
<li><a href="1_7.html">Financial Report</a></li>
|
| 26 |
+
</ol>
|
| 27 |
+
</p>
|
| 28 |
+
<p> </p>
|
| 29 |
+
<p> </p>
|
| 30 |
+
<p> </p>
|
| 31 |
+
<p> </p>
|
| 32 |
+
<p> </p>
|
| 33 |
+
<a href="../index.html">Back to the index</a>
|
| 34 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 35 |
+
<tr>
|
| 36 |
+
<td><img src="images/foot1.jpg"></td>
|
| 37 |
+
</tr>
|
| 38 |
+
</table>
|
| 39 |
+
</font>
|
| 40 |
+
</body><script type="module" src="/checkanswer.js"></script>
|
| 41 |
+
</html>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_1_index.html/m1.html
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Lance Nathan">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="me typing damnit">
|
| 7 |
+
<TITLE>Solution: Meta-puzzle M1</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff"><div align=right><small><a href="endgame.html">(Meta-meta puzzle solution)</a></small></div>
|
| 10 |
+
|
| 11 |
+
<h1>Meta-puzzle for Round 1 (M1)</h1>
|
| 12 |
+
<h3>by Marc Moskowitz</h3>
|
| 13 |
+
|
| 14 |
+
<i>Today (Friday) the boss came into work to do what he always does at work. Whatever that is--you realize you're not entirely positive what it is he did here. On his desk, though, there's a small stack of...how very odd. Are these puzzles?</i>
|
| 15 |
+
|
| 16 |
+
<p><hr width="50%"><p>
|
| 17 |
+
|
| 18 |
+
This round has seven puzzles. Each puzzle leads to an answer, and those seven answers combine to give the Round 1 Metapuzzle answer (and get teams Round 2).
|
| 19 |
+
|
| 20 |
+
<p>
|
| 21 |
+
|
| 22 |
+
Additionally, each puzzle clues, somehow, a bigram. These spell out TA KE TH ER ED PI LL.
|
| 23 |
+
|
| 24 |
+
Calling in this message resulted in the Acme operator saying "THAT
|
| 25 |
+
ANSWER IS INCORRECT! [whispering] I must be brief -- this line is
|
| 26 |
+
tapped. Someone will be in contact with you shortly." Teams were
|
| 27 |
+
then sent on <a href="aha/aha.html">a runaround in which
|
| 28 |
+
they met Morpheus</a> and were informed that they were really in the
|
| 29 |
+
Matrix.
|
| 30 |
+
|
| 31 |
+
<p><hr width="50%"><p>
|
| 32 |
+
|
| 33 |
+
The puzzle answers for this round are:
|
| 34 |
+
|
| 35 |
+
<ol>
|
| 36 |
+
<li>CHALET</li>
|
| 37 |
+
<li>LABORATORY</li>
|
| 38 |
+
<li>MORTGAGEES</li>
|
| 39 |
+
<li>EXTRAORDINARY</li>
|
| 40 |
+
<li>SALMON</li>
|
| 41 |
+
<li>DEBTOR</li>
|
| 42 |
+
<li>ARKANSAS</li>
|
| 43 |
+
</ol>
|
| 44 |
+
|
| 45 |
+
Each word has a single silent letter. The answer is TOTAL B.S.
|
| 46 |
+
|
| 47 |
+
</BODY>
|
| 48 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_1.html/2_1.html
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Document Archivists">
|
| 6 |
+
<TITLE>Company Picnic</TITLE>
|
| 7 |
+
</HEAD>
|
| 8 |
+
<BODY BGCOLOR="#ffffff"><!--CUT--><div align=right><small><a href="../../solutions/company-picnic.html">(Solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
<table width="100%">
|
| 10 |
+
<tr>
|
| 11 |
+
<td><img src="images/head2.jpg"></td>
|
| 12 |
+
</tr>
|
| 13 |
+
</table>
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
<h2>Document 2.1: Company Picnic</h2>
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<em>According to the company's employee handbook, ACMECorp
|
| 21 |
+
holds a big-ass barbecue every year for its company picnic. But
|
| 22 |
+
apparently plans have changed, since one of the pages paperclipped to
|
| 23 |
+
the scrapbook is a photo of your boss standing on the set of the TV
|
| 24 |
+
show "Iron Chef." You cannot determine what he has in his hand but
|
| 25 |
+
you are sure it is the secret ingredient.</em>
|
| 26 |
+
|
| 27 |
+
<p>
|
| 28 |
+
|
| 29 |
+
Come down to Human Resources to pick your secret ingredient by random
|
| 30 |
+
draw. From the time when you draw your secret ingredient, you will
|
| 31 |
+
have <strong>four hours</strong> to prepare four servings each of an
|
| 32 |
+
appetizer, an entree, and a dessert, all of which must prominently
|
| 33 |
+
feature the secret ingredient. "Prominently feature" means that if
|
| 34 |
+
someone were to taste the dish and give it a descriptive name, that
|
| 35 |
+
name would necessarily include the secret ingredient. For example, if
|
| 36 |
+
your secret ingredient is salt (don't worry, it won't be), you could
|
| 37 |
+
not have ordinary oatmeal cookies as your dessert and call them
|
| 38 |
+
"salted oatmeal cookies" (unless they really had a lot of salt on
|
| 39 |
+
them; yuck).
|
| 40 |
+
|
| 41 |
+
<p>
|
| 42 |
+
|
| 43 |
+
You must put your food on the table at Human Resources before the time
|
| 44 |
+
limit is up. Because we do not want two teams coming in at the same
|
| 45 |
+
time, we <strong>require</strong> you to make an appointment for
|
| 46 |
+
adjudication <strong>thirty minutes ahead of time</strong>. If you
|
| 47 |
+
are late for your appointment we cannot promise you another one within
|
| 48 |
+
your time limit. If you go over the time limit, you will draw another
|
| 49 |
+
ingredient and do the whole thing again.
|
| 50 |
+
|
| 51 |
+
<p>
|
| 52 |
+
|
| 53 |
+
We suggest you put the dishes on disposable paper or plastic plates,
|
| 54 |
+
so as to minimize the confusion over returning items to you. Please
|
| 55 |
+
also bring disposable silverware or chopsticks if needed. We regret
|
| 56 |
+
that the food itself cannot be returned.
|
| 57 |
+
|
| 58 |
+
<p>
|
| 59 |
+
|
| 60 |
+
HR will taste the dishes you have prepared, and make the final
|
| 61 |
+
call as to whether the dishes meet the requirements. In addition, the
|
| 62 |
+
team[s] that we judge to have made the best meal[s] will get a prize.
|
| 63 |
+
|
| 64 |
+
<p><br><p>
|
| 65 |
+
|
| 66 |
+
<a href="index.html">Back to the index</a>
|
| 67 |
+
<table width="100%">
|
| 68 |
+
<tr>
|
| 69 |
+
<td><img src="images/foot2.jpg"></td>
|
| 70 |
+
</tr>
|
| 71 |
+
</table>
|
| 72 |
+
|
| 73 |
+
</font>
|
| 74 |
+
</body>
|
| 75 |
+
<script type="module" src="/checkanswer.js"></script>
|
| 76 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_1.html/checkanswer.js
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Do this first so that layout shift isn't too bad:
|
| 2 |
+
const container = document.createElement("div");
|
| 3 |
+
container.style = `
|
| 4 |
+
font-size: 16px;
|
| 5 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 6 |
+
height: 2.5em;
|
| 7 |
+
`;
|
| 8 |
+
document.body.prepend(container);
|
| 9 |
+
|
| 10 |
+
import { React, html, css, render } from "./package.js";
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Remove non-alphanumeric characters.
|
| 14 |
+
*/
|
| 15 |
+
const normalizeAnswer = (answer) => {
|
| 16 |
+
if (getYear() === 2003) {
|
| 17 |
+
if (document.URL.includes("teamGuest/2")) {
|
| 18 |
+
// Special case: 2003 R2, whose answers are emoji.
|
| 19 |
+
return answer.trim();
|
| 20 |
+
} else if (document.URL.includes("6_3")) {
|
| 21 |
+
// Special case: Answer is literal Greek letter.
|
| 22 |
+
return answer.trim();
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
return answer.toUpperCase().replaceAll(/[^A-Z0-9]/g, "");
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Returns the year of the hunt we're in.
|
| 30 |
+
*/
|
| 31 |
+
const getYear = () => {
|
| 32 |
+
return Number(RegExp(`^.*/([0-9]{4})/.*$`).exec(document.URL)?.[1] ?? 0);
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Fetches the answers as a list of {url, answer, prompt, intermediate}.
|
| 37 |
+
*/
|
| 38 |
+
const getData = async () => {
|
| 39 |
+
const res = await fetch("/answers.tsv");
|
| 40 |
+
const data = await res.text();
|
| 41 |
+
const [header, ...body] = data.split("\n");
|
| 42 |
+
const headers = header.trim().split("\t");
|
| 43 |
+
return body.map((row) => {
|
| 44 |
+
const res = {};
|
| 45 |
+
row.split("\t").forEach((item, i) => {
|
| 46 |
+
res[headers[i]] = item.trim();
|
| 47 |
+
});
|
| 48 |
+
return res;
|
| 49 |
+
});
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Gets the base URL; removes trailing index.html and .html, removes everything
|
| 54 |
+
* before the year, and then removes trailing slash.
|
| 55 |
+
*/
|
| 56 |
+
const getBase = (url) => {
|
| 57 |
+
const root =
|
| 58 |
+
RegExp(`^(.*/)index.html`).exec(url)?.[1] ??
|
| 59 |
+
RegExp(`^(.*).html`).exec(url)?.[1] ??
|
| 60 |
+
url;
|
| 61 |
+
const base = RegExp(`^.*/([0-9]{4}/.*)$`).exec(root)?.[1] ?? root;
|
| 62 |
+
return base.endsWith("/") ? base.slice(0, -1) : base;
|
| 63 |
+
};
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* Get all rows in the data corresponding to a given URL. Group by same prompt.
|
| 67 |
+
*/
|
| 68 |
+
const getAnswers = (data, url) => {
|
| 69 |
+
const base = getBase(url);
|
| 70 |
+
const rows = data.filter((row) => getBase(row.url) === base);
|
| 71 |
+
const prompts = [];
|
| 72 |
+
for (const row of rows) {
|
| 73 |
+
const { prompt } = row;
|
| 74 |
+
const group = prompts.find((group) => group.prompt === prompt);
|
| 75 |
+
if (group) {
|
| 76 |
+
group.rows.push(row);
|
| 77 |
+
} else {
|
| 78 |
+
prompts.push({ prompt, rows: [row] });
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
return prompts;
|
| 82 |
+
};
|
| 83 |
+
|
| 84 |
+
/**
|
| 85 |
+
* A single textbox and submit button in the rows of possible responses.
|
| 86 |
+
*/
|
| 87 |
+
const ResponseRow = ({ prompt, rows, setFeedback }) => {
|
| 88 |
+
const [response, setResponse] = React.useState("");
|
| 89 |
+
|
| 90 |
+
const form = css`
|
| 91 |
+
align-items: baseline;
|
| 92 |
+
display: flex;
|
| 93 |
+
justify-content: right;
|
| 94 |
+
margin-bottom: 0.5em;
|
| 95 |
+
|
| 96 |
+
@media (max-width: 600px) {
|
| 97 |
+
align-items: flex-start;
|
| 98 |
+
flex-direction: column;
|
| 99 |
+
}
|
| 100 |
+
`;
|
| 101 |
+
|
| 102 |
+
const input = css`
|
| 103 |
+
background: #fafafa;
|
| 104 |
+
border: 1px solid #aaa;
|
| 105 |
+
border-radius: 2px;
|
| 106 |
+
color: #121212;
|
| 107 |
+
font-family: inherit;
|
| 108 |
+
font-size: 100%;
|
| 109 |
+
line-height: 1.2;
|
| 110 |
+
margin: 0 0.5em;
|
| 111 |
+
padding: 0.25em 0.5em;
|
| 112 |
+
|
| 113 |
+
@media (max-width: 600px) {
|
| 114 |
+
margin: 0 0 0.25em;
|
| 115 |
+
}
|
| 116 |
+
`;
|
| 117 |
+
|
| 118 |
+
const onSubmit = (e) => {
|
| 119 |
+
e.preventDefault();
|
| 120 |
+
let set = false;
|
| 121 |
+
for (const row of rows) {
|
| 122 |
+
const correct = normalizeAnswer(row.answer) === normalizeAnswer(response);
|
| 123 |
+
if (correct) {
|
| 124 |
+
setFeedback(
|
| 125 |
+
row.intermediate?.trim() === "TRUE"
|
| 126 |
+
? "Correct! See the solution page for the answer."
|
| 127 |
+
: `Solved! The answer was ${row.answer}.`
|
| 128 |
+
);
|
| 129 |
+
set = true;
|
| 130 |
+
break;
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
if (!set) {
|
| 134 |
+
setFeedback("Incorrect.");
|
| 135 |
+
}
|
| 136 |
+
};
|
| 137 |
+
|
| 138 |
+
const onChange = (e) => setResponse(e.target.value);
|
| 139 |
+
|
| 140 |
+
return html`
|
| 141 |
+
<form class=${form} onSubmit=${onSubmit}>
|
| 142 |
+
<label htmlFor=${prompt + " prompt"}>
|
| 143 |
+
${prompt || "Enter your guess"}:
|
| 144 |
+
</label>
|
| 145 |
+
<input
|
| 146 |
+
class=${input}
|
| 147 |
+
id=${prompt + " prompt"}
|
| 148 |
+
onChange=${onChange}
|
| 149 |
+
required
|
| 150 |
+
type="text"
|
| 151 |
+
value=${response}
|
| 152 |
+
/>
|
| 153 |
+
<button type="submit">Submit</button>
|
| 154 |
+
</form>
|
| 155 |
+
`;
|
| 156 |
+
};
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* Check answer button, rendered at top of page.
|
| 160 |
+
*/
|
| 161 |
+
const CheckButton = ({ prompts }) => {
|
| 162 |
+
const [open, setOpen] = React.useState(false);
|
| 163 |
+
const [feedback, setFeedback] = React.useState("Call in an answer.");
|
| 164 |
+
|
| 165 |
+
const wrapper = css`
|
| 166 |
+
font-family: "PT Sans", sans-serif;
|
| 167 |
+
font-size: 16px;
|
| 168 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 169 |
+
height: 2.5em;
|
| 170 |
+
|
| 171 |
+
button {
|
| 172 |
+
background: #555;
|
| 173 |
+
border: none;
|
| 174 |
+
border-radius: 2px;
|
| 175 |
+
color: #fff;
|
| 176 |
+
cursor: pointer;
|
| 177 |
+
display: inline-block;
|
| 178 |
+
font-size: 1em;
|
| 179 |
+
font-family: "PT Sans", sans-serif;
|
| 180 |
+
font-weight: bold;
|
| 181 |
+
line-height: 1.2;
|
| 182 |
+
padding: 0.25em 1em;
|
| 183 |
+
text-align: center;
|
| 184 |
+
text-decoration: none;
|
| 185 |
+
text-transform: none;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
p {
|
| 189 |
+
margin: 0 0 1em;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
a {
|
| 193 |
+
color: inherit !important;
|
| 194 |
+
}
|
| 195 |
+
`;
|
| 196 |
+
|
| 197 |
+
const btnTop = [2015, 2016].includes(getYear())
|
| 198 |
+
? "50px"
|
| 199 |
+
: [2012].includes(getYear())
|
| 200 |
+
? "-2.5em"
|
| 201 |
+
: "0px";
|
| 202 |
+
|
| 203 |
+
const button = css`
|
| 204 |
+
box-sizing: border-box;
|
| 205 |
+
height: 2.5em;
|
| 206 |
+
left: 0;
|
| 207 |
+
position: absolute;
|
| 208 |
+
top: ${btnTop};
|
| 209 |
+
width: 100%;
|
| 210 |
+
z-index: 9999;
|
| 211 |
+
`;
|
| 212 |
+
|
| 213 |
+
const dropdownWrapper = css`
|
| 214 |
+
background: #edeff0;
|
| 215 |
+
color: #121212;
|
| 216 |
+
left: 0;
|
| 217 |
+
position: absolute;
|
| 218 |
+
right: 0;
|
| 219 |
+
top: calc(2.5em + ${btnTop});
|
| 220 |
+
z-index: 9999;
|
| 221 |
+
`;
|
| 222 |
+
|
| 223 |
+
const dropdown = css`
|
| 224 |
+
margin: 0 auto;
|
| 225 |
+
max-width: 40em;
|
| 226 |
+
padding: 1em;
|
| 227 |
+
z-index: 9999;
|
| 228 |
+
`;
|
| 229 |
+
|
| 230 |
+
const responses = css`
|
| 231 |
+
margin: 0 auto;
|
| 232 |
+
width: fit-content;
|
| 233 |
+
|
| 234 |
+
@media (max-width: 600px) {
|
| 235 |
+
width: auto;
|
| 236 |
+
}
|
| 237 |
+
`;
|
| 238 |
+
|
| 239 |
+
const onClick = () => setOpen(!open);
|
| 240 |
+
|
| 241 |
+
const body =
|
| 242 |
+
prompts.length > 0
|
| 243 |
+
? prompts.map(
|
| 244 |
+
(group) =>
|
| 245 |
+
html`<${ResponseRow} setFeedback=${setFeedback} ...${group} />`
|
| 246 |
+
)
|
| 247 |
+
: html`<p>
|
| 248 |
+
No answers found on this page. Please report this to${" "}
|
| 249 |
+
<a href="mailto:puzzle@mit.edu">puzzle@mit.edu</a>.
|
| 250 |
+
</p>`;
|
| 251 |
+
|
| 252 |
+
return html`
|
| 253 |
+
<style>
|
| 254 |
+
@import url("https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&display=swap");
|
| 255 |
+
|
| 256 |
+
${[2015, 2016].includes(getYear()) &&
|
| 257 |
+
".navbar-fixed-top { z-index: 10000 }"}
|
| 258 |
+
${[2012].includes(getYear()) &&
|
| 259 |
+
"body { top: 2.5em } #check-answer, #shortcuts { z-index: 10000 !important }"}
|
| 260 |
+
${[2006].includes(getYear()) && 'img[alt="Check Answer"] { display: none }'}
|
| 261 |
+
</style>
|
| 262 |
+
<div class=${wrapper}>
|
| 263 |
+
<button class=${button} onClick=${onClick}>
|
| 264 |
+
Check your answers spoiler-free
|
| 265 |
+
</button>
|
| 266 |
+
${open &&
|
| 267 |
+
html`
|
| 268 |
+
<div class=${dropdownWrapper}>
|
| 269 |
+
<div class=${dropdown}>
|
| 270 |
+
<p>${feedback}</p>
|
| 271 |
+
<div class=${responses}>${body}</div>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
`}
|
| 275 |
+
</div>
|
| 276 |
+
`;
|
| 277 |
+
};
|
| 278 |
+
|
| 279 |
+
const data = await getData();
|
| 280 |
+
const prompts = getAnswers(data, document.URL);
|
| 281 |
+
render(html`<${CheckButton} prompts=${prompts} />`, container);
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_1.html/company-picnic.html
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Lance Nathan">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="me typing damnit">
|
| 7 |
+
<TITLE>Company Picnic</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff">
|
| 10 |
+
|
| 11 |
+
<h2>M Puzzle: Company Picnic</h2>
|
| 12 |
+
<h3>by Bridget Copley</h3>
|
| 13 |
+
|
| 14 |
+
<p>
|
| 15 |
+
<a href="../photos/IronChef/index.html">Some photos of teams' Iron Chef submissions</a>
|
| 16 |
+
|
| 17 |
+
<p>
|
| 18 |
+
|
| 19 |
+
Teams reach into a hat and draw out a slip of paper with one of the
|
| 20 |
+
following ingredients.
|
| 21 |
+
|
| 22 |
+
<p>
|
| 23 |
+
|
| 24 |
+
cheese<br>
|
| 25 |
+
eggs<br>
|
| 26 |
+
rice<br>
|
| 27 |
+
apple<br>
|
| 28 |
+
carrot<br>
|
| 29 |
+
chocolate<br>
|
| 30 |
+
coconut<br>
|
| 31 |
+
ginger<br>
|
| 32 |
+
lemon<br>
|
| 33 |
+
lime<br>
|
| 34 |
+
orange<br>
|
| 35 |
+
coffee<br>
|
| 36 |
+
milk<br>
|
| 37 |
+
yogurt<br>
|
| 38 |
+
mango<br>
|
| 39 |
+
raisins<br>
|
| 40 |
+
bananas<br>
|
| 41 |
+
bread<br>
|
| 42 |
+
|
| 43 |
+
<p>
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
<p>
|
| 47 |
+
|
| 48 |
+
When a team succeeds, they are awarded "dessert" by the Iron Chef: a slice of chocolate orange. This is the answer.
|
| 49 |
+
|
| 50 |
+
<p align=center><img src="../images/chocolate.orange.jpg"></p>
|
| 51 |
+
|
| 52 |
+
</BODY>
|
| 53 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_1.html/index.html
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>ACMECorp: Section 2</title>
|
| 5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6 |
+
</head>
|
| 7 |
+
|
| 8 |
+
<body bgcolor=white><!--CUT--><div align=right><small><a href="../../solutions/m2.html">(Meta-puzzle solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 10 |
+
<tr>
|
| 11 |
+
<td><img src="images/head2.jpg"></td>
|
| 12 |
+
</tr>
|
| 13 |
+
</table>
|
| 14 |
+
<p><strong><font face="Arial">Section 2</font></strong></p>
|
| 15 |
+
|
| 16 |
+
<i>Yesterday the boss went to the theatre. You ask around, and eventually the guy in the cloakroom nods and says, "Hey, yeah, I remember him. Big tipper. Forgot to pick this book up when he left--sort of a scrapbook." You open it; mostly it's meaningless old photos of vacations and such, but there's one page with the following on it:
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<table border="1" align="center" cellspacing="0" cellpadding="10">
|
| 21 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 22 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 23 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 24 |
+
</table>
|
| 25 |
+
|
| 26 |
+
<p>
|
| 27 |
+
|
| 28 |
+
Some puzzles have been paper-clipped to this page.</i>
|
| 29 |
+
|
| 30 |
+
<p><ol>
|
| 31 |
+
<li><a href="2_1.html">Company Picnic</a></li>
|
| 32 |
+
<li><a href="2_2.html">Shredded What?</a></li>
|
| 33 |
+
<li><a href="2_3.html">Abducted!</a></li>
|
| 34 |
+
<li><a href="2_4.html">That Mixer</a></li>
|
| 35 |
+
<li><a href="2_5.html">The Road Signs of Unspeakable Chaos</a></li>
|
| 36 |
+
<li><a href="2_6.html">Stairway to Heaven</a></li>
|
| 37 |
+
<li><a href="2_7.html">A Problem With Printing</a></li>
|
| 38 |
+
<li><a href="2_8.html">What's Green, Hangs on the Wall, and Whistles?</a></li>
|
| 39 |
+
</ol>
|
| 40 |
+
</p>
|
| 41 |
+
<p> </p>
|
| 42 |
+
<p> </p>
|
| 43 |
+
<p> </p>
|
| 44 |
+
<p> </p>
|
| 45 |
+
<p> </p>
|
| 46 |
+
<a href="../index.html">Back to the index</a>
|
| 47 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 48 |
+
<tr>
|
| 49 |
+
<td><img src="images/foot2.jpg"></td>
|
| 50 |
+
</tr>
|
| 51 |
+
</table>
|
| 52 |
+
</font>
|
| 53 |
+
</body><script type="module" src="/checkanswer.js"></script>
|
| 54 |
+
</html>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_2.html/2_2.html
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Document Archivists">
|
| 6 |
+
<TITLE>Shredded What?</TITLE>
|
| 7 |
+
</HEAD>
|
| 8 |
+
<BODY BGCOLOR="#ffffff"><!--CUT--><div align=right><small><a href="../../solutions/shredded-what.html">(Solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
|
| 10 |
+
<table width="100%">
|
| 11 |
+
<tr>
|
| 12 |
+
<td><img src="images/head2.jpg"></td>
|
| 13 |
+
</tr>
|
| 14 |
+
</table>
|
| 15 |
+
|
| 16 |
+
<h2>Document 2.2: Shredded What?</h2>
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<i>Oh dear. Based on the plastic bag that's attached to the photo album, your boss's business practices might not have been completely on the level.</i>
|
| 21 |
+
|
| 22 |
+
<p>
|
| 23 |
+
|
| 24 |
+
Come down to headquarters to receive the bag. Call first. Be sure to ignore any red herrings.
|
| 25 |
+
|
| 26 |
+
<p><br><p>
|
| 27 |
+
|
| 28 |
+
<a href="index.html">Back to the index</a>
|
| 29 |
+
|
| 30 |
+
<table width="100%">
|
| 31 |
+
<tr>
|
| 32 |
+
<td><img src="images/foot2.jpg"></td>
|
| 33 |
+
</tr>
|
| 34 |
+
</table>
|
| 35 |
+
|
| 36 |
+
</body>
|
| 37 |
+
<script type="module" src="/checkanswer.js"></script>
|
| 38 |
+
</HTML>
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_2.html/checkanswer.js
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Do this first so that layout shift isn't too bad:
|
| 2 |
+
const container = document.createElement("div");
|
| 3 |
+
container.style = `
|
| 4 |
+
font-size: 16px;
|
| 5 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 6 |
+
height: 2.5em;
|
| 7 |
+
`;
|
| 8 |
+
document.body.prepend(container);
|
| 9 |
+
|
| 10 |
+
import { React, html, css, render } from "./package.js";
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Remove non-alphanumeric characters.
|
| 14 |
+
*/
|
| 15 |
+
const normalizeAnswer = (answer) => {
|
| 16 |
+
if (getYear() === 2003) {
|
| 17 |
+
if (document.URL.includes("teamGuest/2")) {
|
| 18 |
+
// Special case: 2003 R2, whose answers are emoji.
|
| 19 |
+
return answer.trim();
|
| 20 |
+
} else if (document.URL.includes("6_3")) {
|
| 21 |
+
// Special case: Answer is literal Greek letter.
|
| 22 |
+
return answer.trim();
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
return answer.toUpperCase().replaceAll(/[^A-Z0-9]/g, "");
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Returns the year of the hunt we're in.
|
| 30 |
+
*/
|
| 31 |
+
const getYear = () => {
|
| 32 |
+
return Number(RegExp(`^.*/([0-9]{4})/.*$`).exec(document.URL)?.[1] ?? 0);
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Fetches the answers as a list of {url, answer, prompt, intermediate}.
|
| 37 |
+
*/
|
| 38 |
+
const getData = async () => {
|
| 39 |
+
const res = await fetch("/answers.tsv");
|
| 40 |
+
const data = await res.text();
|
| 41 |
+
const [header, ...body] = data.split("\n");
|
| 42 |
+
const headers = header.trim().split("\t");
|
| 43 |
+
return body.map((row) => {
|
| 44 |
+
const res = {};
|
| 45 |
+
row.split("\t").forEach((item, i) => {
|
| 46 |
+
res[headers[i]] = item.trim();
|
| 47 |
+
});
|
| 48 |
+
return res;
|
| 49 |
+
});
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Gets the base URL; removes trailing index.html and .html, removes everything
|
| 54 |
+
* before the year, and then removes trailing slash.
|
| 55 |
+
*/
|
| 56 |
+
const getBase = (url) => {
|
| 57 |
+
const root =
|
| 58 |
+
RegExp(`^(.*/)index.html`).exec(url)?.[1] ??
|
| 59 |
+
RegExp(`^(.*).html`).exec(url)?.[1] ??
|
| 60 |
+
url;
|
| 61 |
+
const base = RegExp(`^.*/([0-9]{4}/.*)$`).exec(root)?.[1] ?? root;
|
| 62 |
+
return base.endsWith("/") ? base.slice(0, -1) : base;
|
| 63 |
+
};
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* Get all rows in the data corresponding to a given URL. Group by same prompt.
|
| 67 |
+
*/
|
| 68 |
+
const getAnswers = (data, url) => {
|
| 69 |
+
const base = getBase(url);
|
| 70 |
+
const rows = data.filter((row) => getBase(row.url) === base);
|
| 71 |
+
const prompts = [];
|
| 72 |
+
for (const row of rows) {
|
| 73 |
+
const { prompt } = row;
|
| 74 |
+
const group = prompts.find((group) => group.prompt === prompt);
|
| 75 |
+
if (group) {
|
| 76 |
+
group.rows.push(row);
|
| 77 |
+
} else {
|
| 78 |
+
prompts.push({ prompt, rows: [row] });
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
return prompts;
|
| 82 |
+
};
|
| 83 |
+
|
| 84 |
+
/**
|
| 85 |
+
* A single textbox and submit button in the rows of possible responses.
|
| 86 |
+
*/
|
| 87 |
+
const ResponseRow = ({ prompt, rows, setFeedback }) => {
|
| 88 |
+
const [response, setResponse] = React.useState("");
|
| 89 |
+
|
| 90 |
+
const form = css`
|
| 91 |
+
align-items: baseline;
|
| 92 |
+
display: flex;
|
| 93 |
+
justify-content: right;
|
| 94 |
+
margin-bottom: 0.5em;
|
| 95 |
+
|
| 96 |
+
@media (max-width: 600px) {
|
| 97 |
+
align-items: flex-start;
|
| 98 |
+
flex-direction: column;
|
| 99 |
+
}
|
| 100 |
+
`;
|
| 101 |
+
|
| 102 |
+
const input = css`
|
| 103 |
+
background: #fafafa;
|
| 104 |
+
border: 1px solid #aaa;
|
| 105 |
+
border-radius: 2px;
|
| 106 |
+
color: #121212;
|
| 107 |
+
font-family: inherit;
|
| 108 |
+
font-size: 100%;
|
| 109 |
+
line-height: 1.2;
|
| 110 |
+
margin: 0 0.5em;
|
| 111 |
+
padding: 0.25em 0.5em;
|
| 112 |
+
|
| 113 |
+
@media (max-width: 600px) {
|
| 114 |
+
margin: 0 0 0.25em;
|
| 115 |
+
}
|
| 116 |
+
`;
|
| 117 |
+
|
| 118 |
+
const onSubmit = (e) => {
|
| 119 |
+
e.preventDefault();
|
| 120 |
+
let set = false;
|
| 121 |
+
for (const row of rows) {
|
| 122 |
+
const correct = normalizeAnswer(row.answer) === normalizeAnswer(response);
|
| 123 |
+
if (correct) {
|
| 124 |
+
setFeedback(
|
| 125 |
+
row.intermediate?.trim() === "TRUE"
|
| 126 |
+
? "Correct! See the solution page for the answer."
|
| 127 |
+
: `Solved! The answer was ${row.answer}.`
|
| 128 |
+
);
|
| 129 |
+
set = true;
|
| 130 |
+
break;
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
if (!set) {
|
| 134 |
+
setFeedback("Incorrect.");
|
| 135 |
+
}
|
| 136 |
+
};
|
| 137 |
+
|
| 138 |
+
const onChange = (e) => setResponse(e.target.value);
|
| 139 |
+
|
| 140 |
+
return html`
|
| 141 |
+
<form class=${form} onSubmit=${onSubmit}>
|
| 142 |
+
<label htmlFor=${prompt + " prompt"}>
|
| 143 |
+
${prompt || "Enter your guess"}:
|
| 144 |
+
</label>
|
| 145 |
+
<input
|
| 146 |
+
class=${input}
|
| 147 |
+
id=${prompt + " prompt"}
|
| 148 |
+
onChange=${onChange}
|
| 149 |
+
required
|
| 150 |
+
type="text"
|
| 151 |
+
value=${response}
|
| 152 |
+
/>
|
| 153 |
+
<button type="submit">Submit</button>
|
| 154 |
+
</form>
|
| 155 |
+
`;
|
| 156 |
+
};
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* Check answer button, rendered at top of page.
|
| 160 |
+
*/
|
| 161 |
+
const CheckButton = ({ prompts }) => {
|
| 162 |
+
const [open, setOpen] = React.useState(false);
|
| 163 |
+
const [feedback, setFeedback] = React.useState("Call in an answer.");
|
| 164 |
+
|
| 165 |
+
const wrapper = css`
|
| 166 |
+
font-family: "PT Sans", sans-serif;
|
| 167 |
+
font-size: 16px;
|
| 168 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 169 |
+
height: 2.5em;
|
| 170 |
+
|
| 171 |
+
button {
|
| 172 |
+
background: #555;
|
| 173 |
+
border: none;
|
| 174 |
+
border-radius: 2px;
|
| 175 |
+
color: #fff;
|
| 176 |
+
cursor: pointer;
|
| 177 |
+
display: inline-block;
|
| 178 |
+
font-size: 1em;
|
| 179 |
+
font-family: "PT Sans", sans-serif;
|
| 180 |
+
font-weight: bold;
|
| 181 |
+
line-height: 1.2;
|
| 182 |
+
padding: 0.25em 1em;
|
| 183 |
+
text-align: center;
|
| 184 |
+
text-decoration: none;
|
| 185 |
+
text-transform: none;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
p {
|
| 189 |
+
margin: 0 0 1em;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
a {
|
| 193 |
+
color: inherit !important;
|
| 194 |
+
}
|
| 195 |
+
`;
|
| 196 |
+
|
| 197 |
+
const btnTop = [2015, 2016].includes(getYear())
|
| 198 |
+
? "50px"
|
| 199 |
+
: [2012].includes(getYear())
|
| 200 |
+
? "-2.5em"
|
| 201 |
+
: "0px";
|
| 202 |
+
|
| 203 |
+
const button = css`
|
| 204 |
+
box-sizing: border-box;
|
| 205 |
+
height: 2.5em;
|
| 206 |
+
left: 0;
|
| 207 |
+
position: absolute;
|
| 208 |
+
top: ${btnTop};
|
| 209 |
+
width: 100%;
|
| 210 |
+
z-index: 9999;
|
| 211 |
+
`;
|
| 212 |
+
|
| 213 |
+
const dropdownWrapper = css`
|
| 214 |
+
background: #edeff0;
|
| 215 |
+
color: #121212;
|
| 216 |
+
left: 0;
|
| 217 |
+
position: absolute;
|
| 218 |
+
right: 0;
|
| 219 |
+
top: calc(2.5em + ${btnTop});
|
| 220 |
+
z-index: 9999;
|
| 221 |
+
`;
|
| 222 |
+
|
| 223 |
+
const dropdown = css`
|
| 224 |
+
margin: 0 auto;
|
| 225 |
+
max-width: 40em;
|
| 226 |
+
padding: 1em;
|
| 227 |
+
z-index: 9999;
|
| 228 |
+
`;
|
| 229 |
+
|
| 230 |
+
const responses = css`
|
| 231 |
+
margin: 0 auto;
|
| 232 |
+
width: fit-content;
|
| 233 |
+
|
| 234 |
+
@media (max-width: 600px) {
|
| 235 |
+
width: auto;
|
| 236 |
+
}
|
| 237 |
+
`;
|
| 238 |
+
|
| 239 |
+
const onClick = () => setOpen(!open);
|
| 240 |
+
|
| 241 |
+
const body =
|
| 242 |
+
prompts.length > 0
|
| 243 |
+
? prompts.map(
|
| 244 |
+
(group) =>
|
| 245 |
+
html`<${ResponseRow} setFeedback=${setFeedback} ...${group} />`
|
| 246 |
+
)
|
| 247 |
+
: html`<p>
|
| 248 |
+
No answers found on this page. Please report this to${" "}
|
| 249 |
+
<a href="mailto:puzzle@mit.edu">puzzle@mit.edu</a>.
|
| 250 |
+
</p>`;
|
| 251 |
+
|
| 252 |
+
return html`
|
| 253 |
+
<style>
|
| 254 |
+
@import url("https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&display=swap");
|
| 255 |
+
|
| 256 |
+
${[2015, 2016].includes(getYear()) &&
|
| 257 |
+
".navbar-fixed-top { z-index: 10000 }"}
|
| 258 |
+
${[2012].includes(getYear()) &&
|
| 259 |
+
"body { top: 2.5em } #check-answer, #shortcuts { z-index: 10000 !important }"}
|
| 260 |
+
${[2006].includes(getYear()) && 'img[alt="Check Answer"] { display: none }'}
|
| 261 |
+
</style>
|
| 262 |
+
<div class=${wrapper}>
|
| 263 |
+
<button class=${button} onClick=${onClick}>
|
| 264 |
+
Check your answers spoiler-free
|
| 265 |
+
</button>
|
| 266 |
+
${open &&
|
| 267 |
+
html`
|
| 268 |
+
<div class=${dropdownWrapper}>
|
| 269 |
+
<div class=${dropdown}>
|
| 270 |
+
<p>${feedback}</p>
|
| 271 |
+
<div class=${responses}>${body}</div>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
`}
|
| 275 |
+
</div>
|
| 276 |
+
`;
|
| 277 |
+
};
|
| 278 |
+
|
| 279 |
+
const data = await getData();
|
| 280 |
+
const prompts = getAnswers(data, document.URL);
|
| 281 |
+
render(html`<${CheckButton} prompts=${prompts} />`, container);
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_2.html/index.html
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>ACMECorp: Section 2</title>
|
| 5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6 |
+
</head>
|
| 7 |
+
|
| 8 |
+
<body bgcolor=white><!--CUT--><div align=right><small><a href="../../solutions/m2.html">(Meta-puzzle solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 10 |
+
<tr>
|
| 11 |
+
<td><img src="images/head2.jpg"></td>
|
| 12 |
+
</tr>
|
| 13 |
+
</table>
|
| 14 |
+
<p><strong><font face="Arial">Section 2</font></strong></p>
|
| 15 |
+
|
| 16 |
+
<i>Yesterday the boss went to the theatre. You ask around, and eventually the guy in the cloakroom nods and says, "Hey, yeah, I remember him. Big tipper. Forgot to pick this book up when he left--sort of a scrapbook." You open it; mostly it's meaningless old photos of vacations and such, but there's one page with the following on it:
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<table border="1" align="center" cellspacing="0" cellpadding="10">
|
| 21 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 22 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 23 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 24 |
+
</table>
|
| 25 |
+
|
| 26 |
+
<p>
|
| 27 |
+
|
| 28 |
+
Some puzzles have been paper-clipped to this page.</i>
|
| 29 |
+
|
| 30 |
+
<p><ol>
|
| 31 |
+
<li><a href="2_1.html">Company Picnic</a></li>
|
| 32 |
+
<li><a href="2_2.html">Shredded What?</a></li>
|
| 33 |
+
<li><a href="2_3.html">Abducted!</a></li>
|
| 34 |
+
<li><a href="2_4.html">That Mixer</a></li>
|
| 35 |
+
<li><a href="2_5.html">The Road Signs of Unspeakable Chaos</a></li>
|
| 36 |
+
<li><a href="2_6.html">Stairway to Heaven</a></li>
|
| 37 |
+
<li><a href="2_7.html">A Problem With Printing</a></li>
|
| 38 |
+
<li><a href="2_8.html">What's Green, Hangs on the Wall, and Whistles?</a></li>
|
| 39 |
+
</ol>
|
| 40 |
+
</p>
|
| 41 |
+
<p> </p>
|
| 42 |
+
<p> </p>
|
| 43 |
+
<p> </p>
|
| 44 |
+
<p> </p>
|
| 45 |
+
<p> </p>
|
| 46 |
+
<a href="../index.html">Back to the index</a>
|
| 47 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 48 |
+
<tr>
|
| 49 |
+
<td><img src="images/foot2.jpg"></td>
|
| 50 |
+
</tr>
|
| 51 |
+
</table>
|
| 52 |
+
</font>
|
| 53 |
+
</body><script type="module" src="/checkanswer.js"></script>
|
| 54 |
+
</html>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_2.html/shredded-what.html
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Lance Nathan">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="me typing damnit">
|
| 7 |
+
<TITLE>Shredded What?</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff">
|
| 10 |
+
|
| 11 |
+
<h2>M Puzzle: Shredded What?</h2>
|
| 12 |
+
<h3>by Michelle Dunnewind (image editing by Andy Lynn)</h3>
|
| 13 |
+
|
| 14 |
+
<p>
|
| 15 |
+
|
| 16 |
+
Teams are provided with a bag of shredded paper, which is four sheets of 8 1/2 x 11 paper printed on both sides. One side of the paper contains the following image:
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<table align="center" border="0" cellpadding="0" cellspacing="0">
|
| 21 |
+
<tr><td><a href="shredded-what-b2.jpg"><img width="200" border="0" src="shredded-what-b2.jpg"></a><td><a href="shredded-what-b1.jpg"><img width="200" border="0" src="shredded-what-b1.jpg"></a></tr>
|
| 22 |
+
<tr><td><a href="shredded-what-b4.jpg"><img width="200" border="0" src="shredded-what-b4.jpg"></a><td><a href="shredded-what-b3.jpg"><img width="200" border="0" src="shredded-what-b3.jpg"></a></tr>
|
| 23 |
+
</table>
|
| 24 |
+
|
| 25 |
+
<p>
|
| 26 |
+
|
| 27 |
+
which are, clockwise from the upper left: herrings in red sauce, a Matrix-like cover from <cite>Red Herring</cite> magazine, the cover of a novel called <cite>Red Herring</cite>, a herring colored red, and a statuette of the Tick villain called The Angry Red Herring.
|
| 28 |
+
|
| 29 |
+
<p>
|
| 30 |
+
|
| 31 |
+
All of these can be ignored in favor of the image on the other side:
|
| 32 |
+
|
| 33 |
+
<p>
|
| 34 |
+
|
| 35 |
+
<table align="center" border="0" cellpadding="0" cellspacing="0">
|
| 36 |
+
<tr><td><a href="shredded-what-f1.jpg"><img width="200" border="0" src="shredded-what-f1.jpg"></a><td><a href="shredded-what-f2.jpg"><img width="200" border="0" src="shredded-what-f2.jpg"></a></tr>
|
| 37 |
+
<tr><td><a href="shredded-what-f3.jpg"><img width="200" border="0" src="shredded-what-f3.jpg"></a><td><a href="shredded-what-f4.jpg"><img width="200" border="0" src="shredded-what-f4.jpg"></a></tr>
|
| 38 |
+
</table>
|
| 39 |
+
|
| 40 |
+
<p>
|
| 41 |
+
|
| 42 |
+
...which, though the words have been photoshopped out, is the following photo:
|
| 43 |
+
|
| 44 |
+
<p>
|
| 45 |
+
|
| 46 |
+
<center><img src="shredded-what-answer.jpg"></center>
|
| 47 |
+
|
| 48 |
+
<p>
|
| 49 |
+
|
| 50 |
+
and this is the answer. (Those are K-rations from World War II, by the way.)
|
| 51 |
+
|
| 52 |
+
<p>
|
| 53 |
+
Teams' solutions usually looked like this: (click for a larger photo)
|
| 54 |
+
<br>
|
| 55 |
+
<a href="../images/shredded_b.jpg"><img src="../images/shredded_b.jpg" width=300></a>
|
| 56 |
+
<a href="../images/shredded_a.jpg"><img src="../images/shredded_a.jpg" width=300></a>
|
| 57 |
+
<br>
|
| 58 |
+
(I believe these photos were from the team "Up Late". Thanks!)
|
| 59 |
+
|
| 60 |
+
<p>
|
| 61 |
+
|
| 62 |
+
(Printing note: the left side of one image should be on the reverse of the right side of the other, and vice versa. The files are named accordingly--so the back of "f1" should be "b1" and so on. The images above are links to the full images, or use: <a href="shredded-what-f1.jpg">f1</a> | <a href="shredded-what-f2.jpg">f2</a> | <a href="shredded-what-f3.jpg">f3</a> | <a href="shredded-what-f4.jpg">f4</a> | <a href="shredded-what-b1.jpg">b1</a> | <a href="shredded-what-b2.jpg">b2</a> | <a href="shredded-what-b3.jpg">b3</a> | <a href="shredded-what-b4.jpg">b4</a>.)
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
</BODY>
|
| 66 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_3.html/2_3.html
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Document Archivists">
|
| 6 |
+
<TITLE>Abducted!</TITLE>
|
| 7 |
+
</HEAD>
|
| 8 |
+
<BODY BGCOLOR="#ffffff"><!--CUT--><div align=right><small><a href="../../solutions/abducted.html">(Solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
|
| 10 |
+
<table width="100%">
|
| 11 |
+
<tr>
|
| 12 |
+
<td><img src="images/head2.jpg"></td>
|
| 13 |
+
</tr>
|
| 14 |
+
</table>
|
| 15 |
+
|
| 16 |
+
<h2>Document 2.3: Abducted!</h2>
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<em>Your boss wrote:</em>
|
| 21 |
+
|
| 22 |
+
<p>
|
| 23 |
+
|
| 24 |
+
I was walking down a seemingly endless hall and as I emerged outside, a car
|
| 25 |
+
screeched to a stop in front of me. Some yahoo with a gun directed me to
|
| 26 |
+
get into the car, and as I entered it I was knocked unconscious.
|
| 27 |
+
|
| 28 |
+
<p>
|
| 29 |
+
|
| 30 |
+
The next thing I knew (several hours later), I was being hustled into a
|
| 31 |
+
building. Though rushed, I was able to make out something dangling above
|
| 32 |
+
me, and the number 1732 on the wall. What I saw above me is an important
|
| 33 |
+
clue--I didn't get a good look at it, but I hope you will be able to
|
| 34 |
+
reconstruct it from the following information, which I gave to my psychic
|
| 35 |
+
advisor after she hypnotized me.
|
| 36 |
+
|
| 37 |
+
<p>
|
| 38 |
+
|
| 39 |
+
<table border="0" align="center">
|
| 40 |
+
<tr><td>0.1<td><img src="images/arrow1.gif"></tr>
|
| 41 |
+
<tr><td>0.0<td><img src="images/arrow2.gif"></tr>
|
| 42 |
+
<tr><td>0.2<td><img src="images/arrow3.gif"></tr>
|
| 43 |
+
<tr><td>0.2<td><img src="images/arrow3.gif"></tr>
|
| 44 |
+
<tr><td>0.3<td><img src="images/arrow1.gif"></tr>
|
| 45 |
+
<tr><td>0.1<td><img src="images/arrow4.gif"></tr>
|
| 46 |
+
<tr><td>53.7<td><img src="images/arrow3.gif"></tr>
|
| 47 |
+
<tr><td>0.5<td><img src="images/arrow3.gif"></tr>
|
| 48 |
+
<tr><td>0.2<td><img src="images/arrow1.gif"></tr>
|
| 49 |
+
<tr><td>40.9<td><img src="images/arrow1.gif"></tr>
|
| 50 |
+
<tr><td>0.2<td><img src="images/arrow2.gif"></tr>
|
| 51 |
+
<tr><td>0.1<td><img src="images/arrow1.gif"></tr>
|
| 52 |
+
<tr><td>0.9<td><img src="images/arrow1.gif"></tr>
|
| 53 |
+
<tr><td>1.5<td><img src="images/arrow1.gif"></tr>
|
| 54 |
+
<tr><td>0.4<td><img src="images/arrow3.gif"></tr>
|
| 55 |
+
<tr><td>16.0<td><img src="images/arrow3.gif"></tr>
|
| 56 |
+
<tr><td>0.0<td><img src="images/arrow3.gif"></tr>
|
| 57 |
+
<tr><td>0.4<td><img src="images/arrow1.gif"></tr>
|
| 58 |
+
<tr><td>64.3<td><img src="images/arrow3.gif"></tr>
|
| 59 |
+
<tr><td>16.6<td><img src="images/arrow2.gif"></tr>
|
| 60 |
+
<tr><td>0.2<td><img src="images/arrow3.gif"></tr>
|
| 61 |
+
<tr><td>2.3<td><img src="images/arrow1.gif"></tr>
|
| 62 |
+
<tr><td>0.6<td><img src="images/arrow3.gif"></tr>
|
| 63 |
+
<tr><td>68.2<td><img src="images/arrow3.gif"></tr>
|
| 64 |
+
<tr><td>59.8<td><img src="images/arrow1.gif"></tr>
|
| 65 |
+
<tr><td>0.5<td><img src="images/arrow1.gif"></tr>
|
| 66 |
+
<tr><td>1.2<td><img src="images/arrow1.gif"></tr>
|
| 67 |
+
<tr><td>4.3<td><img src="images/arrow1.gif"></tr>
|
| 68 |
+
<tr><td>1.3<td><img src="images/arrow1.gif"></tr>
|
| 69 |
+
<tr><td>59.0<td><img src="images/arrow1.gif"></tr>
|
| 70 |
+
<tr><td>13.6<td><img src="images/arrow1.gif"></tr>
|
| 71 |
+
<tr><td>0.0<td><img src="images/arrow3.gif"></tr>
|
| 72 |
+
<tr><td>0.5<td><img src="images/arrow1.gif"></tr>
|
| 73 |
+
<tr><td>9.2<td><img src="images/arrow3.gif"></tr>
|
| 74 |
+
<tr><td>1.3<td><img src="images/arrow1.gif"></tr>
|
| 75 |
+
<tr><td>1.2<td><img src="images/arrow1.gif"></tr>
|
| 76 |
+
<tr><td>11.3<td><img src="images/arrow1.gif"></tr>
|
| 77 |
+
<tr><td>1.8<td><img src="images/arrow1.gif"></tr>
|
| 78 |
+
<tr><td>0.7<td><img src="images/arrow2.gif"></tr>
|
| 79 |
+
<tr><td>0.0<td><img src="images/arrow1.gif"></tr>
|
| 80 |
+
<tr><td>0.1<td><img src="images/arrow3.gif"></tr>
|
| 81 |
+
<tr><td>0.0<td><img src="images/arrow1.gif"></tr>
|
| 82 |
+
<tr><td>0.1<td><img src="images/arrow1.gif"></tr>
|
| 83 |
+
<tr><td>0.0<td><img src="images/arrow1.gif"></tr>
|
| 84 |
+
<tr><td>1.8<td><img src="images/arrow1.gif"></tr>
|
| 85 |
+
<tr><td>0.0<td><img src="images/arrow1.gif"></tr>
|
| 86 |
+
<tr><td>1.2<td><img src="images/arrow1.gif"></tr>
|
| 87 |
+
<tr><td>0.1<td><img src="images/arrow3.gif"></tr>
|
| 88 |
+
<tr><td>0.4<td><img src="images/arrow3.gif"></tr>
|
| 89 |
+
<tr><td>0.0<td><img src="images/arrow3.gif"></tr>
|
| 90 |
+
<tr><td>0.3<td><img src="images/arrow3.gif"></tr>
|
| 91 |
+
<tr><td>1.2<td><img src="images/arrow3.gif"></tr>
|
| 92 |
+
<tr><td>0.7<td><img src="images/arrow4.gif"></tr>
|
| 93 |
+
</table>
|
| 94 |
+
|
| 95 |
+
<p><br><p>
|
| 96 |
+
|
| 97 |
+
<a href="index.html">Back to the index</a>
|
| 98 |
+
<table width="100%">
|
| 99 |
+
<tr>
|
| 100 |
+
<td><img src="images/foot2.jpg"></td>
|
| 101 |
+
</tr>
|
| 102 |
+
</table>
|
| 103 |
+
|
| 104 |
+
</font>
|
| 105 |
+
</body>
|
| 106 |
+
<script type="module" src="/checkanswer.js"></script>
|
| 107 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_3.html/abducted.html
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Lance Nathan">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="me typing damnit">
|
| 7 |
+
<TITLE>Abducted!</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff">
|
| 10 |
+
|
| 11 |
+
<h2>M Puzzle: Abducted!</h2>
|
| 12 |
+
<h3>by Dean Sturtevant</h3>
|
| 13 |
+
|
| 14 |
+
<p>
|
| 15 |
+
|
| 16 |
+
Of course, the endless hall is the Infinite Corridor and you are abducted
|
| 17 |
+
in front of 77 Mass Ave. The directions (which I got from Yahoo), are to
|
| 18 |
+
1732 Wisconsin Ave., NW in Washington D.C., the address of the Kyrgyzstani
|
| 19 |
+
embassy. What you see above you is the flag of Kyrgyzstan.
|
| 20 |
+
|
| 21 |
+
<p align=center><img src="../images/flag.jpg"></p>
|
| 22 |
+
|
| 23 |
+
</BODY>
|
| 24 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_3.html/checkanswer.js
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Do this first so that layout shift isn't too bad:
|
| 2 |
+
const container = document.createElement("div");
|
| 3 |
+
container.style = `
|
| 4 |
+
font-size: 16px;
|
| 5 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 6 |
+
height: 2.5em;
|
| 7 |
+
`;
|
| 8 |
+
document.body.prepend(container);
|
| 9 |
+
|
| 10 |
+
import { React, html, css, render } from "./package.js";
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Remove non-alphanumeric characters.
|
| 14 |
+
*/
|
| 15 |
+
const normalizeAnswer = (answer) => {
|
| 16 |
+
if (getYear() === 2003) {
|
| 17 |
+
if (document.URL.includes("teamGuest/2")) {
|
| 18 |
+
// Special case: 2003 R2, whose answers are emoji.
|
| 19 |
+
return answer.trim();
|
| 20 |
+
} else if (document.URL.includes("6_3")) {
|
| 21 |
+
// Special case: Answer is literal Greek letter.
|
| 22 |
+
return answer.trim();
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
return answer.toUpperCase().replaceAll(/[^A-Z0-9]/g, "");
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Returns the year of the hunt we're in.
|
| 30 |
+
*/
|
| 31 |
+
const getYear = () => {
|
| 32 |
+
return Number(RegExp(`^.*/([0-9]{4})/.*$`).exec(document.URL)?.[1] ?? 0);
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Fetches the answers as a list of {url, answer, prompt, intermediate}.
|
| 37 |
+
*/
|
| 38 |
+
const getData = async () => {
|
| 39 |
+
const res = await fetch("/answers.tsv");
|
| 40 |
+
const data = await res.text();
|
| 41 |
+
const [header, ...body] = data.split("\n");
|
| 42 |
+
const headers = header.trim().split("\t");
|
| 43 |
+
return body.map((row) => {
|
| 44 |
+
const res = {};
|
| 45 |
+
row.split("\t").forEach((item, i) => {
|
| 46 |
+
res[headers[i]] = item.trim();
|
| 47 |
+
});
|
| 48 |
+
return res;
|
| 49 |
+
});
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Gets the base URL; removes trailing index.html and .html, removes everything
|
| 54 |
+
* before the year, and then removes trailing slash.
|
| 55 |
+
*/
|
| 56 |
+
const getBase = (url) => {
|
| 57 |
+
const root =
|
| 58 |
+
RegExp(`^(.*/)index.html`).exec(url)?.[1] ??
|
| 59 |
+
RegExp(`^(.*).html`).exec(url)?.[1] ??
|
| 60 |
+
url;
|
| 61 |
+
const base = RegExp(`^.*/([0-9]{4}/.*)$`).exec(root)?.[1] ?? root;
|
| 62 |
+
return base.endsWith("/") ? base.slice(0, -1) : base;
|
| 63 |
+
};
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* Get all rows in the data corresponding to a given URL. Group by same prompt.
|
| 67 |
+
*/
|
| 68 |
+
const getAnswers = (data, url) => {
|
| 69 |
+
const base = getBase(url);
|
| 70 |
+
const rows = data.filter((row) => getBase(row.url) === base);
|
| 71 |
+
const prompts = [];
|
| 72 |
+
for (const row of rows) {
|
| 73 |
+
const { prompt } = row;
|
| 74 |
+
const group = prompts.find((group) => group.prompt === prompt);
|
| 75 |
+
if (group) {
|
| 76 |
+
group.rows.push(row);
|
| 77 |
+
} else {
|
| 78 |
+
prompts.push({ prompt, rows: [row] });
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
return prompts;
|
| 82 |
+
};
|
| 83 |
+
|
| 84 |
+
/**
|
| 85 |
+
* A single textbox and submit button in the rows of possible responses.
|
| 86 |
+
*/
|
| 87 |
+
const ResponseRow = ({ prompt, rows, setFeedback }) => {
|
| 88 |
+
const [response, setResponse] = React.useState("");
|
| 89 |
+
|
| 90 |
+
const form = css`
|
| 91 |
+
align-items: baseline;
|
| 92 |
+
display: flex;
|
| 93 |
+
justify-content: right;
|
| 94 |
+
margin-bottom: 0.5em;
|
| 95 |
+
|
| 96 |
+
@media (max-width: 600px) {
|
| 97 |
+
align-items: flex-start;
|
| 98 |
+
flex-direction: column;
|
| 99 |
+
}
|
| 100 |
+
`;
|
| 101 |
+
|
| 102 |
+
const input = css`
|
| 103 |
+
background: #fafafa;
|
| 104 |
+
border: 1px solid #aaa;
|
| 105 |
+
border-radius: 2px;
|
| 106 |
+
color: #121212;
|
| 107 |
+
font-family: inherit;
|
| 108 |
+
font-size: 100%;
|
| 109 |
+
line-height: 1.2;
|
| 110 |
+
margin: 0 0.5em;
|
| 111 |
+
padding: 0.25em 0.5em;
|
| 112 |
+
|
| 113 |
+
@media (max-width: 600px) {
|
| 114 |
+
margin: 0 0 0.25em;
|
| 115 |
+
}
|
| 116 |
+
`;
|
| 117 |
+
|
| 118 |
+
const onSubmit = (e) => {
|
| 119 |
+
e.preventDefault();
|
| 120 |
+
let set = false;
|
| 121 |
+
for (const row of rows) {
|
| 122 |
+
const correct = normalizeAnswer(row.answer) === normalizeAnswer(response);
|
| 123 |
+
if (correct) {
|
| 124 |
+
setFeedback(
|
| 125 |
+
row.intermediate?.trim() === "TRUE"
|
| 126 |
+
? "Correct! See the solution page for the answer."
|
| 127 |
+
: `Solved! The answer was ${row.answer}.`
|
| 128 |
+
);
|
| 129 |
+
set = true;
|
| 130 |
+
break;
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
if (!set) {
|
| 134 |
+
setFeedback("Incorrect.");
|
| 135 |
+
}
|
| 136 |
+
};
|
| 137 |
+
|
| 138 |
+
const onChange = (e) => setResponse(e.target.value);
|
| 139 |
+
|
| 140 |
+
return html`
|
| 141 |
+
<form class=${form} onSubmit=${onSubmit}>
|
| 142 |
+
<label htmlFor=${prompt + " prompt"}>
|
| 143 |
+
${prompt || "Enter your guess"}:
|
| 144 |
+
</label>
|
| 145 |
+
<input
|
| 146 |
+
class=${input}
|
| 147 |
+
id=${prompt + " prompt"}
|
| 148 |
+
onChange=${onChange}
|
| 149 |
+
required
|
| 150 |
+
type="text"
|
| 151 |
+
value=${response}
|
| 152 |
+
/>
|
| 153 |
+
<button type="submit">Submit</button>
|
| 154 |
+
</form>
|
| 155 |
+
`;
|
| 156 |
+
};
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* Check answer button, rendered at top of page.
|
| 160 |
+
*/
|
| 161 |
+
const CheckButton = ({ prompts }) => {
|
| 162 |
+
const [open, setOpen] = React.useState(false);
|
| 163 |
+
const [feedback, setFeedback] = React.useState("Call in an answer.");
|
| 164 |
+
|
| 165 |
+
const wrapper = css`
|
| 166 |
+
font-family: "PT Sans", sans-serif;
|
| 167 |
+
font-size: 16px;
|
| 168 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 169 |
+
height: 2.5em;
|
| 170 |
+
|
| 171 |
+
button {
|
| 172 |
+
background: #555;
|
| 173 |
+
border: none;
|
| 174 |
+
border-radius: 2px;
|
| 175 |
+
color: #fff;
|
| 176 |
+
cursor: pointer;
|
| 177 |
+
display: inline-block;
|
| 178 |
+
font-size: 1em;
|
| 179 |
+
font-family: "PT Sans", sans-serif;
|
| 180 |
+
font-weight: bold;
|
| 181 |
+
line-height: 1.2;
|
| 182 |
+
padding: 0.25em 1em;
|
| 183 |
+
text-align: center;
|
| 184 |
+
text-decoration: none;
|
| 185 |
+
text-transform: none;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
p {
|
| 189 |
+
margin: 0 0 1em;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
a {
|
| 193 |
+
color: inherit !important;
|
| 194 |
+
}
|
| 195 |
+
`;
|
| 196 |
+
|
| 197 |
+
const btnTop = [2015, 2016].includes(getYear())
|
| 198 |
+
? "50px"
|
| 199 |
+
: [2012].includes(getYear())
|
| 200 |
+
? "-2.5em"
|
| 201 |
+
: "0px";
|
| 202 |
+
|
| 203 |
+
const button = css`
|
| 204 |
+
box-sizing: border-box;
|
| 205 |
+
height: 2.5em;
|
| 206 |
+
left: 0;
|
| 207 |
+
position: absolute;
|
| 208 |
+
top: ${btnTop};
|
| 209 |
+
width: 100%;
|
| 210 |
+
z-index: 9999;
|
| 211 |
+
`;
|
| 212 |
+
|
| 213 |
+
const dropdownWrapper = css`
|
| 214 |
+
background: #edeff0;
|
| 215 |
+
color: #121212;
|
| 216 |
+
left: 0;
|
| 217 |
+
position: absolute;
|
| 218 |
+
right: 0;
|
| 219 |
+
top: calc(2.5em + ${btnTop});
|
| 220 |
+
z-index: 9999;
|
| 221 |
+
`;
|
| 222 |
+
|
| 223 |
+
const dropdown = css`
|
| 224 |
+
margin: 0 auto;
|
| 225 |
+
max-width: 40em;
|
| 226 |
+
padding: 1em;
|
| 227 |
+
z-index: 9999;
|
| 228 |
+
`;
|
| 229 |
+
|
| 230 |
+
const responses = css`
|
| 231 |
+
margin: 0 auto;
|
| 232 |
+
width: fit-content;
|
| 233 |
+
|
| 234 |
+
@media (max-width: 600px) {
|
| 235 |
+
width: auto;
|
| 236 |
+
}
|
| 237 |
+
`;
|
| 238 |
+
|
| 239 |
+
const onClick = () => setOpen(!open);
|
| 240 |
+
|
| 241 |
+
const body =
|
| 242 |
+
prompts.length > 0
|
| 243 |
+
? prompts.map(
|
| 244 |
+
(group) =>
|
| 245 |
+
html`<${ResponseRow} setFeedback=${setFeedback} ...${group} />`
|
| 246 |
+
)
|
| 247 |
+
: html`<p>
|
| 248 |
+
No answers found on this page. Please report this to${" "}
|
| 249 |
+
<a href="mailto:puzzle@mit.edu">puzzle@mit.edu</a>.
|
| 250 |
+
</p>`;
|
| 251 |
+
|
| 252 |
+
return html`
|
| 253 |
+
<style>
|
| 254 |
+
@import url("https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&display=swap");
|
| 255 |
+
|
| 256 |
+
${[2015, 2016].includes(getYear()) &&
|
| 257 |
+
".navbar-fixed-top { z-index: 10000 }"}
|
| 258 |
+
${[2012].includes(getYear()) &&
|
| 259 |
+
"body { top: 2.5em } #check-answer, #shortcuts { z-index: 10000 !important }"}
|
| 260 |
+
${[2006].includes(getYear()) && 'img[alt="Check Answer"] { display: none }'}
|
| 261 |
+
</style>
|
| 262 |
+
<div class=${wrapper}>
|
| 263 |
+
<button class=${button} onClick=${onClick}>
|
| 264 |
+
Check your answers spoiler-free
|
| 265 |
+
</button>
|
| 266 |
+
${open &&
|
| 267 |
+
html`
|
| 268 |
+
<div class=${dropdownWrapper}>
|
| 269 |
+
<div class=${dropdown}>
|
| 270 |
+
<p>${feedback}</p>
|
| 271 |
+
<div class=${responses}>${body}</div>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
`}
|
| 275 |
+
</div>
|
| 276 |
+
`;
|
| 277 |
+
};
|
| 278 |
+
|
| 279 |
+
const data = await getData();
|
| 280 |
+
const prompts = getAnswers(data, document.URL);
|
| 281 |
+
render(html`<${CheckButton} prompts=${prompts} />`, container);
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_3.html/index.html
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>ACMECorp: Section 2</title>
|
| 5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6 |
+
</head>
|
| 7 |
+
|
| 8 |
+
<body bgcolor=white><!--CUT--><div align=right><small><a href="../../solutions/m2.html">(Meta-puzzle solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 10 |
+
<tr>
|
| 11 |
+
<td><img src="images/head2.jpg"></td>
|
| 12 |
+
</tr>
|
| 13 |
+
</table>
|
| 14 |
+
<p><strong><font face="Arial">Section 2</font></strong></p>
|
| 15 |
+
|
| 16 |
+
<i>Yesterday the boss went to the theatre. You ask around, and eventually the guy in the cloakroom nods and says, "Hey, yeah, I remember him. Big tipper. Forgot to pick this book up when he left--sort of a scrapbook." You open it; mostly it's meaningless old photos of vacations and such, but there's one page with the following on it:
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<table border="1" align="center" cellspacing="0" cellpadding="10">
|
| 21 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 22 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 23 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 24 |
+
</table>
|
| 25 |
+
|
| 26 |
+
<p>
|
| 27 |
+
|
| 28 |
+
Some puzzles have been paper-clipped to this page.</i>
|
| 29 |
+
|
| 30 |
+
<p><ol>
|
| 31 |
+
<li><a href="2_1.html">Company Picnic</a></li>
|
| 32 |
+
<li><a href="2_2.html">Shredded What?</a></li>
|
| 33 |
+
<li><a href="2_3.html">Abducted!</a></li>
|
| 34 |
+
<li><a href="2_4.html">That Mixer</a></li>
|
| 35 |
+
<li><a href="2_5.html">The Road Signs of Unspeakable Chaos</a></li>
|
| 36 |
+
<li><a href="2_6.html">Stairway to Heaven</a></li>
|
| 37 |
+
<li><a href="2_7.html">A Problem With Printing</a></li>
|
| 38 |
+
<li><a href="2_8.html">What's Green, Hangs on the Wall, and Whistles?</a></li>
|
| 39 |
+
</ol>
|
| 40 |
+
</p>
|
| 41 |
+
<p> </p>
|
| 42 |
+
<p> </p>
|
| 43 |
+
<p> </p>
|
| 44 |
+
<p> </p>
|
| 45 |
+
<p> </p>
|
| 46 |
+
<a href="../index.html">Back to the index</a>
|
| 47 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 48 |
+
<tr>
|
| 49 |
+
<td><img src="images/foot2.jpg"></td>
|
| 50 |
+
</tr>
|
| 51 |
+
</table>
|
| 52 |
+
</font>
|
| 53 |
+
</body><script type="module" src="/checkanswer.js"></script>
|
| 54 |
+
</html>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_4.html/2_4.html
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Document Archivists">
|
| 6 |
+
<TITLE>That Mixer</TITLE>
|
| 7 |
+
</HEAD>
|
| 8 |
+
<BODY BGCOLOR="#ffffff"><!--CUT--><div align=right><small><a href="../../solutions/that-mixer.html">(Solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
<table width="100%">
|
| 10 |
+
<tr>
|
| 11 |
+
<td><img src="images/head2.jpg"></td>
|
| 12 |
+
</tr>
|
| 13 |
+
</table>
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
<h2>Document 2.4: That Mixer</h2>
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<em>Your boss has some illegible notes on something he was calling an "Employee Event." It's not clear what it involves, but if and when you stop by the office, you find this memo on your desk.</em>
|
| 21 |
+
|
| 22 |
+
<p>
|
| 23 |
+
|
| 24 |
+
TO: ACMECorp Team Members<br>
|
| 25 |
+
FROM: Human Resources
|
| 26 |
+
|
| 27 |
+
<p>
|
| 28 |
+
|
| 29 |
+
RE: Teambuilding Event, Friday Evening, 7:30 PM
|
| 30 |
+
|
| 31 |
+
<hr><p>
|
| 32 |
+
|
| 33 |
+
Dear Employees,
|
| 34 |
+
|
| 35 |
+
<p>
|
| 36 |
+
|
| 37 |
+
Like all of ACMECorp, the Human Resources Department is deeply saddened by the death of our CEO. Certainly, the entire corporation is feeling the loss.
|
| 38 |
+
|
| 39 |
+
<p>
|
| 40 |
+
|
| 41 |
+
We acknowledge that people deal with grief in different ways, but since the shocking news, we've noticed that our valued employees are each keeping to their own cubicles, within their own departments. We feel it's time to come together to enhance interdepartmental unity and share a few laughs.
|
| 42 |
+
|
| 43 |
+
<p>
|
| 44 |
+
|
| 45 |
+
After careful consideration, we've decided to go ahead with the Employee Event that the CEO had planned for this evening. We know he would have wanted it that way.
|
| 46 |
+
|
| 47 |
+
<p>
|
| 48 |
+
|
| 49 |
+
Please send at least 2 members from your Department down to the Mezzanine Lounge of the Student Center
|
| 50 |
+
at 7:30 PM. (More are certainly welcome!) The CEO was certain that
|
| 51 |
+
you'd find an opportunity to interact with your colleagues to be a
|
| 52 |
+
rewarding experience.
|
| 53 |
+
|
| 54 |
+
<p>
|
| 55 |
+
|
| 56 |
+
In the interests of unifying the company's contributions, we would like each team whose name begins with A-K to bring something to drink, and each team whose name begins with L-Z to bring a snack.
|
| 57 |
+
|
| 58 |
+
<p><br><p>
|
| 59 |
+
|
| 60 |
+
<a href="index.html">Back to the index</a>
|
| 61 |
+
|
| 62 |
+
<table width="100%">
|
| 63 |
+
<tr>
|
| 64 |
+
<td><img src="images/foot2.jpg"></td>
|
| 65 |
+
</tr>
|
| 66 |
+
</table>
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
</body>
|
| 70 |
+
<script type="module" src="/checkanswer.js"></script>
|
| 71 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_4.html/checkanswer.js
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Do this first so that layout shift isn't too bad:
|
| 2 |
+
const container = document.createElement("div");
|
| 3 |
+
container.style = `
|
| 4 |
+
font-size: 16px;
|
| 5 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 6 |
+
height: 2.5em;
|
| 7 |
+
`;
|
| 8 |
+
document.body.prepend(container);
|
| 9 |
+
|
| 10 |
+
import { React, html, css, render } from "./package.js";
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Remove non-alphanumeric characters.
|
| 14 |
+
*/
|
| 15 |
+
const normalizeAnswer = (answer) => {
|
| 16 |
+
if (getYear() === 2003) {
|
| 17 |
+
if (document.URL.includes("teamGuest/2")) {
|
| 18 |
+
// Special case: 2003 R2, whose answers are emoji.
|
| 19 |
+
return answer.trim();
|
| 20 |
+
} else if (document.URL.includes("6_3")) {
|
| 21 |
+
// Special case: Answer is literal Greek letter.
|
| 22 |
+
return answer.trim();
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
return answer.toUpperCase().replaceAll(/[^A-Z0-9]/g, "");
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Returns the year of the hunt we're in.
|
| 30 |
+
*/
|
| 31 |
+
const getYear = () => {
|
| 32 |
+
return Number(RegExp(`^.*/([0-9]{4})/.*$`).exec(document.URL)?.[1] ?? 0);
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Fetches the answers as a list of {url, answer, prompt, intermediate}.
|
| 37 |
+
*/
|
| 38 |
+
const getData = async () => {
|
| 39 |
+
const res = await fetch("/answers.tsv");
|
| 40 |
+
const data = await res.text();
|
| 41 |
+
const [header, ...body] = data.split("\n");
|
| 42 |
+
const headers = header.trim().split("\t");
|
| 43 |
+
return body.map((row) => {
|
| 44 |
+
const res = {};
|
| 45 |
+
row.split("\t").forEach((item, i) => {
|
| 46 |
+
res[headers[i]] = item.trim();
|
| 47 |
+
});
|
| 48 |
+
return res;
|
| 49 |
+
});
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Gets the base URL; removes trailing index.html and .html, removes everything
|
| 54 |
+
* before the year, and then removes trailing slash.
|
| 55 |
+
*/
|
| 56 |
+
const getBase = (url) => {
|
| 57 |
+
const root =
|
| 58 |
+
RegExp(`^(.*/)index.html`).exec(url)?.[1] ??
|
| 59 |
+
RegExp(`^(.*).html`).exec(url)?.[1] ??
|
| 60 |
+
url;
|
| 61 |
+
const base = RegExp(`^.*/([0-9]{4}/.*)$`).exec(root)?.[1] ?? root;
|
| 62 |
+
return base.endsWith("/") ? base.slice(0, -1) : base;
|
| 63 |
+
};
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* Get all rows in the data corresponding to a given URL. Group by same prompt.
|
| 67 |
+
*/
|
| 68 |
+
const getAnswers = (data, url) => {
|
| 69 |
+
const base = getBase(url);
|
| 70 |
+
const rows = data.filter((row) => getBase(row.url) === base);
|
| 71 |
+
const prompts = [];
|
| 72 |
+
for (const row of rows) {
|
| 73 |
+
const { prompt } = row;
|
| 74 |
+
const group = prompts.find((group) => group.prompt === prompt);
|
| 75 |
+
if (group) {
|
| 76 |
+
group.rows.push(row);
|
| 77 |
+
} else {
|
| 78 |
+
prompts.push({ prompt, rows: [row] });
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
return prompts;
|
| 82 |
+
};
|
| 83 |
+
|
| 84 |
+
/**
|
| 85 |
+
* A single textbox and submit button in the rows of possible responses.
|
| 86 |
+
*/
|
| 87 |
+
const ResponseRow = ({ prompt, rows, setFeedback }) => {
|
| 88 |
+
const [response, setResponse] = React.useState("");
|
| 89 |
+
|
| 90 |
+
const form = css`
|
| 91 |
+
align-items: baseline;
|
| 92 |
+
display: flex;
|
| 93 |
+
justify-content: right;
|
| 94 |
+
margin-bottom: 0.5em;
|
| 95 |
+
|
| 96 |
+
@media (max-width: 600px) {
|
| 97 |
+
align-items: flex-start;
|
| 98 |
+
flex-direction: column;
|
| 99 |
+
}
|
| 100 |
+
`;
|
| 101 |
+
|
| 102 |
+
const input = css`
|
| 103 |
+
background: #fafafa;
|
| 104 |
+
border: 1px solid #aaa;
|
| 105 |
+
border-radius: 2px;
|
| 106 |
+
color: #121212;
|
| 107 |
+
font-family: inherit;
|
| 108 |
+
font-size: 100%;
|
| 109 |
+
line-height: 1.2;
|
| 110 |
+
margin: 0 0.5em;
|
| 111 |
+
padding: 0.25em 0.5em;
|
| 112 |
+
|
| 113 |
+
@media (max-width: 600px) {
|
| 114 |
+
margin: 0 0 0.25em;
|
| 115 |
+
}
|
| 116 |
+
`;
|
| 117 |
+
|
| 118 |
+
const onSubmit = (e) => {
|
| 119 |
+
e.preventDefault();
|
| 120 |
+
let set = false;
|
| 121 |
+
for (const row of rows) {
|
| 122 |
+
const correct = normalizeAnswer(row.answer) === normalizeAnswer(response);
|
| 123 |
+
if (correct) {
|
| 124 |
+
setFeedback(
|
| 125 |
+
row.intermediate?.trim() === "TRUE"
|
| 126 |
+
? "Correct! See the solution page for the answer."
|
| 127 |
+
: `Solved! The answer was ${row.answer}.`
|
| 128 |
+
);
|
| 129 |
+
set = true;
|
| 130 |
+
break;
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
if (!set) {
|
| 134 |
+
setFeedback("Incorrect.");
|
| 135 |
+
}
|
| 136 |
+
};
|
| 137 |
+
|
| 138 |
+
const onChange = (e) => setResponse(e.target.value);
|
| 139 |
+
|
| 140 |
+
return html`
|
| 141 |
+
<form class=${form} onSubmit=${onSubmit}>
|
| 142 |
+
<label htmlFor=${prompt + " prompt"}>
|
| 143 |
+
${prompt || "Enter your guess"}:
|
| 144 |
+
</label>
|
| 145 |
+
<input
|
| 146 |
+
class=${input}
|
| 147 |
+
id=${prompt + " prompt"}
|
| 148 |
+
onChange=${onChange}
|
| 149 |
+
required
|
| 150 |
+
type="text"
|
| 151 |
+
value=${response}
|
| 152 |
+
/>
|
| 153 |
+
<button type="submit">Submit</button>
|
| 154 |
+
</form>
|
| 155 |
+
`;
|
| 156 |
+
};
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* Check answer button, rendered at top of page.
|
| 160 |
+
*/
|
| 161 |
+
const CheckButton = ({ prompts }) => {
|
| 162 |
+
const [open, setOpen] = React.useState(false);
|
| 163 |
+
const [feedback, setFeedback] = React.useState("Call in an answer.");
|
| 164 |
+
|
| 165 |
+
const wrapper = css`
|
| 166 |
+
font-family: "PT Sans", sans-serif;
|
| 167 |
+
font-size: 16px;
|
| 168 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 169 |
+
height: 2.5em;
|
| 170 |
+
|
| 171 |
+
button {
|
| 172 |
+
background: #555;
|
| 173 |
+
border: none;
|
| 174 |
+
border-radius: 2px;
|
| 175 |
+
color: #fff;
|
| 176 |
+
cursor: pointer;
|
| 177 |
+
display: inline-block;
|
| 178 |
+
font-size: 1em;
|
| 179 |
+
font-family: "PT Sans", sans-serif;
|
| 180 |
+
font-weight: bold;
|
| 181 |
+
line-height: 1.2;
|
| 182 |
+
padding: 0.25em 1em;
|
| 183 |
+
text-align: center;
|
| 184 |
+
text-decoration: none;
|
| 185 |
+
text-transform: none;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
p {
|
| 189 |
+
margin: 0 0 1em;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
a {
|
| 193 |
+
color: inherit !important;
|
| 194 |
+
}
|
| 195 |
+
`;
|
| 196 |
+
|
| 197 |
+
const btnTop = [2015, 2016].includes(getYear())
|
| 198 |
+
? "50px"
|
| 199 |
+
: [2012].includes(getYear())
|
| 200 |
+
? "-2.5em"
|
| 201 |
+
: "0px";
|
| 202 |
+
|
| 203 |
+
const button = css`
|
| 204 |
+
box-sizing: border-box;
|
| 205 |
+
height: 2.5em;
|
| 206 |
+
left: 0;
|
| 207 |
+
position: absolute;
|
| 208 |
+
top: ${btnTop};
|
| 209 |
+
width: 100%;
|
| 210 |
+
z-index: 9999;
|
| 211 |
+
`;
|
| 212 |
+
|
| 213 |
+
const dropdownWrapper = css`
|
| 214 |
+
background: #edeff0;
|
| 215 |
+
color: #121212;
|
| 216 |
+
left: 0;
|
| 217 |
+
position: absolute;
|
| 218 |
+
right: 0;
|
| 219 |
+
top: calc(2.5em + ${btnTop});
|
| 220 |
+
z-index: 9999;
|
| 221 |
+
`;
|
| 222 |
+
|
| 223 |
+
const dropdown = css`
|
| 224 |
+
margin: 0 auto;
|
| 225 |
+
max-width: 40em;
|
| 226 |
+
padding: 1em;
|
| 227 |
+
z-index: 9999;
|
| 228 |
+
`;
|
| 229 |
+
|
| 230 |
+
const responses = css`
|
| 231 |
+
margin: 0 auto;
|
| 232 |
+
width: fit-content;
|
| 233 |
+
|
| 234 |
+
@media (max-width: 600px) {
|
| 235 |
+
width: auto;
|
| 236 |
+
}
|
| 237 |
+
`;
|
| 238 |
+
|
| 239 |
+
const onClick = () => setOpen(!open);
|
| 240 |
+
|
| 241 |
+
const body =
|
| 242 |
+
prompts.length > 0
|
| 243 |
+
? prompts.map(
|
| 244 |
+
(group) =>
|
| 245 |
+
html`<${ResponseRow} setFeedback=${setFeedback} ...${group} />`
|
| 246 |
+
)
|
| 247 |
+
: html`<p>
|
| 248 |
+
No answers found on this page. Please report this to${" "}
|
| 249 |
+
<a href="mailto:puzzle@mit.edu">puzzle@mit.edu</a>.
|
| 250 |
+
</p>`;
|
| 251 |
+
|
| 252 |
+
return html`
|
| 253 |
+
<style>
|
| 254 |
+
@import url("https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&display=swap");
|
| 255 |
+
|
| 256 |
+
${[2015, 2016].includes(getYear()) &&
|
| 257 |
+
".navbar-fixed-top { z-index: 10000 }"}
|
| 258 |
+
${[2012].includes(getYear()) &&
|
| 259 |
+
"body { top: 2.5em } #check-answer, #shortcuts { z-index: 10000 !important }"}
|
| 260 |
+
${[2006].includes(getYear()) && 'img[alt="Check Answer"] { display: none }'}
|
| 261 |
+
</style>
|
| 262 |
+
<div class=${wrapper}>
|
| 263 |
+
<button class=${button} onClick=${onClick}>
|
| 264 |
+
Check your answers spoiler-free
|
| 265 |
+
</button>
|
| 266 |
+
${open &&
|
| 267 |
+
html`
|
| 268 |
+
<div class=${dropdownWrapper}>
|
| 269 |
+
<div class=${dropdown}>
|
| 270 |
+
<p>${feedback}</p>
|
| 271 |
+
<div class=${responses}>${body}</div>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
`}
|
| 275 |
+
</div>
|
| 276 |
+
`;
|
| 277 |
+
};
|
| 278 |
+
|
| 279 |
+
const data = await getData();
|
| 280 |
+
const prompts = getAnswers(data, document.URL);
|
| 281 |
+
render(html`<${CheckButton} prompts=${prompts} />`, container);
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_4.html/index.html
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>ACMECorp: Section 2</title>
|
| 5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6 |
+
</head>
|
| 7 |
+
|
| 8 |
+
<body bgcolor=white><!--CUT--><div align=right><small><a href="../../solutions/m2.html">(Meta-puzzle solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 10 |
+
<tr>
|
| 11 |
+
<td><img src="images/head2.jpg"></td>
|
| 12 |
+
</tr>
|
| 13 |
+
</table>
|
| 14 |
+
<p><strong><font face="Arial">Section 2</font></strong></p>
|
| 15 |
+
|
| 16 |
+
<i>Yesterday the boss went to the theatre. You ask around, and eventually the guy in the cloakroom nods and says, "Hey, yeah, I remember him. Big tipper. Forgot to pick this book up when he left--sort of a scrapbook." You open it; mostly it's meaningless old photos of vacations and such, but there's one page with the following on it:
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<table border="1" align="center" cellspacing="0" cellpadding="10">
|
| 21 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 22 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 23 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 24 |
+
</table>
|
| 25 |
+
|
| 26 |
+
<p>
|
| 27 |
+
|
| 28 |
+
Some puzzles have been paper-clipped to this page.</i>
|
| 29 |
+
|
| 30 |
+
<p><ol>
|
| 31 |
+
<li><a href="2_1.html">Company Picnic</a></li>
|
| 32 |
+
<li><a href="2_2.html">Shredded What?</a></li>
|
| 33 |
+
<li><a href="2_3.html">Abducted!</a></li>
|
| 34 |
+
<li><a href="2_4.html">That Mixer</a></li>
|
| 35 |
+
<li><a href="2_5.html">The Road Signs of Unspeakable Chaos</a></li>
|
| 36 |
+
<li><a href="2_6.html">Stairway to Heaven</a></li>
|
| 37 |
+
<li><a href="2_7.html">A Problem With Printing</a></li>
|
| 38 |
+
<li><a href="2_8.html">What's Green, Hangs on the Wall, and Whistles?</a></li>
|
| 39 |
+
</ol>
|
| 40 |
+
</p>
|
| 41 |
+
<p> </p>
|
| 42 |
+
<p> </p>
|
| 43 |
+
<p> </p>
|
| 44 |
+
<p> </p>
|
| 45 |
+
<p> </p>
|
| 46 |
+
<a href="../index.html">Back to the index</a>
|
| 47 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 48 |
+
<tr>
|
| 49 |
+
<td><img src="images/foot2.jpg"></td>
|
| 50 |
+
</tr>
|
| 51 |
+
</table>
|
| 52 |
+
</font>
|
| 53 |
+
</body><script type="module" src="/checkanswer.js"></script>
|
| 54 |
+
</html>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_4.html/that-mixer.html
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Lance Nathan">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="me typing damnit">
|
| 7 |
+
<TITLE>That Mixer</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff">
|
| 10 |
+
|
| 11 |
+
<h2>M Puzzle: That Mixer</h2>
|
| 12 |
+
<h3>by the Acme Party Committee</h3>
|
| 13 |
+
|
| 14 |
+
<p>
|
| 15 |
+
"That Mixer" is, of course, an anagram for "The Matrix".
|
| 16 |
+
|
| 17 |
+
<p>
|
| 18 |
+
|
| 19 |
+
The party consists 5 activity stations, one behind a curtain/screen.
|
| 20 |
+
|
| 21 |
+
<p>
|
| 22 |
+
|
| 23 |
+
The activities are as follows:
|
| 24 |
+
|
| 25 |
+
<p>
|
| 26 |
+
|
| 27 |
+
<ol>
|
| 28 |
+
<li>Stacking oreos</li>
|
| 29 |
+
<ul>
|
| 30 |
+
<li>Teams get two minutes to stack oreos. Team with the highest tower wins.
|
| 31 |
+
</ul>
|
| 32 |
+
|
| 33 |
+
<li>Boggle</li>
|
| 34 |
+
<ul>
|
| 35 |
+
<li>Three minute Boggle game. Team with the highest score wins.</li>
|
| 36 |
+
</ul>
|
| 37 |
+
|
| 38 |
+
<li>Backwards spelling bee</li>
|
| 39 |
+
<ul>
|
| 40 |
+
<li>Standard spelling bee format. First person to miss and have opponent spell that word correctly (plus one additional word) wins.</li>
|
| 41 |
+
</ul>
|
| 42 |
+
|
| 43 |
+
<li>"Big Dumb Five"</li>
|
| 44 |
+
<ul>
|
| 45 |
+
<li>Play with at least three other people representing at least 2 teams.</li>
|
| 46 |
+
<li>Each player gets 5 poker chips and can wager any amount of them on each hand. The person showing the highest number of chips that is not duplicated by another player takes all chips.</li>
|
| 47 |
+
<li>First person to 20 wins victory for his/her team.</li>
|
| 48 |
+
</ul>
|
| 49 |
+
|
| 50 |
+
<li>Memory Game</li>
|
| 51 |
+
<ul>
|
| 52 |
+
<li>This is the real puzzle. Teams are not eligible to play unless they have prizes from all 4 other games. They can accomplish this by winning all 4 games or by partnering with other teams.</li>
|
| 53 |
+
<li>5 x 5 grid of "memory" picture cards. Only 1 team plays at a time. Play continues until all cards are matched up except the red-and-yellow slice of pizza, which is the answer for the round. Teams get a parting "prize" of <b>a card bearing the pizza icon</b>.</li>
|
| 54 |
+
</ul>
|
| 55 |
+
</ol>
|
| 56 |
+
|
| 57 |
+
<p align=center><img src="../images/pizza.png"></p>
|
| 58 |
+
|
| 59 |
+
<p>
|
| 60 |
+
|
| 61 |
+
<pre>
|
| 62 |
+
REQUIRED PROPS:
|
| 63 |
+
Ruler
|
| 64 |
+
Several stopwatches
|
| 65 |
+
Oreos
|
| 66 |
+
National Spelling Bee word list
|
| 67 |
+
Memory Game or homemade facsimile
|
| 68 |
+
Boggle Game
|
| 69 |
+
Poker chips
|
| 70 |
+
Folding screen
|
| 71 |
+
"prizes" -
|
| 72 |
+
60 cards representing Boggle, Oreos, Spelling, Big Dumb Five
|
| 73 |
+
30 cards with pizza slices on them
|
| 74 |
+
</pre>
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
</BODY>
|
| 86 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_5.html/2_5.html
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Document Archivists">
|
| 6 |
+
<TITLE>The Road Signs Of Unspeakable Chaos</TITLE>
|
| 7 |
+
</HEAD>
|
| 8 |
+
<BODY BGCOLOR="#ffffff"><!--CUT--><div align=right><small><a href="../../solutions/road-signs.html">(Solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
|
| 10 |
+
<table width="100%">
|
| 11 |
+
<tr>
|
| 12 |
+
<td><img src="images/head2.jpg"></td>
|
| 13 |
+
</tr>
|
| 14 |
+
</table>
|
| 15 |
+
|
| 16 |
+
<h2>Document 2.5: The Road Signs of Unspeakable Chaos</h2>
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<em>Your boss wrote:</em>
|
| 21 |
+
|
| 22 |
+
<p>
|
| 23 |
+
|
| 24 |
+
I was consulted by the Minister of Transportation of the Realm of
|
| 25 |
+
Unspeakable Chaos on a crisis they had. It turns out that a road sign
|
| 26 |
+
was missing from their inventory and they needed a replacement. (This
|
| 27 |
+
sign is an important clue.) Fortunately I was able to help him, since
|
| 28 |
+
the road sign was available from another country. I've attached part
|
| 29 |
+
of the inventory, which was hashed using the MD5 algorithm, then MIME
|
| 30 |
+
base64 encoded, then lexicographically sorted.
|
| 31 |
+
|
| 32 |
+
<p>
|
| 33 |
+
|
| 34 |
+
Chaotians use the same language for road signs as they do for flags.
|
| 35 |
+
(See earlier fieldwork notes from the Realm of Unspeakable Chaos at
|
| 36 |
+
<br><a href="http://web.mit.edu/puzzle/www/01/Solutions/chaotic.html">
|
| 37 |
+
http://web.mit.edu/puzzle/www/01/Solutions/chaotic.html</a>. <br> The 2001 puzzle
|
| 38 |
+
about flags and the Realm of Unspeakable Chaos is at:
|
| 39 |
+
<br><a href="http://www.mit.edu/~puzzle/01/phase4/09/index.html">
|
| 40 |
+
http://wweb.mit.edu/puzzle/www/01/phase4/09/index.html</a> for the
|
| 41 |
+
puzzle or<br>
|
| 42 |
+
<a href="http://web.mit.edu/puzzle/www/01/Solutions/realm.html">
|
| 43 |
+
http://web.mit.edu/puzzle/www/01/Solutions/realm.html</a> for the solution.)
|
| 44 |
+
Road signs are different from flags in a number of ways:
|
| 45 |
+
|
| 46 |
+
<p>
|
| 47 |
+
|
| 48 |
+
<ul>
|
| 49 |
+
<li>Backgrounds are monochromatic.</li>
|
| 50 |
+
<li>Road signs have no diminished shapes.</li>
|
| 51 |
+
<li>The only colors used in road signs are black, yellow, white, and red.</li>
|
| 52 |
+
<li>Road signs have no L-shapes or ^-shapes (inverted or not), nor do they have stars, dots, or horizontal lines.</li>
|
| 53 |
+
<li>There are three other basic shapes:</li>
|
| 54 |
+
<ul>
|
| 55 |
+
<li>fruta = upward-pointing arrow</li>
|
| 56 |
+
<li>pratu = rightward-pointing arrow</li>
|
| 57 |
+
<li>babo = diamond</li>
|
| 58 |
+
</ul>
|
| 59 |
+
<li>There are three categories of shapes:</li>
|
| 60 |
+
<ol>
|
| 61 |
+
<li>arrows, T-shapes, X-shape, Y-shapes</li>
|
| 62 |
+
<li>ring, triangles, diamond</li>
|
| 63 |
+
<li>/-shape, \-shape</li>
|
| 64 |
+
</ol>
|
| 65 |
+
<li>No more than two shapes of category 1 may appear on a sign.</li>
|
| 66 |
+
<li>No more than one shape of category 2 may appear on a sign.</li>
|
| 67 |
+
<li>No more than one shape of category 3 may appear on a sign.</li>
|
| 68 |
+
<li>A sign must have a shape of category 1 or 2.</li>
|
| 69 |
+
<li>Numbers are used exactly when describing category 1 shapes.</li>
|
| 70 |
+
<li>If there are shapes of different categories on a sign, they are described in order of increasing category number, separated by 'pe'. Shapes of the same category should be separated by 'py', as they are for flags.</li>
|
| 71 |
+
<li>All road signs are round.</li>
|
| 72 |
+
<li>If there are two shapes of category 1, then they appear on the sign from left to right in the described order. No touching.</li>
|
| 73 |
+
<li>Category 1 shapes are contained inside category 2 shapes if both are present. No touching.</li>
|
| 74 |
+
<li>A category 3 shape is a diagonal line running from one side of the sign to another.</li>
|
| 75 |
+
<li>In addition to inversives (see the field notes linked above), Chaotic has <cite>reflectives</cite>. The reflective of a noun (that is, a noun describing a shape just like the original, except flipped horizontally) is formed by making its first vowel a front vowel, and prepending a copy of this first vowel to the beginning of the word. If the inverse of a shape is the same as the reflection of the shape, then the inversive form of the noun is used.</li>
|
| 76 |
+
</ul>
|
| 77 |
+
|
| 78 |
+
<p>
|
| 79 |
+
|
| 80 |
+
All signs describable by the language should be present in a complete inventory (except of course those putting a shape on a background of the same color). Thereby explaining the name of the country!
|
| 81 |
+
|
| 82 |
+
<p>
|
| 83 |
+
|
| 84 |
+
(Example: a sign with a yellow background and two white leftward-pointing arrows in a black diamond is represented in the road sign language as "magare nasty enprety um pe dril babo" and is encoded as "XjDYbSl87wVZWBgZNGyTrg".)
|
| 85 |
+
|
| 86 |
+
<p>
|
| 87 |
+
|
| 88 |
+
The inventory extract:
|
| 89 |
+
|
| 90 |
+
<p>
|
| 91 |
+
</font>
|
| 92 |
+
<pre>
|
| 93 |
+
gqw3TySaYqOTZW9XCB6thg
|
| 94 |
+
gqxBkD1hviJa381RtX9j/w
|
| 95 |
+
gqxKTxx27GEzTxtjUpPk4A
|
| 96 |
+
gqxlM0HeX1W6tDoeHh4caw
|
| 97 |
+
gqz+CTdlImCyoyQzcNFiOg
|
| 98 |
+
gqzriZm+YEqx8oDacUHayQ
|
| 99 |
+
gr+v34NhI4T9a5xTI8LD0Q
|
| 100 |
+
gr0PcapQomm1gmoTN/Lg2A
|
| 101 |
+
gr3/eyWh5JUmWzF7mZAbsA
|
| 102 |
+
gr3cuLIao1pUQKgzoB/LOA
|
| 103 |
+
gr6xFSKEedh0kunf/C9alQ
|
| 104 |
+
gr70tH6I3oyBNyFW1s0GlQ
|
| 105 |
+
gr7fjQFTtDJgxeuag8Xeeg
|
| 106 |
+
gr7pknsbnnE8uh6zlNuYxA
|
| 107 |
+
gr9bzpI1aPsbgfOsbRX98g
|
| 108 |
+
gr9cOWNd5b8sDWz3YbwV9Q
|
| 109 |
+
grBFyEduGDjIu9rGDYMRvA
|
| 110 |
+
grCZNqWWyGjV2fyyWxdR5Q
|
| 111 |
+
grDcIugVWW0R2M34SXaIuw
|
| 112 |
+
grF9z2T5PcHp3EsfyabXRw
|
| 113 |
+
grFYmMyMT75nN0e24emvZg
|
| 114 |
+
grIM8KuZ/DVQAUi4B2LYyA
|
| 115 |
+
grJA4Yo/fEgqpB6biMV26g
|
| 116 |
+
grJC/G5vgvpHw6zzQVhJvA
|
| 117 |
+
</pre>
|
| 118 |
+
<font face="arial">
|
| 119 |
+
<p><br><p>
|
| 120 |
+
|
| 121 |
+
<a href="index.html">Back to the index</a>
|
| 122 |
+
|
| 123 |
+
<table width="100%">
|
| 124 |
+
<tr>
|
| 125 |
+
<td><img src="images/foot2.jpg"></td>
|
| 126 |
+
</tr>
|
| 127 |
+
</table>
|
| 128 |
+
|
| 129 |
+
</FONT>
|
| 130 |
+
</body>
|
| 131 |
+
<script type="module" src="/checkanswer.js"></script>
|
| 132 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_5.html/chaotic.html
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>Solution: The Realm of Unspeakable Chaos (Grammar of Chaotic)</title>
|
| 5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6 |
+
<meta name="robots" content="noindex, nofollow">
|
| 7 |
+
</head>
|
| 8 |
+
|
| 9 |
+
<body bgcolor="#FFFFFF" text="000000" link="#FF0000" vlink="#330033"
|
| 10 |
+
alink="#CCCC00">
|
| 11 |
+
|
| 12 |
+
<h3><font face="Verdana, Arial, Helvetica, sans-serif">
|
| 13 |
+
<font color="ff0000">
|
| 14 |
+
Solution:
|
| 15 |
+
</font>
|
| 16 |
+
The Realm of Unspeakable Chaos (Grammar of Chaotic)
|
| 17 |
+
</font></h3>
|
| 18 |
+
<p><font face="Verdana, Arial, Helvetica, sans-serif"><i>Written by
|
| 19 |
+
Kevin Wald
|
| 20 |
+
</i></font></p>
|
| 21 |
+
|
| 22 |
+
<font face="Verdana, Arial, Helvetica, sans-serif">
|
| 23 |
+
|
| 24 |
+
<p>
|
| 25 |
+
A Brief Dictionary and Grammar of Chaotic.
|
| 26 |
+
</p>
|
| 27 |
+
<p>
|
| 28 |
+
(Note: The following is just one way of describing the relevant facts
|
| 29 |
+
about the language in "The Realm of Unspeakable Chaos"; there are
|
| 30 |
+
certainly other reasonable ways of presenting the same data.)
|
| 31 |
+
</p>
|
| 32 |
+
<p>
|
| 33 |
+
<b>I) Dictionary</b>
|
| 34 |
+
<blockquote><b>A) Simple nouns (shapes)</b>
|
| 35 |
+
|
| 36 |
+
<blockquote>
|
| 37 |
+
<table>
|
| 38 |
+
<tr>
|
| 39 |
+
<td>
|
| 40 |
+
<font face="Verdana, Arial, Helvetica, sans-serif">
|
| 41 |
+
danu
|
| 42 |
+
<br>duru
|
| 43 |
+
<br>fogu
|
| 44 |
+
<br>gosu
|
| 45 |
+
<br>koro
|
| 46 |
+
<br>mala
|
| 47 |
+
<br>olo
|
| 48 |
+
<br>prasu
|
| 49 |
+
<br>uta
|
| 50 |
+
<br>woda
|
| 51 |
+
<br>zudu
|
| 52 |
+
</font>
|
| 53 |
+
</td>
|
| 54 |
+
<td>
|
| 55 |
+
<font face="Verdana, Arial, Helvetica, sans-serif">
|
| 56 |
+
^-shape
|
| 57 |
+
<br>inverted T-shape
|
| 58 |
+
<br>ring
|
| 59 |
+
<br>dot
|
| 60 |
+
<br>inverted L-shape
|
| 61 |
+
<br>/-shape
|
| 62 |
+
<br>Y-shape
|
| 63 |
+
<br>horizontal line
|
| 64 |
+
<br>upward-pointing triangle
|
| 65 |
+
<br>star
|
| 66 |
+
<br>X-shape
|
| 67 |
+
</font>
|
| 68 |
+
</td>
|
| 69 |
+
</tr>
|
| 70 |
+
</table>
|
| 71 |
+
</blockquote>
|
| 72 |
+
|
| 73 |
+
<b>B) Numbers</b>
|
| 74 |
+
<blockquote>In the following, _ replaces the inflecting vowel, which would be
|
| 75 |
+
<blockquote>a when modifying a gender-1 noun,
|
| 76 |
+
<br>o when modifying a gender-2 noun, and
|
| 77 |
+
<br>u when modifying a gender-3 noun.</blockquote>
|
| 78 |
+
1 _t
|
| 79 |
+
<br>2 _m
|
| 80 |
+
<br>3 t_s
|
| 81 |
+
<br>4 s_r
|
| 82 |
+
<br>5 d_k
|
| 83 |
+
<br>6 d_r
|
| 84 |
+
<br>7 p_n
|
| 85 |
+
<br>8 r_m</blockquote>
|
| 86 |
+
|
| 87 |
+
<b>C) Colors</b>
|
| 88 |
+
<blockquote>In the following, _ replaces the inflecting vowel, which would be
|
| 89 |
+
<blockquote>e when modifying a gender-1 noun,
|
| 90 |
+
<br>i when modifying a gender-2 noun,
|
| 91 |
+
<br>y when modifying a gender-3 noun, and
|
| 92 |
+
<br>a when used in a compound with -re (see Grammar)</blockquote>
|
| 93 |
+
|
| 94 |
+
<table>
|
| 95 |
+
<tr>
|
| 96 |
+
<td>
|
| 97 |
+
<font face="Verdana, Arial, Helvetica, sans-serif">
|
| 98 |
+
bl_g
|
| 99 |
+
<br>dr_l
|
| 100 |
+
<br>mag_
|
| 101 |
+
<br>mold_n
|
| 102 |
+
<br>nast_
|
| 103 |
+
<br>podol_g
|
| 104 |
+
<br>suld_
|
| 105 |
+
</font>
|
| 106 |
+
</td>
|
| 107 |
+
<td>
|
| 108 |
+
<font face="Verdana, Arial, Helvetica, sans-serif">
|
| 109 |
+
blue
|
| 110 |
+
<br>black
|
| 111 |
+
<br>yellow
|
| 112 |
+
<br>green
|
| 113 |
+
<br>white
|
| 114 |
+
<br>purple
|
| 115 |
+
<br>red
|
| 116 |
+
</font>
|
| 117 |
+
</td>
|
| 118 |
+
</tr>
|
| 119 |
+
</table>
|
| 120 |
+
</blockquote>
|
| 121 |
+
|
| 122 |
+
<b>D) Conjunction</b>
|
| 123 |
+
<blockquote>
|
| 124 |
+
<table>
|
| 125 |
+
<tr>
|
| 126 |
+
<td>
|
| 127 |
+
<font face="Verdana, Arial, Helvetica, sans-serif">
|
| 128 |
+
py
|
| 129 |
+
</font>
|
| 130 |
+
</td>
|
| 131 |
+
<td>
|
| 132 |
+
<font face="Verdana, Arial, Helvetica, sans-serif">
|
| 133 |
+
and
|
| 134 |
+
</font>
|
| 135 |
+
</td>
|
| 136 |
+
</tr>
|
| 137 |
+
</table>
|
| 138 |
+
</blockquote>
|
| 139 |
+
</blockquote>
|
| 140 |
+
|
| 141 |
+
<b>II) Grammar</b>
|
| 142 |
+
<blockquote><b>A) Nouns</b>
|
| 143 |
+
<blockquote>i) Gender
|
| 144 |
+
<blockquote>
|
| 145 |
+
There are three grammatical genders in this language, which we
|
| 146 |
+
shall designate arbitrarily by 1, 2, and 3. If a noun has gender n,
|
| 147 |
+
then so must any color word or number modifying it.
|
| 148 |
+
The gender of a word is marked on the last vowel of the word.
|
| 149 |
+
Specifically, with each gender there are associated two vowels,
|
| 150 |
+
one "back" (formed with the tongue towards the back of the
|
| 151 |
+
mouth) and one "front." The assignments are
|
| 152 |
+
|
| 153 |
+
<blockquote>
|
| 154 |
+
<table>
|
| 155 |
+
<tr>
|
| 156 |
+
<td><font face="Verdana, Arial, Helvetica, sans-serif">
|
| 157 |
+
Gender
|
| 158 |
+
<br>1
|
| 159 |
+
<br>2
|
| 160 |
+
<br>3
|
| 161 |
+
<br>
|
| 162 |
+
</font></td>
|
| 163 |
+
<td><font face="Verdana, Arial, Helvetica, sans-serif">
|
| 164 |
+
Back
|
| 165 |
+
<br>a
|
| 166 |
+
<br>o
|
| 167 |
+
<br>u
|
| 168 |
+
<br>
|
| 169 |
+
</font></td>
|
| 170 |
+
<td><font face="Verdana, Arial, Helvetica, sans-serif">
|
| 171 |
+
Front
|
| 172 |
+
<br>e
|
| 173 |
+
<br>i
|
| 174 |
+
<br>y
|
| 175 |
+
<br>
|
| 176 |
+
</font></td>
|
| 177 |
+
<tr>
|
| 178 |
+
</table>
|
| 179 |
+
</blockquote>
|
| 180 |
+
|
| 181 |
+
The last vowel of a word of a given gender will be one of the
|
| 182 |
+
two vowels assigned to that gender (which one depends on various
|
| 183 |
+
considerations discussed below).
|
| 184 |
+
</blockquote>
|
| 185 |
+
<p>ii) Derivation
|
| 186 |
+
<blockquote>There are numerous unanalyzable simple nouns in this language,
|
| 187 |
+
such as <u>fugu</u> ("ring") and <u>woda</u> ("star"). All such nouns end
|
| 188 |
+
in a back vowel in the singular. There are also two ways of
|
| 189 |
+
deriving other nouns from these:
|
| 190 |
+
<p>a) Diminutives
|
| 191 |
+
<blockquote>The diminutive of a noun is formed by adding the suffix <u>-l</u>
|
| 192 |
+
to the noun, and making its last vowel a front vowel. For example,
|
| 193 |
+
from <u>fogu</u> ("ring") we can derive <u>fogyl</u> ("small ring").</blockquote>
|
| 194 |
+
b) Inversives
|
| 195 |
+
<blockquote>The inversive of a noun (that is, a noun describing a shape
|
| 196 |
+
just like the original, except flipped vertically) is formed by
|
| 197 |
+
making its <u>first</u> vowel a front vowel, and prepending a copy
|
| 198 |
+
of the original (unmodified) first vowel to the beginning of
|
| 199 |
+
the word. For example, from <u>mala</u> ("/-shape") we can derive
|
| 200 |
+
<u>amela</u> ("\-shape"), and from <u>uta</u> ("upward-pointing triangle")
|
| 201 |
+
we can derive <u>uyta</u> ("downward-pointing triangle").</blockquote>
|
| 202 |
+
</blockquote>
|
| 203 |
+
iii) Inflection
|
| 204 |
+
<blockquote>Nouns inflect for number. The plural form of a noun is derived
|
| 205 |
+
from its singular form by infixing <u>-n-</u> after its first vowel, and
|
| 206 |
+
making its last vowel a front vowel (if it is not already). Thus,
|
| 207 |
+
the plural of <u>olo</u> ("Y-shape") is <u>onli</u> ("Y-shapes"), the plural
|
| 208 |
+
of <u>amela</u> ("\-shape") is <u>anmele</u> ("\-shapes"), and the plural
|
| 209 |
+
of <u>malel</u> ("small /-shape") is <u>manlel</u> ("small /-shapes")</blockquote>
|
| 210 |
+
</blockquote>
|
| 211 |
+
<b>B) Inflection of Modifiers</b>
|
| 212 |
+
<blockquote>The vowel in a number is the back vowel assigned to its
|
| 213 |
+
gender.</blockquote>
|
| 214 |
+
<blockquote>
|
| 215 |
+
The last vowel in a color word modifying a noun is the front
|
| 216 |
+
vowel appropriate to its gender. A color word <u>not</u> modifying
|
| 217 |
+
a noun, but instead used in the <u>-re</u> construction (see below)
|
| 218 |
+
has <u>a</u> as its last vowel.</blockquote>
|
| 219 |
+
<b>C) Syntax</b>
|
| 220 |
+
<blockquote>i) Noun phrases
|
| 221 |
+
<blockquote>In a noun phrase, colors precede the noun, and numbers follow
|
| 222 |
+
it. Thus, "6 white Y-shapes" is <u>nasti onli dor</u>.</blockquote>
|
| 223 |
+
ii) <u>-re</u> phrases
|
| 224 |
+
<blockquote>These are used to describe the background of a flag. There
|
| 225 |
+
are two types:
|
| 226 |
+
</blockquote>
|
| 227 |
+
<blockquote>
|
| 228 |
+
a) When a background consists of a single color, it is described
|
| 229 |
+
with a phrase consisting of the color word, with <u>a</u> as its last
|
| 230 |
+
vowel, with the clitic <u>-re</u> attached. Thus, "With a yellow
|
| 231 |
+
background" is <u>magare</u>.
|
| 232 |
+
</blockquote>
|
| 233 |
+
<blockquote>
|
| 234 |
+
b) When a background consists of multiple colors, divided by
|
| 235 |
+
lines in a given shape, then it is described by the noun for
|
| 236 |
+
that shape with the clitic <u>-re</u> attached, preceded by the
|
| 237 |
+
words for the colors (in the same gender as the noun) separated
|
| 238 |
+
by <u>py</u> ("and"). Thus, "with a background of white, yellow and
|
| 239 |
+
blue separated by lines in an inverted T-shape" is <u>nasty py
|
| 240 |
+
magy py blyg durure</u>.</blockquote>
|
| 241 |
+
iii) Entire flag descriptions
|
| 242 |
+
<blockquote>The complete description of a flag consists of a <u>-re</u> phrase
|
| 243 |
+
describing its background, followed by noun phrases (separated
|
| 244 |
+
by <u>py</u>) describing the shapes on it. Thus, <u>Magare blyg danu ut
|
| 245 |
+
py bleg uta at</u> is "With a yellow background (<u>magare</u>) one blue
|
| 246 |
+
^-shape (<u>blyg danu ut</u>) and one blue upward-pointing triangle
|
| 247 |
+
(<u>bleg uta at</u>)."</blockquote>
|
| 248 |
+
</blockquote>
|
| 249 |
+
</blockquote>
|
| 250 |
+
|
| 251 |
+
</font>
|
| 252 |
+
|
| 253 |
+
</body>
|
| 254 |
+
</html>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_5.html/checkanswer.js
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Do this first so that layout shift isn't too bad:
|
| 2 |
+
const container = document.createElement("div");
|
| 3 |
+
container.style = `
|
| 4 |
+
font-size: 16px;
|
| 5 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 6 |
+
height: 2.5em;
|
| 7 |
+
`;
|
| 8 |
+
document.body.prepend(container);
|
| 9 |
+
|
| 10 |
+
import { React, html, css, render } from "./package.js";
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Remove non-alphanumeric characters.
|
| 14 |
+
*/
|
| 15 |
+
const normalizeAnswer = (answer) => {
|
| 16 |
+
if (getYear() === 2003) {
|
| 17 |
+
if (document.URL.includes("teamGuest/2")) {
|
| 18 |
+
// Special case: 2003 R2, whose answers are emoji.
|
| 19 |
+
return answer.trim();
|
| 20 |
+
} else if (document.URL.includes("6_3")) {
|
| 21 |
+
// Special case: Answer is literal Greek letter.
|
| 22 |
+
return answer.trim();
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
return answer.toUpperCase().replaceAll(/[^A-Z0-9]/g, "");
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Returns the year of the hunt we're in.
|
| 30 |
+
*/
|
| 31 |
+
const getYear = () => {
|
| 32 |
+
return Number(RegExp(`^.*/([0-9]{4})/.*$`).exec(document.URL)?.[1] ?? 0);
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Fetches the answers as a list of {url, answer, prompt, intermediate}.
|
| 37 |
+
*/
|
| 38 |
+
const getData = async () => {
|
| 39 |
+
const res = await fetch("/answers.tsv");
|
| 40 |
+
const data = await res.text();
|
| 41 |
+
const [header, ...body] = data.split("\n");
|
| 42 |
+
const headers = header.trim().split("\t");
|
| 43 |
+
return body.map((row) => {
|
| 44 |
+
const res = {};
|
| 45 |
+
row.split("\t").forEach((item, i) => {
|
| 46 |
+
res[headers[i]] = item.trim();
|
| 47 |
+
});
|
| 48 |
+
return res;
|
| 49 |
+
});
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Gets the base URL; removes trailing index.html and .html, removes everything
|
| 54 |
+
* before the year, and then removes trailing slash.
|
| 55 |
+
*/
|
| 56 |
+
const getBase = (url) => {
|
| 57 |
+
const root =
|
| 58 |
+
RegExp(`^(.*/)index.html`).exec(url)?.[1] ??
|
| 59 |
+
RegExp(`^(.*).html`).exec(url)?.[1] ??
|
| 60 |
+
url;
|
| 61 |
+
const base = RegExp(`^.*/([0-9]{4}/.*)$`).exec(root)?.[1] ?? root;
|
| 62 |
+
return base.endsWith("/") ? base.slice(0, -1) : base;
|
| 63 |
+
};
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* Get all rows in the data corresponding to a given URL. Group by same prompt.
|
| 67 |
+
*/
|
| 68 |
+
const getAnswers = (data, url) => {
|
| 69 |
+
const base = getBase(url);
|
| 70 |
+
const rows = data.filter((row) => getBase(row.url) === base);
|
| 71 |
+
const prompts = [];
|
| 72 |
+
for (const row of rows) {
|
| 73 |
+
const { prompt } = row;
|
| 74 |
+
const group = prompts.find((group) => group.prompt === prompt);
|
| 75 |
+
if (group) {
|
| 76 |
+
group.rows.push(row);
|
| 77 |
+
} else {
|
| 78 |
+
prompts.push({ prompt, rows: [row] });
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
return prompts;
|
| 82 |
+
};
|
| 83 |
+
|
| 84 |
+
/**
|
| 85 |
+
* A single textbox and submit button in the rows of possible responses.
|
| 86 |
+
*/
|
| 87 |
+
const ResponseRow = ({ prompt, rows, setFeedback }) => {
|
| 88 |
+
const [response, setResponse] = React.useState("");
|
| 89 |
+
|
| 90 |
+
const form = css`
|
| 91 |
+
align-items: baseline;
|
| 92 |
+
display: flex;
|
| 93 |
+
justify-content: right;
|
| 94 |
+
margin-bottom: 0.5em;
|
| 95 |
+
|
| 96 |
+
@media (max-width: 600px) {
|
| 97 |
+
align-items: flex-start;
|
| 98 |
+
flex-direction: column;
|
| 99 |
+
}
|
| 100 |
+
`;
|
| 101 |
+
|
| 102 |
+
const input = css`
|
| 103 |
+
background: #fafafa;
|
| 104 |
+
border: 1px solid #aaa;
|
| 105 |
+
border-radius: 2px;
|
| 106 |
+
color: #121212;
|
| 107 |
+
font-family: inherit;
|
| 108 |
+
font-size: 100%;
|
| 109 |
+
line-height: 1.2;
|
| 110 |
+
margin: 0 0.5em;
|
| 111 |
+
padding: 0.25em 0.5em;
|
| 112 |
+
|
| 113 |
+
@media (max-width: 600px) {
|
| 114 |
+
margin: 0 0 0.25em;
|
| 115 |
+
}
|
| 116 |
+
`;
|
| 117 |
+
|
| 118 |
+
const onSubmit = (e) => {
|
| 119 |
+
e.preventDefault();
|
| 120 |
+
let set = false;
|
| 121 |
+
for (const row of rows) {
|
| 122 |
+
const correct = normalizeAnswer(row.answer) === normalizeAnswer(response);
|
| 123 |
+
if (correct) {
|
| 124 |
+
setFeedback(
|
| 125 |
+
row.intermediate?.trim() === "TRUE"
|
| 126 |
+
? "Correct! See the solution page for the answer."
|
| 127 |
+
: `Solved! The answer was ${row.answer}.`
|
| 128 |
+
);
|
| 129 |
+
set = true;
|
| 130 |
+
break;
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
if (!set) {
|
| 134 |
+
setFeedback("Incorrect.");
|
| 135 |
+
}
|
| 136 |
+
};
|
| 137 |
+
|
| 138 |
+
const onChange = (e) => setResponse(e.target.value);
|
| 139 |
+
|
| 140 |
+
return html`
|
| 141 |
+
<form class=${form} onSubmit=${onSubmit}>
|
| 142 |
+
<label htmlFor=${prompt + " prompt"}>
|
| 143 |
+
${prompt || "Enter your guess"}:
|
| 144 |
+
</label>
|
| 145 |
+
<input
|
| 146 |
+
class=${input}
|
| 147 |
+
id=${prompt + " prompt"}
|
| 148 |
+
onChange=${onChange}
|
| 149 |
+
required
|
| 150 |
+
type="text"
|
| 151 |
+
value=${response}
|
| 152 |
+
/>
|
| 153 |
+
<button type="submit">Submit</button>
|
| 154 |
+
</form>
|
| 155 |
+
`;
|
| 156 |
+
};
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* Check answer button, rendered at top of page.
|
| 160 |
+
*/
|
| 161 |
+
const CheckButton = ({ prompts }) => {
|
| 162 |
+
const [open, setOpen] = React.useState(false);
|
| 163 |
+
const [feedback, setFeedback] = React.useState("Call in an answer.");
|
| 164 |
+
|
| 165 |
+
const wrapper = css`
|
| 166 |
+
font-family: "PT Sans", sans-serif;
|
| 167 |
+
font-size: 16px;
|
| 168 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 169 |
+
height: 2.5em;
|
| 170 |
+
|
| 171 |
+
button {
|
| 172 |
+
background: #555;
|
| 173 |
+
border: none;
|
| 174 |
+
border-radius: 2px;
|
| 175 |
+
color: #fff;
|
| 176 |
+
cursor: pointer;
|
| 177 |
+
display: inline-block;
|
| 178 |
+
font-size: 1em;
|
| 179 |
+
font-family: "PT Sans", sans-serif;
|
| 180 |
+
font-weight: bold;
|
| 181 |
+
line-height: 1.2;
|
| 182 |
+
padding: 0.25em 1em;
|
| 183 |
+
text-align: center;
|
| 184 |
+
text-decoration: none;
|
| 185 |
+
text-transform: none;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
p {
|
| 189 |
+
margin: 0 0 1em;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
a {
|
| 193 |
+
color: inherit !important;
|
| 194 |
+
}
|
| 195 |
+
`;
|
| 196 |
+
|
| 197 |
+
const btnTop = [2015, 2016].includes(getYear())
|
| 198 |
+
? "50px"
|
| 199 |
+
: [2012].includes(getYear())
|
| 200 |
+
? "-2.5em"
|
| 201 |
+
: "0px";
|
| 202 |
+
|
| 203 |
+
const button = css`
|
| 204 |
+
box-sizing: border-box;
|
| 205 |
+
height: 2.5em;
|
| 206 |
+
left: 0;
|
| 207 |
+
position: absolute;
|
| 208 |
+
top: ${btnTop};
|
| 209 |
+
width: 100%;
|
| 210 |
+
z-index: 9999;
|
| 211 |
+
`;
|
| 212 |
+
|
| 213 |
+
const dropdownWrapper = css`
|
| 214 |
+
background: #edeff0;
|
| 215 |
+
color: #121212;
|
| 216 |
+
left: 0;
|
| 217 |
+
position: absolute;
|
| 218 |
+
right: 0;
|
| 219 |
+
top: calc(2.5em + ${btnTop});
|
| 220 |
+
z-index: 9999;
|
| 221 |
+
`;
|
| 222 |
+
|
| 223 |
+
const dropdown = css`
|
| 224 |
+
margin: 0 auto;
|
| 225 |
+
max-width: 40em;
|
| 226 |
+
padding: 1em;
|
| 227 |
+
z-index: 9999;
|
| 228 |
+
`;
|
| 229 |
+
|
| 230 |
+
const responses = css`
|
| 231 |
+
margin: 0 auto;
|
| 232 |
+
width: fit-content;
|
| 233 |
+
|
| 234 |
+
@media (max-width: 600px) {
|
| 235 |
+
width: auto;
|
| 236 |
+
}
|
| 237 |
+
`;
|
| 238 |
+
|
| 239 |
+
const onClick = () => setOpen(!open);
|
| 240 |
+
|
| 241 |
+
const body =
|
| 242 |
+
prompts.length > 0
|
| 243 |
+
? prompts.map(
|
| 244 |
+
(group) =>
|
| 245 |
+
html`<${ResponseRow} setFeedback=${setFeedback} ...${group} />`
|
| 246 |
+
)
|
| 247 |
+
: html`<p>
|
| 248 |
+
No answers found on this page. Please report this to${" "}
|
| 249 |
+
<a href="mailto:puzzle@mit.edu">puzzle@mit.edu</a>.
|
| 250 |
+
</p>`;
|
| 251 |
+
|
| 252 |
+
return html`
|
| 253 |
+
<style>
|
| 254 |
+
@import url("https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&display=swap");
|
| 255 |
+
|
| 256 |
+
${[2015, 2016].includes(getYear()) &&
|
| 257 |
+
".navbar-fixed-top { z-index: 10000 }"}
|
| 258 |
+
${[2012].includes(getYear()) &&
|
| 259 |
+
"body { top: 2.5em } #check-answer, #shortcuts { z-index: 10000 !important }"}
|
| 260 |
+
${[2006].includes(getYear()) && 'img[alt="Check Answer"] { display: none }'}
|
| 261 |
+
</style>
|
| 262 |
+
<div class=${wrapper}>
|
| 263 |
+
<button class=${button} onClick=${onClick}>
|
| 264 |
+
Check your answers spoiler-free
|
| 265 |
+
</button>
|
| 266 |
+
${open &&
|
| 267 |
+
html`
|
| 268 |
+
<div class=${dropdownWrapper}>
|
| 269 |
+
<div class=${dropdown}>
|
| 270 |
+
<p>${feedback}</p>
|
| 271 |
+
<div class=${responses}>${body}</div>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
`}
|
| 275 |
+
</div>
|
| 276 |
+
`;
|
| 277 |
+
};
|
| 278 |
+
|
| 279 |
+
const data = await getData();
|
| 280 |
+
const prompts = getAnswers(data, document.URL);
|
| 281 |
+
render(html`<${CheckButton} prompts=${prompts} />`, container);
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_5.html/index.html
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>ACMECorp: Section 2</title>
|
| 5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6 |
+
</head>
|
| 7 |
+
|
| 8 |
+
<body bgcolor=white><!--CUT--><div align=right><small><a href="../../solutions/m2.html">(Meta-puzzle solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 10 |
+
<tr>
|
| 11 |
+
<td><img src="images/head2.jpg"></td>
|
| 12 |
+
</tr>
|
| 13 |
+
</table>
|
| 14 |
+
<p><strong><font face="Arial">Section 2</font></strong></p>
|
| 15 |
+
|
| 16 |
+
<i>Yesterday the boss went to the theatre. You ask around, and eventually the guy in the cloakroom nods and says, "Hey, yeah, I remember him. Big tipper. Forgot to pick this book up when he left--sort of a scrapbook." You open it; mostly it's meaningless old photos of vacations and such, but there's one page with the following on it:
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<table border="1" align="center" cellspacing="0" cellpadding="10">
|
| 21 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 22 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 23 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 24 |
+
</table>
|
| 25 |
+
|
| 26 |
+
<p>
|
| 27 |
+
|
| 28 |
+
Some puzzles have been paper-clipped to this page.</i>
|
| 29 |
+
|
| 30 |
+
<p><ol>
|
| 31 |
+
<li><a href="2_1.html">Company Picnic</a></li>
|
| 32 |
+
<li><a href="2_2.html">Shredded What?</a></li>
|
| 33 |
+
<li><a href="2_3.html">Abducted!</a></li>
|
| 34 |
+
<li><a href="2_4.html">That Mixer</a></li>
|
| 35 |
+
<li><a href="2_5.html">The Road Signs of Unspeakable Chaos</a></li>
|
| 36 |
+
<li><a href="2_6.html">Stairway to Heaven</a></li>
|
| 37 |
+
<li><a href="2_7.html">A Problem With Printing</a></li>
|
| 38 |
+
<li><a href="2_8.html">What's Green, Hangs on the Wall, and Whistles?</a></li>
|
| 39 |
+
</ol>
|
| 40 |
+
</p>
|
| 41 |
+
<p> </p>
|
| 42 |
+
<p> </p>
|
| 43 |
+
<p> </p>
|
| 44 |
+
<p> </p>
|
| 45 |
+
<p> </p>
|
| 46 |
+
<a href="../index.html">Back to the index</a>
|
| 47 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 48 |
+
<tr>
|
| 49 |
+
<td><img src="images/foot2.jpg"></td>
|
| 50 |
+
</tr>
|
| 51 |
+
</table>
|
| 52 |
+
</font>
|
| 53 |
+
</body><script type="module" src="/checkanswer.js"></script>
|
| 54 |
+
</html>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_5.html/realm.html
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>Solution: The Realm of Unspeakable Chaos</title>
|
| 5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6 |
+
<meta name="robots" content="noindex, nofollow">
|
| 7 |
+
</head>
|
| 8 |
+
|
| 9 |
+
<body bgcolor="#FFFFFF" text="000000" link="#FF0000" vlink="#330033"
|
| 10 |
+
alink="#CCCC00">
|
| 11 |
+
|
| 12 |
+
<h3><font face="Verdana, Arial, Helvetica, sans-serif">
|
| 13 |
+
<font color="ff0000">
|
| 14 |
+
Solution:
|
| 15 |
+
</font>
|
| 16 |
+
The Realm of Unspeakable Chaos
|
| 17 |
+
</font></h3>
|
| 18 |
+
<p><font face="Verdana, Arial, Helvetica, sans-serif"><i>Written by
|
| 19 |
+
Kevin Wald
|
| 20 |
+
</i></font></p>
|
| 21 |
+
|
| 22 |
+
<font face="Verdana, Arial, Helvetica, sans-serif">
|
| 23 |
+
<p>
|
| 24 |
+
The text under the flags describes them in some unknown language;
|
| 25 |
+
from this, the vocabulary and grammar of the language can be determined
|
| 26 |
+
to a considerable extent.
|
| 27 |
+
(<a href="chaotic.html">Here</a> is a dictionary and grammar for the language.)
|
| 28 |
+
</p>
|
| 29 |
+
<p>
|
| 30 |
+
Only one flag is not described -- the flag that has been displaced
|
| 31 |
+
from the array of flags. It can be found further down the page,
|
| 32 |
+
as the white box with the horizontal black bar. The description
|
| 33 |
+
of this flag is
|
| 34 |
+
<blockquote>
|
| 35 |
+
Nastare dryl prasu ut
|
| 36 |
+
</blockquote>
|
| 37 |
+
(That is, "on a white background, one black horizontal bar"). This
|
| 38 |
+
description has eighteen letters; when these are entered in the
|
| 39 |
+
eighteen numbered boxes (nth letter in box n), they spell
|
| 40 |
+
<blockquote>
|
| 41 |
+
<table>
|
| 42 |
+
<tr><td><center>
|
| 43 |
+
<font face="Verdana, Arial, Helvetica, sans-serif">
|
| 44 |
+
UDYRU<br>
|
| 45 |
+
STARLET<br>
|
| 46 |
+
PAN - SAR
|
| 47 |
+
</font>
|
| 48 |
+
</center></td></tr>
|
| 49 |
+
</table>
|
| 50 |
+
</blockquote>
|
| 51 |
+
Since a <u>duru</u> is an inverted T-shape, an <u>udyru</u> is an inverted
|
| 52 |
+
inverted T-shape -- that is, a right-side-up T. A starlet (small
|
| 53 |
+
star) is a <u>wodel</u> (<u>woda</u>, "star", with the diminutive suffix).
|
| 54 |
+
Finally, <u>pan</u> (7) minus <u>sar</u> (4) equals <u>tas</u> (3). Thus, in
|
| 55 |
+
the boxes on the right we enter
|
| 56 |
+
<blockquote>
|
| 57 |
+
<table>
|
| 58 |
+
<tr><td><center>
|
| 59 |
+
<font face="Verdana, Arial, Helvetica, sans-serif">
|
| 60 |
+
T<br>
|
| 61 |
+
WODEL<br>
|
| 62 |
+
TAS
|
| 63 |
+
</font>
|
| 64 |
+
</center></td></tr>
|
| 65 |
+
</table>
|
| 66 |
+
</blockquote>
|
| 67 |
+
which, read in order with appropriate spacing, is TWO DELTAS.
|
| 68 |
+
A single capital-delta shape is an <u>uta</u>, so two of them are
|
| 69 |
+
<u>unte am</u>, and the solution to this puzzle is (appropriately
|
| 70 |
+
to the scenario described) <b>unteam</b>.
|
| 71 |
+
</p>
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
</font>
|
| 75 |
+
|
| 76 |
+
</body>
|
| 77 |
+
</html>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_5.html/road-signs.html
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Lance Nathan">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="me typing damnit">
|
| 7 |
+
<TITLE>The Road Trip Of Unspeakable Chaos</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff">
|
| 10 |
+
|
| 11 |
+
<h2>M Puzzle: The Road Signs of Unspeakable Chaos</h2>
|
| 12 |
+
<h3>by Dean Sturtevant</h3>
|
| 13 |
+
|
| 14 |
+
<p>
|
| 15 |
+
|
| 16 |
+
The <a href="road-signs.txt">accompanying perl script</a> generates all MD5 base 64 encodings of the 275520 legal road signs, together with the description in the road sign language and a compact description. It only prints out a small (but relevant!) sublist. When run, it yields the following output:
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<pre>gqw3TySaYqOTZW9XCB6thg dralre nasti olo ot py nasty duru ut pe naste mala B 1Wo1Wd Wm
|
| 21 |
+
gqxBkD1hviJa381RtX9j/w suldare dryl pratu ut py drel fruta at pe mage uyta pe drel mala R 1Bp1Bf Yiu Bm
|
| 22 |
+
gqxKTxx27GEzTxtjUpPk4A nastare mage fruta at py suldy pratu ut pe sulde uta pe mage amela W 1Yf1Rp Ru Yim
|
| 23 |
+
gqz+CTdlImCyoyQzcNFiOg dralre suldy pratu ut py magi olo ot pe suldi babo pe naste amela B 1Rp1Yo Rb Wim
|
| 24 |
+
gqzmnPNDcGEKJt8fIGgBOg nastare magi gruto ot py dril gruto ot pe sulde uyta pe mage mala W 1Yg1Bg Riu Ym
|
| 25 |
+
gqzriZm+YEqx8oDacUHayQ suldare mage fruta at py magi oilo ot pe naste uta pe drel amela R 1Yf1Yio Wu Bim
|
| 26 |
+
gr+v34NhI4T9a5xTI8LD0Q magare suldy duru ut py nasty udyru ut pe suldy fogu pe sulde mala Y 1Rd1Wid Rf Rm
|
| 27 |
+
gr/sdITCktBydDcIlBLoHw magare nasti gruto ot py naste fruta at pe drel uyta pe naste mala Y 1Wg1Wf Biu Wm
|
| 28 |
+
gr3/eyWh5JUmWzF7mZAbsA suldare magi oilo ot py magy zudu ut pe mage uta pe drel mala R 1Yio1Yz Yu Bm
|
| 29 |
+
gr3gR93YoDeLF7L7dM0Wiw nastare suldi gruto ot py magi gruto ot pe mage uyta pe drel mala W 1Rg1Yg Yiu Bm
|
| 30 |
+
gr6SEwiuvvtnLTnDmTJVOA magare suldi gruto ot py suldi oilo ot pe sulde uyta pe naste mala Y 1Rg1Rio Riu Wm
|
| 31 |
+
gr6xFSKEedh0kunf/C9alQ nastare suldi olo ot py suldy udyru ut pe dryl fogu pe mage amela W 1Ro1Rid Bf Yim
|
| 32 |
+
gr70tH6I3oyBNyFW1s0GlQ magare dryl udyru ut py nasti oilo ot pe drel uyta Y 1Bid1Wio Biu
|
| 33 |
+
gr9bzpI1aPsbgfOsbRX98g nastare mage fruta at py mage ufryta at pe suldy fogu pe sulde amela W 1Yf1Yif Rf Rim
|
| 34 |
+
gr9cOWNd5b8sDWz3YbwV9Q magare suldi oilo ot py nasti oilo ot pe sulde uyta Y 1Rio1Wio Riu
|
| 35 |
+
grA2xnaxe8GlSO/YrWAE0w nastare dril olo ot pe sulde uta W 1Bo Ru
|
| 36 |
+
grCMaV9cB7YM8kDhf4K3xg dralre suldi gruto ot py nasty duru ut pe suldy fogu pe naste amela B 1Rg1Wd Rf Wim
|
| 37 |
+
grCZNqWWyGjV2fyyWxdR5Q dralre magy pratu ut py suldy zudu ut pe magy fogu pe mage mala B 1Yp1Rz Yf Ym
|
| 38 |
+
grDcIugVWW0R2M34SXaIuw suldare nasti oilo ot py nasty duru ut pe mage uyta pe drel mala R 1Wio1Wd Yiu Bm
|
| 39 |
+
grDfuHzmv0XvSY4ERe+pLw dralre suldi gruto ot py mage ufryta at pe naste uta pe mage amela B 1Rg1Yif Wu Yim
|
| 40 |
+
grF9z2T5PcHp3EsfyabXRw nastare dryl zudu ut py suldi olo ot pe dril babo pe mage amela W 1Bz1Ro Bb Yim
|
| 41 |
+
grFYmMyMT75nN0e24emvZg magare dryl udyru ut py dril oilo ot pe sulde uyta pe naste mala Y 1Bid1Bio Riu Wm
|
| 42 |
+
grI9jSn9qLQnu9lPg/OcOg nastare dril gruto ot py mage fruta at pe magy fogu pe drel amela W 1Bg1Yf Yf Bim
|
| 43 |
+
grIM8KuZ/DVQAUi4B2LYyA suldare dryl zudu ut py nasty udyru ut pe mage uta pe drel mala R 1Bz1Wid Yu Bm
|
| 44 |
+
grImxRqljI33A+jZVI7rdg suldare nasti gruto ot py mage ufryta at pe mage uta pe mage mala R 1Wg1Yif Yu Ym
|
| 45 |
+
</pre>
|
| 46 |
+
|
| 47 |
+
<p>
|
| 48 |
+
|
| 49 |
+
The line in this list which does not correspond to a line in the puzzle is: <strong>grA2xnaxe8GlSO/YrWAE0w nastare dril olo ot pe sulde uta W 1Bo Ru</strong>. The full description of the missing sign is thus:
|
| 50 |
+
|
| 51 |
+
<p>
|
| 52 |
+
|
| 53 |
+
On a white background, a black Y-shape in a red upward-pointing triangle.
|
| 54 |
+
|
| 55 |
+
<p align=center><img src="../images/sign.gif"></p>
|
| 56 |
+
|
| 57 |
+
</BODY>
|
| 58 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_6.html/2_6.html
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Document Archivists">
|
| 6 |
+
<TITLE>Stairway to Heaven</TITLE>
|
| 7 |
+
</HEAD>
|
| 8 |
+
<BODY BGCOLOR="#ffffff"><!--CUT--><div align=right><small><a href="../../solutions/what-goes-around.html">(Solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
<table width="100%">
|
| 10 |
+
<tr>
|
| 11 |
+
<td><img src="images/head2.jpg"></td>
|
| 12 |
+
</tr>
|
| 13 |
+
</table>
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
<h2>Document 2.6: Stairway to Heaven</h2>
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<em>Tucked into the album is a sheet of rather strange descriptions.
|
| 21 |
+
You'd think your boss could have used standard notation! Oh, well; if
|
| 22 |
+
you don't know what one of these is, you can always look it up. At
|
| 23 |
+
least he wrote down the times with surgical precision.</em>
|
| 24 |
+
|
| 25 |
+
<p>
|
| 26 |
+
|
| 27 |
+
Hmmmm....looks like adagio to me, we'll call it quarter note equals 66.
|
| 28 |
+
|
| 29 |
+
<p>
|
| 30 |
+
|
| 31 |
+
<table align="center" cellpadding="5">
|
| 32 |
+
<tr><td><font face="arial">0.909s</td><td><font face="arial">Highest pitch in Queen of the Night's famous aria, 3 8vb</td></tr>
|
| 33 |
+
<tr><td><font face="arial">0.909s</td><td><font face="arial">Mi in fixed do, first octave below middle c</td></tr>
|
| 34 |
+
<tr><td><font face="arial">0.606s</td><td><font face="arial">174.60614</td></tr>
|
| 35 |
+
<tr><td><font face="arial">0.606s</td><td><font face="arial">If this were sharp, it would be the devil in music above answer for the twelfth clue</td></tr>
|
| 36 |
+
<tr><td><font face="arial">0.606s</td><td><font face="arial">the answer for the second clue is dominant to this</td></tr>
|
| 37 |
+
<tr><td><font face="arial">0.606s</td><td><font face="arial">absolutely nothing</td></tr>
|
| 38 |
+
<tr><td><font face="arial">0.606s</td><td><font face="arial">MIDI 55</td></tr>
|
| 39 |
+
<tr><td><font face="arial">0.606s</td><td><font face="arial">lowest note on a bassoon, 2 8va</td></tr>
|
| 40 |
+
<tr><td><font face="arial">0.606s</td><td><font face="arial">orchestra tuning note, 8vb</td></tr>
|
| 41 |
+
<tr><td><font face="arial">0.606s</td><td><font face="arial">twelfth root of 2 times the answer to the second clue</td></tr>
|
| 42 |
+
<tr><td><font face="arial">0.606s</td><td><font face="arial">8vb of <a href="images/2_6.gif">this</a></td></tr>
|
| 43 |
+
<tr><td><font face="arial">0.606s</td><td><font face="arial">most common clarinet, lowest note, concert pitch</td></tr>
|
| 44 |
+
<tr><td><font face="arial">0.606s</td><td><font face="arial">if this were sharped, it would be the leading tone for the answer to clue 7</td></tr>
|
| 45 |
+
<tr><td><font face="arial">0.606s</td><td><font face="arial">if the answer to the third clue is shadj, this is shuddha rishabh</td></tr>
|
| 46 |
+
<tr><td><font face="arial">0.909s</td><td><font face="arial">in a dominant seventh chord, root position, where the lowest note is the answer to clue twelve, this is the third note from the bottom</td></tr>
|
| 47 |
+
<tr><td colspan="2"><em>answer belongs here</em></td></tr>
|
| 48 |
+
<tr><td><font face="arial">2.727s</td><td><font face="arial">lowest note on a violin</td></tr>
|
| 49 |
+
</table>
|
| 50 |
+
|
| 51 |
+
<p>
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
<p><br><p>
|
| 56 |
+
|
| 57 |
+
<a href="index.html">Back to the index</a>
|
| 58 |
+
<table width="100%">
|
| 59 |
+
<tr>
|
| 60 |
+
<td><img src="images/foot2.jpg"></td>
|
| 61 |
+
</tr>
|
| 62 |
+
</table>
|
| 63 |
+
|
| 64 |
+
</body>
|
| 65 |
+
<script type="module" src="/checkanswer.js"></script>
|
| 66 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_6.html/checkanswer.js
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Do this first so that layout shift isn't too bad:
|
| 2 |
+
const container = document.createElement("div");
|
| 3 |
+
container.style = `
|
| 4 |
+
font-size: 16px;
|
| 5 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 6 |
+
height: 2.5em;
|
| 7 |
+
`;
|
| 8 |
+
document.body.prepend(container);
|
| 9 |
+
|
| 10 |
+
import { React, html, css, render } from "./package.js";
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Remove non-alphanumeric characters.
|
| 14 |
+
*/
|
| 15 |
+
const normalizeAnswer = (answer) => {
|
| 16 |
+
if (getYear() === 2003) {
|
| 17 |
+
if (document.URL.includes("teamGuest/2")) {
|
| 18 |
+
// Special case: 2003 R2, whose answers are emoji.
|
| 19 |
+
return answer.trim();
|
| 20 |
+
} else if (document.URL.includes("6_3")) {
|
| 21 |
+
// Special case: Answer is literal Greek letter.
|
| 22 |
+
return answer.trim();
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
return answer.toUpperCase().replaceAll(/[^A-Z0-9]/g, "");
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Returns the year of the hunt we're in.
|
| 30 |
+
*/
|
| 31 |
+
const getYear = () => {
|
| 32 |
+
return Number(RegExp(`^.*/([0-9]{4})/.*$`).exec(document.URL)?.[1] ?? 0);
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Fetches the answers as a list of {url, answer, prompt, intermediate}.
|
| 37 |
+
*/
|
| 38 |
+
const getData = async () => {
|
| 39 |
+
const res = await fetch("/answers.tsv");
|
| 40 |
+
const data = await res.text();
|
| 41 |
+
const [header, ...body] = data.split("\n");
|
| 42 |
+
const headers = header.trim().split("\t");
|
| 43 |
+
return body.map((row) => {
|
| 44 |
+
const res = {};
|
| 45 |
+
row.split("\t").forEach((item, i) => {
|
| 46 |
+
res[headers[i]] = item.trim();
|
| 47 |
+
});
|
| 48 |
+
return res;
|
| 49 |
+
});
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Gets the base URL; removes trailing index.html and .html, removes everything
|
| 54 |
+
* before the year, and then removes trailing slash.
|
| 55 |
+
*/
|
| 56 |
+
const getBase = (url) => {
|
| 57 |
+
const root =
|
| 58 |
+
RegExp(`^(.*/)index.html`).exec(url)?.[1] ??
|
| 59 |
+
RegExp(`^(.*).html`).exec(url)?.[1] ??
|
| 60 |
+
url;
|
| 61 |
+
const base = RegExp(`^.*/([0-9]{4}/.*)$`).exec(root)?.[1] ?? root;
|
| 62 |
+
return base.endsWith("/") ? base.slice(0, -1) : base;
|
| 63 |
+
};
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* Get all rows in the data corresponding to a given URL. Group by same prompt.
|
| 67 |
+
*/
|
| 68 |
+
const getAnswers = (data, url) => {
|
| 69 |
+
const base = getBase(url);
|
| 70 |
+
const rows = data.filter((row) => getBase(row.url) === base);
|
| 71 |
+
const prompts = [];
|
| 72 |
+
for (const row of rows) {
|
| 73 |
+
const { prompt } = row;
|
| 74 |
+
const group = prompts.find((group) => group.prompt === prompt);
|
| 75 |
+
if (group) {
|
| 76 |
+
group.rows.push(row);
|
| 77 |
+
} else {
|
| 78 |
+
prompts.push({ prompt, rows: [row] });
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
return prompts;
|
| 82 |
+
};
|
| 83 |
+
|
| 84 |
+
/**
|
| 85 |
+
* A single textbox and submit button in the rows of possible responses.
|
| 86 |
+
*/
|
| 87 |
+
const ResponseRow = ({ prompt, rows, setFeedback }) => {
|
| 88 |
+
const [response, setResponse] = React.useState("");
|
| 89 |
+
|
| 90 |
+
const form = css`
|
| 91 |
+
align-items: baseline;
|
| 92 |
+
display: flex;
|
| 93 |
+
justify-content: right;
|
| 94 |
+
margin-bottom: 0.5em;
|
| 95 |
+
|
| 96 |
+
@media (max-width: 600px) {
|
| 97 |
+
align-items: flex-start;
|
| 98 |
+
flex-direction: column;
|
| 99 |
+
}
|
| 100 |
+
`;
|
| 101 |
+
|
| 102 |
+
const input = css`
|
| 103 |
+
background: #fafafa;
|
| 104 |
+
border: 1px solid #aaa;
|
| 105 |
+
border-radius: 2px;
|
| 106 |
+
color: #121212;
|
| 107 |
+
font-family: inherit;
|
| 108 |
+
font-size: 100%;
|
| 109 |
+
line-height: 1.2;
|
| 110 |
+
margin: 0 0.5em;
|
| 111 |
+
padding: 0.25em 0.5em;
|
| 112 |
+
|
| 113 |
+
@media (max-width: 600px) {
|
| 114 |
+
margin: 0 0 0.25em;
|
| 115 |
+
}
|
| 116 |
+
`;
|
| 117 |
+
|
| 118 |
+
const onSubmit = (e) => {
|
| 119 |
+
e.preventDefault();
|
| 120 |
+
let set = false;
|
| 121 |
+
for (const row of rows) {
|
| 122 |
+
const correct = normalizeAnswer(row.answer) === normalizeAnswer(response);
|
| 123 |
+
if (correct) {
|
| 124 |
+
setFeedback(
|
| 125 |
+
row.intermediate?.trim() === "TRUE"
|
| 126 |
+
? "Correct! See the solution page for the answer."
|
| 127 |
+
: `Solved! The answer was ${row.answer}.`
|
| 128 |
+
);
|
| 129 |
+
set = true;
|
| 130 |
+
break;
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
if (!set) {
|
| 134 |
+
setFeedback("Incorrect.");
|
| 135 |
+
}
|
| 136 |
+
};
|
| 137 |
+
|
| 138 |
+
const onChange = (e) => setResponse(e.target.value);
|
| 139 |
+
|
| 140 |
+
return html`
|
| 141 |
+
<form class=${form} onSubmit=${onSubmit}>
|
| 142 |
+
<label htmlFor=${prompt + " prompt"}>
|
| 143 |
+
${prompt || "Enter your guess"}:
|
| 144 |
+
</label>
|
| 145 |
+
<input
|
| 146 |
+
class=${input}
|
| 147 |
+
id=${prompt + " prompt"}
|
| 148 |
+
onChange=${onChange}
|
| 149 |
+
required
|
| 150 |
+
type="text"
|
| 151 |
+
value=${response}
|
| 152 |
+
/>
|
| 153 |
+
<button type="submit">Submit</button>
|
| 154 |
+
</form>
|
| 155 |
+
`;
|
| 156 |
+
};
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* Check answer button, rendered at top of page.
|
| 160 |
+
*/
|
| 161 |
+
const CheckButton = ({ prompts }) => {
|
| 162 |
+
const [open, setOpen] = React.useState(false);
|
| 163 |
+
const [feedback, setFeedback] = React.useState("Call in an answer.");
|
| 164 |
+
|
| 165 |
+
const wrapper = css`
|
| 166 |
+
font-family: "PT Sans", sans-serif;
|
| 167 |
+
font-size: 16px;
|
| 168 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 169 |
+
height: 2.5em;
|
| 170 |
+
|
| 171 |
+
button {
|
| 172 |
+
background: #555;
|
| 173 |
+
border: none;
|
| 174 |
+
border-radius: 2px;
|
| 175 |
+
color: #fff;
|
| 176 |
+
cursor: pointer;
|
| 177 |
+
display: inline-block;
|
| 178 |
+
font-size: 1em;
|
| 179 |
+
font-family: "PT Sans", sans-serif;
|
| 180 |
+
font-weight: bold;
|
| 181 |
+
line-height: 1.2;
|
| 182 |
+
padding: 0.25em 1em;
|
| 183 |
+
text-align: center;
|
| 184 |
+
text-decoration: none;
|
| 185 |
+
text-transform: none;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
p {
|
| 189 |
+
margin: 0 0 1em;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
a {
|
| 193 |
+
color: inherit !important;
|
| 194 |
+
}
|
| 195 |
+
`;
|
| 196 |
+
|
| 197 |
+
const btnTop = [2015, 2016].includes(getYear())
|
| 198 |
+
? "50px"
|
| 199 |
+
: [2012].includes(getYear())
|
| 200 |
+
? "-2.5em"
|
| 201 |
+
: "0px";
|
| 202 |
+
|
| 203 |
+
const button = css`
|
| 204 |
+
box-sizing: border-box;
|
| 205 |
+
height: 2.5em;
|
| 206 |
+
left: 0;
|
| 207 |
+
position: absolute;
|
| 208 |
+
top: ${btnTop};
|
| 209 |
+
width: 100%;
|
| 210 |
+
z-index: 9999;
|
| 211 |
+
`;
|
| 212 |
+
|
| 213 |
+
const dropdownWrapper = css`
|
| 214 |
+
background: #edeff0;
|
| 215 |
+
color: #121212;
|
| 216 |
+
left: 0;
|
| 217 |
+
position: absolute;
|
| 218 |
+
right: 0;
|
| 219 |
+
top: calc(2.5em + ${btnTop});
|
| 220 |
+
z-index: 9999;
|
| 221 |
+
`;
|
| 222 |
+
|
| 223 |
+
const dropdown = css`
|
| 224 |
+
margin: 0 auto;
|
| 225 |
+
max-width: 40em;
|
| 226 |
+
padding: 1em;
|
| 227 |
+
z-index: 9999;
|
| 228 |
+
`;
|
| 229 |
+
|
| 230 |
+
const responses = css`
|
| 231 |
+
margin: 0 auto;
|
| 232 |
+
width: fit-content;
|
| 233 |
+
|
| 234 |
+
@media (max-width: 600px) {
|
| 235 |
+
width: auto;
|
| 236 |
+
}
|
| 237 |
+
`;
|
| 238 |
+
|
| 239 |
+
const onClick = () => setOpen(!open);
|
| 240 |
+
|
| 241 |
+
const body =
|
| 242 |
+
prompts.length > 0
|
| 243 |
+
? prompts.map(
|
| 244 |
+
(group) =>
|
| 245 |
+
html`<${ResponseRow} setFeedback=${setFeedback} ...${group} />`
|
| 246 |
+
)
|
| 247 |
+
: html`<p>
|
| 248 |
+
No answers found on this page. Please report this to${" "}
|
| 249 |
+
<a href="mailto:puzzle@mit.edu">puzzle@mit.edu</a>.
|
| 250 |
+
</p>`;
|
| 251 |
+
|
| 252 |
+
return html`
|
| 253 |
+
<style>
|
| 254 |
+
@import url("https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&display=swap");
|
| 255 |
+
|
| 256 |
+
${[2015, 2016].includes(getYear()) &&
|
| 257 |
+
".navbar-fixed-top { z-index: 10000 }"}
|
| 258 |
+
${[2012].includes(getYear()) &&
|
| 259 |
+
"body { top: 2.5em } #check-answer, #shortcuts { z-index: 10000 !important }"}
|
| 260 |
+
${[2006].includes(getYear()) && 'img[alt="Check Answer"] { display: none }'}
|
| 261 |
+
</style>
|
| 262 |
+
<div class=${wrapper}>
|
| 263 |
+
<button class=${button} onClick=${onClick}>
|
| 264 |
+
Check your answers spoiler-free
|
| 265 |
+
</button>
|
| 266 |
+
${open &&
|
| 267 |
+
html`
|
| 268 |
+
<div class=${dropdownWrapper}>
|
| 269 |
+
<div class=${dropdown}>
|
| 270 |
+
<p>${feedback}</p>
|
| 271 |
+
<div class=${responses}>${body}</div>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
`}
|
| 275 |
+
</div>
|
| 276 |
+
`;
|
| 277 |
+
};
|
| 278 |
+
|
| 279 |
+
const data = await getData();
|
| 280 |
+
const prompts = getAnswers(data, document.URL);
|
| 281 |
+
render(html`<${CheckButton} prompts=${prompts} />`, container);
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_6.html/index.html
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>ACMECorp: Section 2</title>
|
| 5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6 |
+
</head>
|
| 7 |
+
|
| 8 |
+
<body bgcolor=white><!--CUT--><div align=right><small><a href="../../solutions/m2.html">(Meta-puzzle solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 10 |
+
<tr>
|
| 11 |
+
<td><img src="images/head2.jpg"></td>
|
| 12 |
+
</tr>
|
| 13 |
+
</table>
|
| 14 |
+
<p><strong><font face="Arial">Section 2</font></strong></p>
|
| 15 |
+
|
| 16 |
+
<i>Yesterday the boss went to the theatre. You ask around, and eventually the guy in the cloakroom nods and says, "Hey, yeah, I remember him. Big tipper. Forgot to pick this book up when he left--sort of a scrapbook." You open it; mostly it's meaningless old photos of vacations and such, but there's one page with the following on it:
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<table border="1" align="center" cellspacing="0" cellpadding="10">
|
| 21 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 22 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 23 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 24 |
+
</table>
|
| 25 |
+
|
| 26 |
+
<p>
|
| 27 |
+
|
| 28 |
+
Some puzzles have been paper-clipped to this page.</i>
|
| 29 |
+
|
| 30 |
+
<p><ol>
|
| 31 |
+
<li><a href="2_1.html">Company Picnic</a></li>
|
| 32 |
+
<li><a href="2_2.html">Shredded What?</a></li>
|
| 33 |
+
<li><a href="2_3.html">Abducted!</a></li>
|
| 34 |
+
<li><a href="2_4.html">That Mixer</a></li>
|
| 35 |
+
<li><a href="2_5.html">The Road Signs of Unspeakable Chaos</a></li>
|
| 36 |
+
<li><a href="2_6.html">Stairway to Heaven</a></li>
|
| 37 |
+
<li><a href="2_7.html">A Problem With Printing</a></li>
|
| 38 |
+
<li><a href="2_8.html">What's Green, Hangs on the Wall, and Whistles?</a></li>
|
| 39 |
+
</ol>
|
| 40 |
+
</p>
|
| 41 |
+
<p> </p>
|
| 42 |
+
<p> </p>
|
| 43 |
+
<p> </p>
|
| 44 |
+
<p> </p>
|
| 45 |
+
<p> </p>
|
| 46 |
+
<a href="../index.html">Back to the index</a>
|
| 47 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 48 |
+
<tr>
|
| 49 |
+
<td><img src="images/foot2.jpg"></td>
|
| 50 |
+
</tr>
|
| 51 |
+
</table>
|
| 52 |
+
</font>
|
| 53 |
+
</body><script type="module" src="/checkanswer.js"></script>
|
| 54 |
+
</html>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_6.html/what-goes-around.html
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Lance Nathan">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="me typing damnit">
|
| 7 |
+
<TITLE>Stairway to Heaven</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff">
|
| 10 |
+
|
| 11 |
+
<h2>M Puzzle: Stairway to Heaven</h2>
|
| 12 |
+
<h3>by Rebecca Christianson</h3>
|
| 13 |
+
|
| 14 |
+
<p>
|
| 15 |
+
|
| 16 |
+
The notes are:
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<dl>
|
| 21 |
+
<dt>Highest pitch in Queen of the Night's famous aria, 3 8vb</dt>
|
| 22 |
+
<dd>Famously high note, highest in common repertoire. Every soprano in
|
| 23 |
+
existence knows this is a high F, third octave above middle c. 3 8vb
|
| 24 |
+
says to take that down three octaves, which lands the F in the octave
|
| 25 |
+
below middle c.</dd>
|
| 26 |
+
<dt> 0.909s Mi in fixed do, first octave below middle c</dt>
|
| 27 |
+
<dd>In fixed do solfege, do is always c, so mi is e.</dd>
|
| 28 |
+
<dt> 0.6s 174.614</dt>
|
| 29 |
+
<dd>This is a frequency, which corresponds to the F below middle c</dd>
|
| 30 |
+
<dt> 0.6s If this were sharp, it would be the devil in music above answer for the twelfth clue</dt>
|
| 31 |
+
<dd>Devil in music (diablo in musica) is the term from the renaissance for the tritone interval, which was considered to be so dissonant as to obviously be evil. A tritone is an augmented fourth, the twelfth clue gives you D below middle c, so tritone above is a G#, so this is a G.</dd>
|
| 32 |
+
<dt> 0.6s the answer for the second clue is dominant to this</dt>
|
| 33 |
+
<dd>The dominant pitch for a key is the fifth of the scale, so E (the second
|
| 34 |
+
clue) is dominant to A. Which A you choose is a little arbitrary, but the
|
| 35 |
+
most common leading behavior is the dominant below the tonic, so hopefully
|
| 36 |
+
people will choose that one, if not, its not a big deal, it shouldn't
|
| 37 |
+
change the answer at all.</dd>
|
| 38 |
+
<dt> 0.6s absolutely nothing</dt>
|
| 39 |
+
<dd>It's a rest, of course</dd>
|
| 40 |
+
<dt> 0.6s MIDI 55</dt>
|
| 41 |
+
<dd>MIDI pitches all have numbers. This one is G below middle C.</dd>
|
| 42 |
+
<dt> 0.6s lowest note on a bassoon, 2 8va</dt>
|
| 43 |
+
<dd>Lowest note on a bassoon is Bb, in the third octave below middle c.
|
| 44 |
+
2 8va is two octaves up, which also puts this in the first octave
|
| 45 |
+
below middle c.</dd>
|
| 46 |
+
<dt> 0.6s orchestra tuning note, 8vb</dt>
|
| 47 |
+
<dd>Oboe plays the orchestra tuning A in the first octave above middle c. One octave lower puts it in the octave below middle c.</dd>
|
| 48 |
+
<dt>0.6s twelfth root of 2 times the answer to the second clue</dt>
|
| 49 |
+
<dd>Half steps correspond to a frequency multiplier of the twelfth root of two in the equal tempered system currently in use. Half step above E (clue two) is F.</dd>
|
| 50 |
+
<dt>0.6s 8vb of *this* (link in attached gif)</dt>
|
| 51 |
+
<dd>This is an oboe fingering of middle C. One octave below is the c below middle C.</dd>
|
| 52 |
+
<dt>0.6s most common clarinet, lowest note, concert pitch</dt>
|
| 53 |
+
<dd>Most common clarinet is a Bb clarinet, and its lowest note is a D in concert pitch (written, it's a different note, since Bb refers to the written key of the clarinet).</dd>
|
| 54 |
+
<dt> 0.6s if this were sharped, it would be the leading tone for the answer to clue 7</dt>
|
| 55 |
+
<dd>leading tone is the note half step below, so since clue 7 is a G, its leading tone is a Fsharp, so this is an F.</dd>
|
| 56 |
+
<dt>0.6s if the answer to the third clue is shadj, this is shuddha rishabh</dt>
|
| 57 |
+
<dd>This is from a north indian system of music which was written to be used on european harmoniums, which were incorporated into traditional indian music. It is a normal movable-do solfege type system, where shadj is do. A simple web search shows that shuddha rishabh is one whole step above shadj, so if shadj is F (clue 3) this is G.</dd>
|
| 58 |
+
<dt>0.909s in a dominant seventh chord, first inversion, where the lowest note is the answer to clue twelve, this is the third note from the bottom</dt>
|
| 59 |
+
<dd>Annoyingly, first inversion of a chord is no inversion whatsoever, so the dominant seventh chord from the bottom up, starting on D is D F# A C, the third note from the bottom is of course A.</dd>
|
| 60 |
+
<dt>this one is your answer</dt>
|
| 61 |
+
<dd>This one is the answer</dd>
|
| 62 |
+
<dt>2.727s lowest note on a violin</dt>
|
| 63 |
+
<dd>Lowest note on a violin is the open G string, which of course sounds a G.</dd>
|
| 64 |
+
</dl>
|
| 65 |
+
|
| 66 |
+
<p>
|
| 67 |
+
|
| 68 |
+
This is an excerpt from the Harbison canon that is on the glass panels of the railing on the second floor of the music library (hence the title). Basic music theory, history, trivia knowledge plus some googleing should get this whole list. The tempo marking at the beginning any musician should know is beats per minute; if you calculate what each duration in seconds corresponds to, you should get what the rhythm is.
|
| 69 |
+
|
| 70 |
+
<p>
|
| 71 |
+
|
| 72 |
+
The notes as they appear here should actually be: F E F G A (rest) G Bflat A F C D F G A (answer) G which is the first phrase accompanying the words "Veni, mentes tuorum visita." The missing note is a <b>B flat quarter note</b>.
|
| 73 |
+
|
| 74 |
+
<p align=center><img src="../images/bflat-quarter.jpg"></p>
|
| 75 |
+
|
| 76 |
+
<p>
|
| 77 |
+
|
| 78 |
+
Training:
|
| 79 |
+
|
| 80 |
+
<p>
|
| 81 |
+
|
| 82 |
+
The relevant training is HALVE ("Doctoring"). Halving a quarter note gives an <b>eighth note B flat</b>.
|
| 83 |
+
<p align=center><img src="../images/bflat-eighth.jpg"></p>
|
| 84 |
+
|
| 85 |
+
</BODY>
|
| 86 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_7.html/2_7.html
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="ACMECorp">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="Document Archivists">
|
| 7 |
+
<TITLE>A Problem with Printing</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff"><!--CUT--><div align=right><small><a href="../../solutions/a-problem-with-printing.html">(Solution)</a></small></div><!--CUT--><font face="arial">
|
| 10 |
+
|
| 11 |
+
<table width="100%">
|
| 12 |
+
<tr>
|
| 13 |
+
<td><img src="images/head2.jpg"></td>
|
| 14 |
+
</tr>
|
| 15 |
+
</table>
|
| 16 |
+
|
| 17 |
+
<h2>Document 2.7: A Problem With Printing</h2>
|
| 18 |
+
|
| 19 |
+
<p>
|
| 20 |
+
|
| 21 |
+
<em>"The technical support at Acme Corporation can be a real pain in the ass sometimes," your boss wrote at the top of this memo. "This is their idea of sending me the pictures I wanted. These are going to look terrible when I arrange them over that picture of a vase."</em>
|
| 22 |
+
|
| 23 |
+
<p>
|
| 24 |
+
|
| 25 |
+
Here are your pictures! -Printing Staff
|
| 26 |
+
|
| 27 |
+
<p>
|
| 28 |
+
|
| 29 |
+
<center><img src="images/a-problem-with-printing-1.png"> <img src="images/a-problem-with-printing-2.png"> <img src="images/a-problem-with-printing-3.png"> <img src="images/a-problem-with-printing-4.png"></center>
|
| 30 |
+
|
| 31 |
+
<p>
|
| 32 |
+
|
| 33 |
+
P.S. We're sorry to report that the processing instructions you sent us got mixed after we printed all but one of your pictures. Each individual set of instructions is still in order, but the five pictures' instructions are now <A href="images/a-problem-with-printing.ps">all in a single stack</A>. The four printed pictures are enclosed, as is the set of instructions. Again, we send our apologies and hope you will be able to reconstruct the final picture.
|
| 34 |
+
|
| 35 |
+
<p><br><p>
|
| 36 |
+
|
| 37 |
+
<a href="index.html">Back to the index</a>
|
| 38 |
+
|
| 39 |
+
<table width="100%">
|
| 40 |
+
<tr>
|
| 41 |
+
<td><img src="images/foot2.jpg"></td>
|
| 42 |
+
</tr>
|
| 43 |
+
</table>
|
| 44 |
+
</FONT>
|
| 45 |
+
</body>
|
| 46 |
+
<script type="module" src="/checkanswer.js"></script>
|
| 47 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_7.html/a-problem-with-printing.html
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="Lance Nathan">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="me typing damnit">
|
| 7 |
+
<TITLE>A Problem With Printing</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff">
|
| 10 |
+
|
| 11 |
+
<h2>M Puzzle: A Problem With Printing</h2>
|
| 12 |
+
<h3>by Denis and Marc Moskowitz</h3>
|
| 13 |
+
|
| 14 |
+
<p>
|
| 15 |
+
|
| 16 |
+
The provided file consists of 5 PostScript documents, shuffled together but not rearranged. Pulling out the postscript to create the provided images leaves the postscript for the answer.
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
The four postscript files to produce each of the four pictures are:
|
| 21 |
+
|
| 22 |
+
<p>
|
| 23 |
+
|
| 24 |
+
<pre>
|
| 25 |
+
%!
|
| 26 |
+
/check 0 def
|
| 27 |
+
check 0 eq {72 dup scale 8.5 2 div 11 2 div translate .25 dup scale /check 1 def} if
|
| 28 |
+
5 72 div setlinewidth
|
| 29 |
+
|
| 30 |
+
90 rotate
|
| 31 |
+
3 0 moveto
|
| 32 |
+
2 0 1 0 360 arc
|
| 33 |
+
1 0 moveto
|
| 34 |
+
-1 0 lineto
|
| 35 |
+
0.5 2 moveto
|
| 36 |
+
0.5 -2 lineto
|
| 37 |
+
-3 2 moveto
|
| 38 |
+
-1 0 lineto
|
| 39 |
+
-3 -2 lineto
|
| 40 |
+
stroke 0 0 moveto
|
| 41 |
+
|
| 42 |
+
showpage /check 0 def
|
| 43 |
+
</pre>
|
| 44 |
+
|
| 45 |
+
<p><hr width="50%"><p>
|
| 46 |
+
|
| 47 |
+
<pre>
|
| 48 |
+
%!
|
| 49 |
+
/check 0 def
|
| 50 |
+
check 0 eq {72 dup scale 8.5 2 div 11 2 div translate .25 dup scale /check 1 def} if
|
| 51 |
+
5 72 div setlinewidth
|
| 52 |
+
|
| 53 |
+
gsave
|
| 54 |
+
-3.5 dup translate
|
| 55 |
+
1 2 div setlinewidth
|
| 56 |
+
0.7 setgray
|
| 57 |
+
8 {
|
| 58 |
+
0 0 moveto
|
| 59 |
+
7 0 lineto
|
| 60 |
+
stroke 0 0 moveto
|
| 61 |
+
0 1 translate
|
| 62 |
+
} repeat
|
| 63 |
+
grestore 0 0 moveto
|
| 64 |
+
|
| 65 |
+
7 {
|
| 66 |
+
0 setgray
|
| 67 |
+
0 0 moveto
|
| 68 |
+
3 0 lineto
|
| 69 |
+
360 14 div rotate
|
| 70 |
+
1 0 lineto
|
| 71 |
+
closepath fill 0 0 moveto
|
| 72 |
+
0 1 1 sethsbcolor
|
| 73 |
+
0 0 moveto
|
| 74 |
+
1 0 lineto
|
| 75 |
+
360 14 div rotate
|
| 76 |
+
3 0 lineto
|
| 77 |
+
closepath fill 0 0 moveto
|
| 78 |
+
} repeat
|
| 79 |
+
|
| 80 |
+
showpage /check 0 def
|
| 81 |
+
</pre>
|
| 82 |
+
|
| 83 |
+
<p><hr width="50%"><p>
|
| 84 |
+
|
| 85 |
+
<pre>
|
| 86 |
+
%!
|
| 87 |
+
/check 0 def
|
| 88 |
+
check 0 eq {72 dup scale 8.5 2 div 11 2 div translate .25 dup scale /check 1 def} if
|
| 89 |
+
5 72 div setlinewidth
|
| 90 |
+
|
| 91 |
+
0 1 1 sethsbcolor
|
| 92 |
+
5 {
|
| 93 |
+
gsave
|
| 94 |
+
1 0.5 scale
|
| 95 |
+
2.5 0 moveto 1.5 0 1 0 360 arc fill 0 0 moveto
|
| 96 |
+
grestore 0 0 moveto
|
| 97 |
+
gsave
|
| 98 |
+
0 setgray
|
| 99 |
+
0 0 moveto
|
| 100 |
+
0.75 0 lineto
|
| 101 |
+
1 0 .25 180 90 arcn
|
| 102 |
+
1 0 .25 90 270 arc
|
| 103 |
+
stroke 0 0 moveto
|
| 104 |
+
grestore 0 0 moveto
|
| 105 |
+
currenthsbcolor 3 2 roll 1 5 div add 3 1 roll sethsbcolor
|
| 106 |
+
360 5 div rotate
|
| 107 |
+
} repeat
|
| 108 |
+
|
| 109 |
+
showpage /check 0 def
|
| 110 |
+
</pre>
|
| 111 |
+
|
| 112 |
+
<p><hr width="50%"><p>
|
| 113 |
+
|
| 114 |
+
<pre>
|
| 115 |
+
%!
|
| 116 |
+
/check 0 def
|
| 117 |
+
check 0 eq {72 dup scale 8.5 2 div 11 2 div translate .25 dup scale /check 1 def} if
|
| 118 |
+
5 72 div setlinewidth
|
| 119 |
+
|
| 120 |
+
0 1 .75 sethsbcolor
|
| 121 |
+
4 {
|
| 122 |
+
-1.25 0.5 moveto
|
| 123 |
+
-1.25 3 lineto
|
| 124 |
+
1.25 3 lineto
|
| 125 |
+
1.25 0.5 lineto
|
| 126 |
+
-1.25 0.5 lineto
|
| 127 |
+
stroke 0 0 moveto
|
| 128 |
+
currenthsbcolor 3 2 roll 1 8 div add 3 1 roll sethsbcolor
|
| 129 |
+
1.25 3 moveto
|
| 130 |
+
3 1.25 lineto
|
| 131 |
+
1.25 -0.5 lineto
|
| 132 |
+
-0.5 1.25 lineto
|
| 133 |
+
1.25 3 lineto
|
| 134 |
+
stroke 0 0 moveto
|
| 135 |
+
currenthsbcolor 3 2 roll 1 8 div add 3 1 roll sethsbcolor
|
| 136 |
+
360 4 div rotate
|
| 137 |
+
} repeat
|
| 138 |
+
|
| 139 |
+
showpage /check 0 def
|
| 140 |
+
</pre>
|
| 141 |
+
|
| 142 |
+
<p><hr width="50%"><p>
|
| 143 |
+
|
| 144 |
+
The file for the final answer is
|
| 145 |
+
|
| 146 |
+
<pre>
|
| 147 |
+
%!
|
| 148 |
+
/check 0 def
|
| 149 |
+
check 0 eq {72 dup scale 8.5 2 div 11 2 div translate .25 dup scale /check 1 def} if
|
| 150 |
+
5 72 div setlinewidth
|
| 151 |
+
|
| 152 |
+
3 {
|
| 153 |
+
5 6 div 1 .75 sethsbcolor
|
| 154 |
+
2 {
|
| 155 |
+
0 0 moveto 2 0 1 -120 120 arc closepath
|
| 156 |
+
fill 0 0 moveto
|
| 157 |
+
360 2 div rotate
|
| 158 |
+
} repeat
|
| 159 |
+
1 3 div 1 1 sethsbcolor
|
| 160 |
+
360 9 div -0.5 mul rotate
|
| 161 |
+
3 {
|
| 162 |
+
0 0 moveto
|
| 163 |
+
2 0 lineto
|
| 164 |
+
stroke 0 0 moveto
|
| 165 |
+
360 9 div 5 mul rotate
|
| 166 |
+
} repeat
|
| 167 |
+
360 9 div -2.5 mul rotate
|
| 168 |
+
} repeat
|
| 169 |
+
1 3 div 1 1 sethsbcolor
|
| 170 |
+
1 0 moveto 0 0 1 0 360 arc fill 0 0 moveto
|
| 171 |
+
5 6 div 1 .75 sethsbcolor
|
| 172 |
+
1 .2 2 { dup 0 moveto 0 0 3 2 roll 0 360 arc } for
|
| 173 |
+
stroke 0 0 moveto
|
| 174 |
+
|
| 175 |
+
showpage /check 0 def
|
| 176 |
+
</pre>
|
| 177 |
+
|
| 178 |
+
<p>
|
| 179 |
+
|
| 180 |
+
And the image file that is the answer is:
|
| 181 |
+
|
| 182 |
+
<p>
|
| 183 |
+
|
| 184 |
+
<center><img src="a-problem-with-printing.png"></center>
|
| 185 |
+
|
| 186 |
+
|
| 187 |
+
<p>
|
| 188 |
+
The training for this puzzle is IKEBANA ("when I arrange them over that picture of a vase") whose solution is REMOVE THE BLUE. So the trained answer for this puzzle is a red-and-yellow flower:
|
| 189 |
+
<p align=center><img src="../images/trained-flower.png"></p>
|
| 190 |
+
|
| 191 |
+
<p>
|
| 192 |
+
Note that this is "removing the blue" in a painterly sense, not an RGB sense.
|
| 193 |
+
This should be obvious because: a) printers are CMYK, not RGB, devices, and
|
| 194 |
+
b) the colors specified in the postscript are HSB, not RGB.
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
</BODY>
|
| 198 |
+
</HTML>
|
| 199 |
+
|
| 200 |
+
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_7.html/a-problem-with-printing.ps
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
%!
|
| 2 |
+
/check 0 def
|
| 3 |
+
%!
|
| 4 |
+
/check 0 def
|
| 5 |
+
%!
|
| 6 |
+
/check 0 def
|
| 7 |
+
%!
|
| 8 |
+
/check 0 def
|
| 9 |
+
%!
|
| 10 |
+
/check 0 def
|
| 11 |
+
check 0 eq {72 dup scale 8.5 2 div 11 2 div translate .25 dup scale /check 1 def} if
|
| 12 |
+
5 72 div setlinewidth
|
| 13 |
+
check 0 eq {72 dup scale 8.5 2 div 11 2 div translate .25 dup scale /check 1 def} if
|
| 14 |
+
check 0 eq {72 dup scale 8.5 2 div 11 2 div translate .25 dup scale /check 1 def} if
|
| 15 |
+
5 72 div setlinewidth
|
| 16 |
+
5 72 div setlinewidth
|
| 17 |
+
check 0 eq {72 dup scale 8.5 2 div 11 2 div translate .25 dup scale /check 1 def} if
|
| 18 |
+
check 0 eq {72 dup scale 8.5 2 div 11 2 div translate .25 dup scale /check 1 def} if
|
| 19 |
+
0 1 1 sethsbcolor
|
| 20 |
+
3 {
|
| 21 |
+
5 72 div setlinewidth
|
| 22 |
+
5 6 div 1 .75 sethsbcolor
|
| 23 |
+
5 {
|
| 24 |
+
0 1 .75 sethsbcolor
|
| 25 |
+
4 {
|
| 26 |
+
gsave
|
| 27 |
+
-3.5 dup translate
|
| 28 |
+
-1.25 0.5 moveto
|
| 29 |
+
1 2 div setlinewidth
|
| 30 |
+
-1.25 3 lineto
|
| 31 |
+
gsave
|
| 32 |
+
0.7 setgray
|
| 33 |
+
2 {
|
| 34 |
+
8 {
|
| 35 |
+
1 0.5 scale
|
| 36 |
+
5 72 div setlinewidth
|
| 37 |
+
0 0 moveto
|
| 38 |
+
0 0 moveto 2 0 1 -120 120 arc closepath
|
| 39 |
+
fill 0 0 moveto
|
| 40 |
+
1.25 3 lineto
|
| 41 |
+
360 2 div rotate
|
| 42 |
+
7 0 lineto
|
| 43 |
+
} repeat
|
| 44 |
+
1 3 div 1 1 sethsbcolor
|
| 45 |
+
stroke 0 0 moveto
|
| 46 |
+
0 1 translate
|
| 47 |
+
90 rotate
|
| 48 |
+
3 0 moveto
|
| 49 |
+
2.5 0 moveto 1.5 0 1 0 360 arc fill 0 0 moveto
|
| 50 |
+
grestore 0 0 moveto
|
| 51 |
+
} repeat
|
| 52 |
+
360 9 div -0.5 mul rotate
|
| 53 |
+
3 {
|
| 54 |
+
gsave
|
| 55 |
+
1.25 0.5 lineto
|
| 56 |
+
-1.25 0.5 lineto
|
| 57 |
+
grestore 0 0 moveto
|
| 58 |
+
stroke 0 0 moveto
|
| 59 |
+
0 0 moveto
|
| 60 |
+
2 0 lineto
|
| 61 |
+
0 setgray
|
| 62 |
+
currenthsbcolor 3 2 roll 1 8 div add 3 1 roll sethsbcolor
|
| 63 |
+
7 {
|
| 64 |
+
0 setgray
|
| 65 |
+
1.25 3 moveto
|
| 66 |
+
0 0 moveto
|
| 67 |
+
stroke 0 0 moveto
|
| 68 |
+
0.75 0 lineto
|
| 69 |
+
1 0 .25 180 90 arcn
|
| 70 |
+
2 0 1 0 360 arc
|
| 71 |
+
360 9 div 5 mul rotate
|
| 72 |
+
3 1.25 lineto
|
| 73 |
+
1 0 moveto
|
| 74 |
+
} repeat
|
| 75 |
+
0 0 moveto
|
| 76 |
+
1.25 -0.5 lineto
|
| 77 |
+
-1 0 lineto
|
| 78 |
+
3 0 lineto
|
| 79 |
+
-0.5 1.25 lineto
|
| 80 |
+
1 0 .25 90 270 arc
|
| 81 |
+
1.25 3 lineto
|
| 82 |
+
360 9 div -2.5 mul rotate
|
| 83 |
+
360 14 div rotate
|
| 84 |
+
stroke 0 0 moveto
|
| 85 |
+
0.5 2 moveto
|
| 86 |
+
0.5 -2 lineto
|
| 87 |
+
stroke 0 0 moveto
|
| 88 |
+
1 0 lineto
|
| 89 |
+
-3 2 moveto
|
| 90 |
+
} repeat
|
| 91 |
+
currenthsbcolor 3 2 roll 1 8 div add 3 1 roll sethsbcolor
|
| 92 |
+
360 4 div rotate
|
| 93 |
+
1 3 div 1 1 sethsbcolor
|
| 94 |
+
} repeat
|
| 95 |
+
grestore 0 0 moveto
|
| 96 |
+
closepath fill 0 0 moveto
|
| 97 |
+
0 1 1 sethsbcolor
|
| 98 |
+
currenthsbcolor 3 2 roll 1 5 div add 3 1 roll sethsbcolor
|
| 99 |
+
-1 0 lineto
|
| 100 |
+
-3 -2 lineto
|
| 101 |
+
stroke 0 0 moveto
|
| 102 |
+
0 0 moveto
|
| 103 |
+
1 0 moveto 0 0 1 0 360 arc fill 0 0 moveto
|
| 104 |
+
1 0 lineto
|
| 105 |
+
5 6 div 1 .75 sethsbcolor
|
| 106 |
+
360 5 div rotate
|
| 107 |
+
1 .2 2 { dup 0 moveto 0 0 3 2 roll 0 360 arc } for
|
| 108 |
+
} repeat
|
| 109 |
+
360 14 div rotate
|
| 110 |
+
3 0 lineto
|
| 111 |
+
stroke 0 0 moveto
|
| 112 |
+
closepath fill 0 0 moveto
|
| 113 |
+
showpage /check 0 def
|
| 114 |
+
showpage /check 0 def
|
| 115 |
+
showpage /check 0 def
|
| 116 |
+
showpage /check 0 def
|
| 117 |
+
} repeat
|
| 118 |
+
showpage /check 0 def
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_7.html/checkanswer.js
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Do this first so that layout shift isn't too bad:
|
| 2 |
+
const container = document.createElement("div");
|
| 3 |
+
container.style = `
|
| 4 |
+
font-size: 16px;
|
| 5 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 6 |
+
height: 2.5em;
|
| 7 |
+
`;
|
| 8 |
+
document.body.prepend(container);
|
| 9 |
+
|
| 10 |
+
import { React, html, css, render } from "./package.js";
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Remove non-alphanumeric characters.
|
| 14 |
+
*/
|
| 15 |
+
const normalizeAnswer = (answer) => {
|
| 16 |
+
if (getYear() === 2003) {
|
| 17 |
+
if (document.URL.includes("teamGuest/2")) {
|
| 18 |
+
// Special case: 2003 R2, whose answers are emoji.
|
| 19 |
+
return answer.trim();
|
| 20 |
+
} else if (document.URL.includes("6_3")) {
|
| 21 |
+
// Special case: Answer is literal Greek letter.
|
| 22 |
+
return answer.trim();
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
return answer.toUpperCase().replaceAll(/[^A-Z0-9]/g, "");
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Returns the year of the hunt we're in.
|
| 30 |
+
*/
|
| 31 |
+
const getYear = () => {
|
| 32 |
+
return Number(RegExp(`^.*/([0-9]{4})/.*$`).exec(document.URL)?.[1] ?? 0);
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Fetches the answers as a list of {url, answer, prompt, intermediate}.
|
| 37 |
+
*/
|
| 38 |
+
const getData = async () => {
|
| 39 |
+
const res = await fetch("/answers.tsv");
|
| 40 |
+
const data = await res.text();
|
| 41 |
+
const [header, ...body] = data.split("\n");
|
| 42 |
+
const headers = header.trim().split("\t");
|
| 43 |
+
return body.map((row) => {
|
| 44 |
+
const res = {};
|
| 45 |
+
row.split("\t").forEach((item, i) => {
|
| 46 |
+
res[headers[i]] = item.trim();
|
| 47 |
+
});
|
| 48 |
+
return res;
|
| 49 |
+
});
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Gets the base URL; removes trailing index.html and .html, removes everything
|
| 54 |
+
* before the year, and then removes trailing slash.
|
| 55 |
+
*/
|
| 56 |
+
const getBase = (url) => {
|
| 57 |
+
const root =
|
| 58 |
+
RegExp(`^(.*/)index.html`).exec(url)?.[1] ??
|
| 59 |
+
RegExp(`^(.*).html`).exec(url)?.[1] ??
|
| 60 |
+
url;
|
| 61 |
+
const base = RegExp(`^.*/([0-9]{4}/.*)$`).exec(root)?.[1] ?? root;
|
| 62 |
+
return base.endsWith("/") ? base.slice(0, -1) : base;
|
| 63 |
+
};
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* Get all rows in the data corresponding to a given URL. Group by same prompt.
|
| 67 |
+
*/
|
| 68 |
+
const getAnswers = (data, url) => {
|
| 69 |
+
const base = getBase(url);
|
| 70 |
+
const rows = data.filter((row) => getBase(row.url) === base);
|
| 71 |
+
const prompts = [];
|
| 72 |
+
for (const row of rows) {
|
| 73 |
+
const { prompt } = row;
|
| 74 |
+
const group = prompts.find((group) => group.prompt === prompt);
|
| 75 |
+
if (group) {
|
| 76 |
+
group.rows.push(row);
|
| 77 |
+
} else {
|
| 78 |
+
prompts.push({ prompt, rows: [row] });
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
return prompts;
|
| 82 |
+
};
|
| 83 |
+
|
| 84 |
+
/**
|
| 85 |
+
* A single textbox and submit button in the rows of possible responses.
|
| 86 |
+
*/
|
| 87 |
+
const ResponseRow = ({ prompt, rows, setFeedback }) => {
|
| 88 |
+
const [response, setResponse] = React.useState("");
|
| 89 |
+
|
| 90 |
+
const form = css`
|
| 91 |
+
align-items: baseline;
|
| 92 |
+
display: flex;
|
| 93 |
+
justify-content: right;
|
| 94 |
+
margin-bottom: 0.5em;
|
| 95 |
+
|
| 96 |
+
@media (max-width: 600px) {
|
| 97 |
+
align-items: flex-start;
|
| 98 |
+
flex-direction: column;
|
| 99 |
+
}
|
| 100 |
+
`;
|
| 101 |
+
|
| 102 |
+
const input = css`
|
| 103 |
+
background: #fafafa;
|
| 104 |
+
border: 1px solid #aaa;
|
| 105 |
+
border-radius: 2px;
|
| 106 |
+
color: #121212;
|
| 107 |
+
font-family: inherit;
|
| 108 |
+
font-size: 100%;
|
| 109 |
+
line-height: 1.2;
|
| 110 |
+
margin: 0 0.5em;
|
| 111 |
+
padding: 0.25em 0.5em;
|
| 112 |
+
|
| 113 |
+
@media (max-width: 600px) {
|
| 114 |
+
margin: 0 0 0.25em;
|
| 115 |
+
}
|
| 116 |
+
`;
|
| 117 |
+
|
| 118 |
+
const onSubmit = (e) => {
|
| 119 |
+
e.preventDefault();
|
| 120 |
+
let set = false;
|
| 121 |
+
for (const row of rows) {
|
| 122 |
+
const correct = normalizeAnswer(row.answer) === normalizeAnswer(response);
|
| 123 |
+
if (correct) {
|
| 124 |
+
setFeedback(
|
| 125 |
+
row.intermediate?.trim() === "TRUE"
|
| 126 |
+
? "Correct! See the solution page for the answer."
|
| 127 |
+
: `Solved! The answer was ${row.answer}.`
|
| 128 |
+
);
|
| 129 |
+
set = true;
|
| 130 |
+
break;
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
if (!set) {
|
| 134 |
+
setFeedback("Incorrect.");
|
| 135 |
+
}
|
| 136 |
+
};
|
| 137 |
+
|
| 138 |
+
const onChange = (e) => setResponse(e.target.value);
|
| 139 |
+
|
| 140 |
+
return html`
|
| 141 |
+
<form class=${form} onSubmit=${onSubmit}>
|
| 142 |
+
<label htmlFor=${prompt + " prompt"}>
|
| 143 |
+
${prompt || "Enter your guess"}:
|
| 144 |
+
</label>
|
| 145 |
+
<input
|
| 146 |
+
class=${input}
|
| 147 |
+
id=${prompt + " prompt"}
|
| 148 |
+
onChange=${onChange}
|
| 149 |
+
required
|
| 150 |
+
type="text"
|
| 151 |
+
value=${response}
|
| 152 |
+
/>
|
| 153 |
+
<button type="submit">Submit</button>
|
| 154 |
+
</form>
|
| 155 |
+
`;
|
| 156 |
+
};
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* Check answer button, rendered at top of page.
|
| 160 |
+
*/
|
| 161 |
+
const CheckButton = ({ prompts }) => {
|
| 162 |
+
const [open, setOpen] = React.useState(false);
|
| 163 |
+
const [feedback, setFeedback] = React.useState("Call in an answer.");
|
| 164 |
+
|
| 165 |
+
const wrapper = css`
|
| 166 |
+
font-family: "PT Sans", sans-serif;
|
| 167 |
+
font-size: 16px;
|
| 168 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 169 |
+
height: 2.5em;
|
| 170 |
+
|
| 171 |
+
button {
|
| 172 |
+
background: #555;
|
| 173 |
+
border: none;
|
| 174 |
+
border-radius: 2px;
|
| 175 |
+
color: #fff;
|
| 176 |
+
cursor: pointer;
|
| 177 |
+
display: inline-block;
|
| 178 |
+
font-size: 1em;
|
| 179 |
+
font-family: "PT Sans", sans-serif;
|
| 180 |
+
font-weight: bold;
|
| 181 |
+
line-height: 1.2;
|
| 182 |
+
padding: 0.25em 1em;
|
| 183 |
+
text-align: center;
|
| 184 |
+
text-decoration: none;
|
| 185 |
+
text-transform: none;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
p {
|
| 189 |
+
margin: 0 0 1em;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
a {
|
| 193 |
+
color: inherit !important;
|
| 194 |
+
}
|
| 195 |
+
`;
|
| 196 |
+
|
| 197 |
+
const btnTop = [2015, 2016].includes(getYear())
|
| 198 |
+
? "50px"
|
| 199 |
+
: [2012].includes(getYear())
|
| 200 |
+
? "-2.5em"
|
| 201 |
+
: "0px";
|
| 202 |
+
|
| 203 |
+
const button = css`
|
| 204 |
+
box-sizing: border-box;
|
| 205 |
+
height: 2.5em;
|
| 206 |
+
left: 0;
|
| 207 |
+
position: absolute;
|
| 208 |
+
top: ${btnTop};
|
| 209 |
+
width: 100%;
|
| 210 |
+
z-index: 9999;
|
| 211 |
+
`;
|
| 212 |
+
|
| 213 |
+
const dropdownWrapper = css`
|
| 214 |
+
background: #edeff0;
|
| 215 |
+
color: #121212;
|
| 216 |
+
left: 0;
|
| 217 |
+
position: absolute;
|
| 218 |
+
right: 0;
|
| 219 |
+
top: calc(2.5em + ${btnTop});
|
| 220 |
+
z-index: 9999;
|
| 221 |
+
`;
|
| 222 |
+
|
| 223 |
+
const dropdown = css`
|
| 224 |
+
margin: 0 auto;
|
| 225 |
+
max-width: 40em;
|
| 226 |
+
padding: 1em;
|
| 227 |
+
z-index: 9999;
|
| 228 |
+
`;
|
| 229 |
+
|
| 230 |
+
const responses = css`
|
| 231 |
+
margin: 0 auto;
|
| 232 |
+
width: fit-content;
|
| 233 |
+
|
| 234 |
+
@media (max-width: 600px) {
|
| 235 |
+
width: auto;
|
| 236 |
+
}
|
| 237 |
+
`;
|
| 238 |
+
|
| 239 |
+
const onClick = () => setOpen(!open);
|
| 240 |
+
|
| 241 |
+
const body =
|
| 242 |
+
prompts.length > 0
|
| 243 |
+
? prompts.map(
|
| 244 |
+
(group) =>
|
| 245 |
+
html`<${ResponseRow} setFeedback=${setFeedback} ...${group} />`
|
| 246 |
+
)
|
| 247 |
+
: html`<p>
|
| 248 |
+
No answers found on this page. Please report this to${" "}
|
| 249 |
+
<a href="mailto:puzzle@mit.edu">puzzle@mit.edu</a>.
|
| 250 |
+
</p>`;
|
| 251 |
+
|
| 252 |
+
return html`
|
| 253 |
+
<style>
|
| 254 |
+
@import url("https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&display=swap");
|
| 255 |
+
|
| 256 |
+
${[2015, 2016].includes(getYear()) &&
|
| 257 |
+
".navbar-fixed-top { z-index: 10000 }"}
|
| 258 |
+
${[2012].includes(getYear()) &&
|
| 259 |
+
"body { top: 2.5em } #check-answer, #shortcuts { z-index: 10000 !important }"}
|
| 260 |
+
${[2006].includes(getYear()) && 'img[alt="Check Answer"] { display: none }'}
|
| 261 |
+
</style>
|
| 262 |
+
<div class=${wrapper}>
|
| 263 |
+
<button class=${button} onClick=${onClick}>
|
| 264 |
+
Check your answers spoiler-free
|
| 265 |
+
</button>
|
| 266 |
+
${open &&
|
| 267 |
+
html`
|
| 268 |
+
<div class=${dropdownWrapper}>
|
| 269 |
+
<div class=${dropdown}>
|
| 270 |
+
<p>${feedback}</p>
|
| 271 |
+
<div class=${responses}>${body}</div>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
`}
|
| 275 |
+
</div>
|
| 276 |
+
`;
|
| 277 |
+
};
|
| 278 |
+
|
| 279 |
+
const data = await getData();
|
| 280 |
+
const prompts = getAnswers(data, document.URL);
|
| 281 |
+
render(html`<${CheckButton} prompts=${prompts} />`, container);
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_7.html/index.html
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>ACMECorp: Section 2</title>
|
| 5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6 |
+
</head>
|
| 7 |
+
|
| 8 |
+
<body bgcolor=white><!--CUT--><div align=right><small><a href="../../solutions/m2.html">(Meta-puzzle solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 10 |
+
<tr>
|
| 11 |
+
<td><img src="images/head2.jpg"></td>
|
| 12 |
+
</tr>
|
| 13 |
+
</table>
|
| 14 |
+
<p><strong><font face="Arial">Section 2</font></strong></p>
|
| 15 |
+
|
| 16 |
+
<i>Yesterday the boss went to the theatre. You ask around, and eventually the guy in the cloakroom nods and says, "Hey, yeah, I remember him. Big tipper. Forgot to pick this book up when he left--sort of a scrapbook." You open it; mostly it's meaningless old photos of vacations and such, but there's one page with the following on it:
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<table border="1" align="center" cellspacing="0" cellpadding="10">
|
| 21 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 22 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 23 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 24 |
+
</table>
|
| 25 |
+
|
| 26 |
+
<p>
|
| 27 |
+
|
| 28 |
+
Some puzzles have been paper-clipped to this page.</i>
|
| 29 |
+
|
| 30 |
+
<p><ol>
|
| 31 |
+
<li><a href="2_1.html">Company Picnic</a></li>
|
| 32 |
+
<li><a href="2_2.html">Shredded What?</a></li>
|
| 33 |
+
<li><a href="2_3.html">Abducted!</a></li>
|
| 34 |
+
<li><a href="2_4.html">That Mixer</a></li>
|
| 35 |
+
<li><a href="2_5.html">The Road Signs of Unspeakable Chaos</a></li>
|
| 36 |
+
<li><a href="2_6.html">Stairway to Heaven</a></li>
|
| 37 |
+
<li><a href="2_7.html">A Problem With Printing</a></li>
|
| 38 |
+
<li><a href="2_8.html">What's Green, Hangs on the Wall, and Whistles?</a></li>
|
| 39 |
+
</ol>
|
| 40 |
+
</p>
|
| 41 |
+
<p> </p>
|
| 42 |
+
<p> </p>
|
| 43 |
+
<p> </p>
|
| 44 |
+
<p> </p>
|
| 45 |
+
<p> </p>
|
| 46 |
+
<a href="../index.html">Back to the index</a>
|
| 47 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 48 |
+
<tr>
|
| 49 |
+
<td><img src="images/foot2.jpg"></td>
|
| 50 |
+
</tr>
|
| 51 |
+
</table>
|
| 52 |
+
</font>
|
| 53 |
+
</body><script type="module" src="/checkanswer.js"></script>
|
| 54 |
+
</html>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_8.html/2_8.html
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
| 2 |
+
<HTML>
|
| 3 |
+
<HEAD>
|
| 4 |
+
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
| 5 |
+
<META NAME="Author" CONTENT="ACMECorp">
|
| 6 |
+
<META NAME="GENERATOR" CONTENT="Document Archivists">
|
| 7 |
+
<TITLE>What's Green, Hangs on the Wall, and Whistles?</TITLE>
|
| 8 |
+
</HEAD>
|
| 9 |
+
<BODY BGCOLOR="#ffffff"><!--CUT--><div align=right><small><a href="../../solutions/scavenger-hunt.html">(Solution)</a></small></div><!--CUT--><font face="arial">
|
| 10 |
+
<table width="100%">
|
| 11 |
+
<tr>
|
| 12 |
+
<td><img src="images/head2.jpg"></td>
|
| 13 |
+
</tr>
|
| 14 |
+
</table>
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
<h2>Document 2.8: What's Green, Hangs on the Wall, and Whistles?</h2>
|
| 18 |
+
|
| 19 |
+
<p>
|
| 20 |
+
|
| 21 |
+
<em>"A herring," your boss wrote below the question posed above. "After all, why not paint it green? And why not hang it on the wall? The whistling part...that's just in there to make it harder. Every puzzle needs something to make it harder, after all. Even if it's not obvious at first."</em>
|
| 22 |
+
|
| 23 |
+
<p>
|
| 24 |
+
|
| 25 |
+
Bring in forty points worth of objects from the following list,
|
| 26 |
+
including at least 5 from each group (people, objects, and
|
| 27 |
+
photographs). Each item is worth a point. Half credit will be given
|
| 28 |
+
for anything manufactured specifically for the Hunt (exception: the
|
| 29 |
+
last two "Object" items). Photos posed and taken for the hunt are
|
| 30 |
+
worth full credit, but photoshopped pictures are half credit. Note
|
| 31 |
+
that a numbered item which asks for more than one thing (e.g. four
|
| 32 |
+
matchbooks) counts as a single item.
|
| 33 |
+
|
| 34 |
+
<p>
|
| 35 |
+
|
| 36 |
+
All items brought in are subject to approval/confirmation by an HR
|
| 37 |
+
team member: proof must be provided, skills demonstrated, etc. In the
|
| 38 |
+
items category, all consumables are subject to 'testing'.
|
| 39 |
+
|
| 40 |
+
<p>
|
| 41 |
+
|
| 42 |
+
<h3>People</h3>
|
| 43 |
+
|
| 44 |
+
<ol>
|
| 45 |
+
<li>A current MIT undergraduate student with a declared numerical major<font color="#FFFFFF"> which is not a single digit nor an even number</font></li>
|
| 46 |
+
|
| 47 |
+
<li>A person with hair<font color="#FFFFFF"> that is not brown, blonde, white, grey, red or black</font></li>
|
| 48 |
+
|
| 49 |
+
<li>A person with a surname/family name<font color="#FFFFFF"> that does not contain a, e, i, o, or u</font></li>
|
| 50 |
+
|
| 51 |
+
<li>A person who has a piercing<font color="#FFFFFF"> which is not ear, navel, nose, or genital</font></li>
|
| 52 |
+
|
| 53 |
+
<li>A person who can make a string figure (e.g. "cat's cradle")<font color="#FFFFFF"> which is not the cradle, witch's broomstick, crows feet, or monkey picks a banana</font></li>
|
| 54 |
+
|
| 55 |
+
<li>A person who can play a recognizable tune on a string instrument (keyboard instruments with strings inside do not qualify)<font color="#FFFFFF"> which is not a violin, viola, cello, bass, or guitar</font></li>
|
| 56 |
+
|
| 57 |
+
<li>A person who can juggle objects<font color="#FFFFFF"> which are not clubs, balls, rings, kooshes, or bean bags</font></li>
|
| 58 |
+
|
| 59 |
+
<li>A person who can pick a lock<font color="#FFFFFF"> which is not a luggage lock, a file cabinet or a combination lock</font></li>
|
| 60 |
+
|
| 61 |
+
<li>A person who can sing a rock song<font color="#FFFFFF"> in a language which is not English or gibberish</font></li>
|
| 62 |
+
|
| 63 |
+
<li>A person who can make a balloon animal<font color="#FFFFFF"> that is not a snake, giraffe, or dog</font></li>
|
| 64 |
+
|
| 65 |
+
<li>A speaker of an Asian language<font color="#FFFFFF"> who is not Asian nor a current or former MIT student</font></li>
|
| 66 |
+
|
| 67 |
+
<li>A person who has been on a game show<font color="#FFFFFF"> that's not "Jeopardy!", "Win Ben Stein's Money", "Who Wants to be a Millionaire?", or "The Weakest Link"</font></li>
|
| 68 |
+
|
| 69 |
+
<li>A person or people who can act out, without scripts, a skit from the Monty Python TV series (approximately two minutes: saying "It's..." is not a skit; English accents not required)<font color="#FFFFFF">, which is not a song or the damned dead parrot sketch</font></li>
|
| 70 |
+
|
| 71 |
+
<li>Person who travelled in December on an airline (please have your photo ID and boarding pass ready)<font color="#FFFFFF"> which is not United, Continental, American, US Airways, or Delta</font></li>
|
| 72 |
+
|
| 73 |
+
<li>Person who can open walnuts<font color="#FFFFFF"> without the aid of a nutcracker or other foreign object, including shoes (stomping barefoot is fine)</font></li>
|
| 74 |
+
</ol>
|
| 75 |
+
|
| 76 |
+
<p>
|
| 77 |
+
|
| 78 |
+
<h3>Objects</h3>
|
| 79 |
+
|
| 80 |
+
<p>
|
| 81 |
+
|
| 82 |
+
<ol>
|
| 83 |
+
<li>Matchbooks from four different pubs in Cambridge<font color="#FFFFFF"> which are not the Muddy Charles, Thirsty Ear, Miracle of Science, or Cambridgeport Saloon</font></li>
|
| 84 |
+
|
| 85 |
+
<li>Ice cream<font color="#FFFFFF"> which is not frozen or wet</font></li>
|
| 86 |
+
|
| 87 |
+
<li>Chocolate<font color="#FFFFFF"> that is not Hersheys, Nestle, Cadbury, Mars, or Whitmans</font></li>
|
| 88 |
+
|
| 89 |
+
<li>A carbonated beverage<font color="#FFFFFF"> which is not bottled by Pepsi, Coca-Cola, Poland Spring, Polar, or RC Cola</font></li>
|
| 90 |
+
|
| 91 |
+
<li>Pennant from an institution of higher learning<font color="#FFFFFF"> which is not located within 25 miles of MIT</font></li>
|
| 92 |
+
|
| 93 |
+
<li>Obsolete (ie no longer legal tender) currency<font color="#FFFFFF"> which is not a lira, franc, deutschmark or peseta</font></li>
|
| 94 |
+
|
| 95 |
+
<li>Negotiable currency<font color="#FFFFFF"> that is neither round nor rectangular</font></li>
|
| 96 |
+
|
| 97 |
+
<li>Red Sox paraphernalia associated with a specific player<font color="#FFFFFF"> who is not Nomar Garciaparra, Pedro Martinez, Derek Lowe, or Shea Hillenbrand</font></li>
|
| 98 |
+
|
| 99 |
+
<li>Sports paraphernalia associated with a Boston team<font color="#FFFFFF"> which is not the Sox, Bruins, Patriots or Celtics</font></li>
|
| 100 |
+
|
| 101 |
+
<li>Cover of a men or women's magazine<font color="#FFFFFF"> which does not mention sex, weight loss, bed, or tips</font></li>
|
| 102 |
+
|
| 103 |
+
<li>An action figure<font color="#FFFFFF"> which is not from Star Wars, Lord of the Rings, GI Joe, or Mighty Morphin' Power Rangers</font></li>
|
| 104 |
+
|
| 105 |
+
<li>A Pokemon (card, stuffed animal, or figurine)<font color="#FFFFFF"> who is not Pikachu, Jigglypuff, Bulbasaur, Squirtle or Charmander</font></li>
|
| 106 |
+
|
| 107 |
+
<li>A published game<font color="#FFFFFF"> that does not use a board, cards, or dice</font></li>
|
| 108 |
+
|
| 109 |
+
<li>A platonic solid<font color="#FFFFFF"> which has no numbers or pips on it and is not a cube</font></li>
|
| 110 |
+
|
| 111 |
+
<li>A medical implement<font color="#FFFFFF"> which is not a stethoscope, a tongue depressor, a blood pressure cuff, or a thermometer</font></li>
|
| 112 |
+
|
| 113 |
+
<li>A jacket<font color="#FFFFFF"> which is not Gore-Tex (or similar), nylon, fur, denim, or fleece</font></li>
|
| 114 |
+
|
| 115 |
+
<li>A copy of a Hong Kong action film<font color="#FFFFFF"> which does not star Chow-Yun Fat, Jet Li, Jackie Chan, Michelle Yeoh or Bruce Lee</font></li>
|
| 116 |
+
|
| 117 |
+
<li>A ticket stub from a museum<font color="#FFFFFF"> which is not MIT-related, the Museum of Science, MFA or Isabella Stuart Gardner</font></li>
|
| 118 |
+
|
| 119 |
+
<li>A newsprint copy of the Tech<font color="#FFFFFF"> that is not from 2002 or 2003</font></li>
|
| 120 |
+
|
| 121 |
+
<li>Cheese<font color="#FFFFFF"> which is not white, yellow, or orange</font></li>
|
| 122 |
+
|
| 123 |
+
<li>An object related to an MIT hack<font color="#FFFFFF"> which does not have a dialup machine named after it</font></li>
|
| 124 |
+
|
| 125 |
+
<li>A receipt from an all-night business<font color="#FFFFFF"> which is not Store 24, IHOP, Dunkin Donuts, CVS or a gas station</font></li>
|
| 126 |
+
|
| 127 |
+
<li>A souvenir from Arisia<font color="#FFFFFF"> which is not an on-site registration form, a schedule, or a map</font></li>
|
| 128 |
+
|
| 129 |
+
<li>A souvenir from a geographical location<font color="#FFFFFF"> that is not a keychain, a postcard, a snow-globe, or an item of clothing</font></li>
|
| 130 |
+
|
| 131 |
+
<li>A computer running an operating system<font color="#FFFFFF"> which is not any variety of MS-DOS, Windows, Mac OS, Linux, or Palm</font></li>
|
| 132 |
+
|
| 133 |
+
<li>A movie (videotape or DVD) that takes place on the moon<font color="#FFFFFF"> which does not have aliens, lasers, or NASA</font></li>
|
| 134 |
+
|
| 135 |
+
<li>A piece of Carmen Sandiego paraphernalia<font color="#FFFFFF"> that is not a red hat, a CD, or a CD case</font></li>
|
| 136 |
+
|
| 137 |
+
<li>A bus schedule<font color="#FFFFFF"> that is not from the MBTA system</font></li>
|
| 138 |
+
|
| 139 |
+
<li>An origami animal<font color="#FFFFFF"> which is not a crane, frog, swan or snake</font></li>
|
| 140 |
+
|
| 141 |
+
<li>A fruit or vegetable in the style of "Play with Your Food"<font color="#FFFFFF"> which is not a radish, orange, or green pepper</font></li>
|
| 142 |
+
|
| 143 |
+
</ol>
|
| 144 |
+
|
| 145 |
+
<p>
|
| 146 |
+
|
| 147 |
+
<h3>Pictures</h3>
|
| 148 |
+
|
| 149 |
+
<p>
|
| 150 |
+
|
| 151 |
+
<ol>
|
| 152 |
+
<li>Picture of team member(s) in front of a storefront ACME sign<font color="#FFFFFF"> which is not altered or ACME Ice</font></li>
|
| 153 |
+
|
| 154 |
+
<li>Picture of team member(s) on a planet of the solar system<font color="#FFFFFF"> which is not Earth</font></li>
|
| 155 |
+
|
| 156 |
+
<li>Picture of team member(s) in front of an Art on the T exhibit at a red line T stop<font color="#FFFFFF"> which is not Kendall, Central, Harvard, Davis or Porter</font></li>
|
| 157 |
+
|
| 158 |
+
<li>Picture of team member(s) on a bridge over the Charles (Museum of Science is a dam, not a bridge)<font color="#FFFFFF"> which is not the Longfellow, the Harvard Bridge, the BU bridge, or the Elliot bridge</font></li>
|
| 159 |
+
|
| 160 |
+
<li>Picture of a team member(s) sitting in a convertible with the top down<font color="#FFFFFF"> which is not a Mazda Miata, Volkswagen Cabrio, Chrysler Sebring, or Ford Mustang</font></li>
|
| 161 |
+
|
| 162 |
+
<li>Picture of team member(s) participating in a winter Olympic sport<font color="#FFFFFF"> which is not skiing, hockey, skating, or snowboarding</font></li>
|
| 163 |
+
|
| 164 |
+
<li>Picture of teammate(s) at a Freedom Trail landmark<font color="#FFFFFF"> which is not a Statehouse, the Bunker Hill Monument, the USS Constitution, Paul Revere's House, the Old North Church or the starting point visitor's center</font></li>
|
| 165 |
+
|
| 166 |
+
<li>Picture of teammate(s) on a continent<font color="#FFFFFF"> which is not North or South America, Europe, or Asia</font></li>
|
| 167 |
+
|
| 168 |
+
<li>Picture of team member(s) on an ice rink (extra point for Fleet Center, but not if photoshopped)<font color="#FFFFFF"> which is not the MIT rink, the Harvard Rink, the Frog Pond Rink, or the BU rink</font></li>
|
| 169 |
+
|
| 170 |
+
<li>Picture of team member(s) at a hackers sign-in site<font color="#FFFFFF"> which is not from the hacking puzzle in last year's hunt (http://www.mit.edu/~puzzle/02/round1/04/Puzzle.html, answer at http://www.mit.edu/~puzzle/02/round1/04/Solution.txt)</font></li>
|
| 171 |
+
|
| 172 |
+
<li>Picture of team member(s) enacting a scene from a Shakespeare play (it must be obvious which scene)<font color="#FFFFFF"> which is not Hamlet, Romeo and Juliet, Midsummer Night's Dream, or Macbeth</font></li>
|
| 173 |
+
|
| 174 |
+
<li>Picture of team member(s) with a live sea creature<font color="#FFFFFF"> that is not a bird, a lobster, or a crab</font></li>
|
| 175 |
+
|
| 176 |
+
<li>Picture of team member(s) in front of a 'permanent' unaltered sign that has an unintended humorous meaning<font color="#FFFFFF"> which is not Fresh Pond Gas, Long Funeral Service or Metropolitan Sto(rage Warehouse) F(ireproof)</font>.</li>
|
| 177 |
+
|
| 178 |
+
<li>Picture of at least three team members in a room<font color="#FFFFFF"> who are not touching any furniture, the floor, wall, or ceiling (with skin or cloth or shoes)</font></li>
|
| 179 |
+
|
| 180 |
+
<li>Picture of a team member in a foreign country<font color="#FFFFFF"> which does not have English, French, or Spanish as a national language</font></li>
|
| 181 |
+
</ol>
|
| 182 |
+
|
| 183 |
+
<p><br><p>
|
| 184 |
+
|
| 185 |
+
<a href="index.html">Back to the index</a>
|
| 186 |
+
|
| 187 |
+
<table width="100%">
|
| 188 |
+
<tr>
|
| 189 |
+
<td><img src="images/foot2.jpg"></td>
|
| 190 |
+
</tr>
|
| 191 |
+
</table>
|
| 192 |
+
|
| 193 |
+
</body>
|
| 194 |
+
<script type="module" src="/checkanswer.js"></script>
|
| 195 |
+
</HTML>
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_8.html/checkanswer.js
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Do this first so that layout shift isn't too bad:
|
| 2 |
+
const container = document.createElement("div");
|
| 3 |
+
container.style = `
|
| 4 |
+
font-size: 16px;
|
| 5 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 6 |
+
height: 2.5em;
|
| 7 |
+
`;
|
| 8 |
+
document.body.prepend(container);
|
| 9 |
+
|
| 10 |
+
import { React, html, css, render } from "./package.js";
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Remove non-alphanumeric characters.
|
| 14 |
+
*/
|
| 15 |
+
const normalizeAnswer = (answer) => {
|
| 16 |
+
if (getYear() === 2003) {
|
| 17 |
+
if (document.URL.includes("teamGuest/2")) {
|
| 18 |
+
// Special case: 2003 R2, whose answers are emoji.
|
| 19 |
+
return answer.trim();
|
| 20 |
+
} else if (document.URL.includes("6_3")) {
|
| 21 |
+
// Special case: Answer is literal Greek letter.
|
| 22 |
+
return answer.trim();
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
return answer.toUpperCase().replaceAll(/[^A-Z0-9]/g, "");
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Returns the year of the hunt we're in.
|
| 30 |
+
*/
|
| 31 |
+
const getYear = () => {
|
| 32 |
+
return Number(RegExp(`^.*/([0-9]{4})/.*$`).exec(document.URL)?.[1] ?? 0);
|
| 33 |
+
};
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Fetches the answers as a list of {url, answer, prompt, intermediate}.
|
| 37 |
+
*/
|
| 38 |
+
const getData = async () => {
|
| 39 |
+
const res = await fetch("/answers.tsv");
|
| 40 |
+
const data = await res.text();
|
| 41 |
+
const [header, ...body] = data.split("\n");
|
| 42 |
+
const headers = header.trim().split("\t");
|
| 43 |
+
return body.map((row) => {
|
| 44 |
+
const res = {};
|
| 45 |
+
row.split("\t").forEach((item, i) => {
|
| 46 |
+
res[headers[i]] = item.trim();
|
| 47 |
+
});
|
| 48 |
+
return res;
|
| 49 |
+
});
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Gets the base URL; removes trailing index.html and .html, removes everything
|
| 54 |
+
* before the year, and then removes trailing slash.
|
| 55 |
+
*/
|
| 56 |
+
const getBase = (url) => {
|
| 57 |
+
const root =
|
| 58 |
+
RegExp(`^(.*/)index.html`).exec(url)?.[1] ??
|
| 59 |
+
RegExp(`^(.*).html`).exec(url)?.[1] ??
|
| 60 |
+
url;
|
| 61 |
+
const base = RegExp(`^.*/([0-9]{4}/.*)$`).exec(root)?.[1] ?? root;
|
| 62 |
+
return base.endsWith("/") ? base.slice(0, -1) : base;
|
| 63 |
+
};
|
| 64 |
+
|
| 65 |
+
/**
|
| 66 |
+
* Get all rows in the data corresponding to a given URL. Group by same prompt.
|
| 67 |
+
*/
|
| 68 |
+
const getAnswers = (data, url) => {
|
| 69 |
+
const base = getBase(url);
|
| 70 |
+
const rows = data.filter((row) => getBase(row.url) === base);
|
| 71 |
+
const prompts = [];
|
| 72 |
+
for (const row of rows) {
|
| 73 |
+
const { prompt } = row;
|
| 74 |
+
const group = prompts.find((group) => group.prompt === prompt);
|
| 75 |
+
if (group) {
|
| 76 |
+
group.rows.push(row);
|
| 77 |
+
} else {
|
| 78 |
+
prompts.push({ prompt, rows: [row] });
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
return prompts;
|
| 82 |
+
};
|
| 83 |
+
|
| 84 |
+
/**
|
| 85 |
+
* A single textbox and submit button in the rows of possible responses.
|
| 86 |
+
*/
|
| 87 |
+
const ResponseRow = ({ prompt, rows, setFeedback }) => {
|
| 88 |
+
const [response, setResponse] = React.useState("");
|
| 89 |
+
|
| 90 |
+
const form = css`
|
| 91 |
+
align-items: baseline;
|
| 92 |
+
display: flex;
|
| 93 |
+
justify-content: right;
|
| 94 |
+
margin-bottom: 0.5em;
|
| 95 |
+
|
| 96 |
+
@media (max-width: 600px) {
|
| 97 |
+
align-items: flex-start;
|
| 98 |
+
flex-direction: column;
|
| 99 |
+
}
|
| 100 |
+
`;
|
| 101 |
+
|
| 102 |
+
const input = css`
|
| 103 |
+
background: #fafafa;
|
| 104 |
+
border: 1px solid #aaa;
|
| 105 |
+
border-radius: 2px;
|
| 106 |
+
color: #121212;
|
| 107 |
+
font-family: inherit;
|
| 108 |
+
font-size: 100%;
|
| 109 |
+
line-height: 1.2;
|
| 110 |
+
margin: 0 0.5em;
|
| 111 |
+
padding: 0.25em 0.5em;
|
| 112 |
+
|
| 113 |
+
@media (max-width: 600px) {
|
| 114 |
+
margin: 0 0 0.25em;
|
| 115 |
+
}
|
| 116 |
+
`;
|
| 117 |
+
|
| 118 |
+
const onSubmit = (e) => {
|
| 119 |
+
e.preventDefault();
|
| 120 |
+
let set = false;
|
| 121 |
+
for (const row of rows) {
|
| 122 |
+
const correct = normalizeAnswer(row.answer) === normalizeAnswer(response);
|
| 123 |
+
if (correct) {
|
| 124 |
+
setFeedback(
|
| 125 |
+
row.intermediate?.trim() === "TRUE"
|
| 126 |
+
? "Correct! See the solution page for the answer."
|
| 127 |
+
: `Solved! The answer was ${row.answer}.`
|
| 128 |
+
);
|
| 129 |
+
set = true;
|
| 130 |
+
break;
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
if (!set) {
|
| 134 |
+
setFeedback("Incorrect.");
|
| 135 |
+
}
|
| 136 |
+
};
|
| 137 |
+
|
| 138 |
+
const onChange = (e) => setResponse(e.target.value);
|
| 139 |
+
|
| 140 |
+
return html`
|
| 141 |
+
<form class=${form} onSubmit=${onSubmit}>
|
| 142 |
+
<label htmlFor=${prompt + " prompt"}>
|
| 143 |
+
${prompt || "Enter your guess"}:
|
| 144 |
+
</label>
|
| 145 |
+
<input
|
| 146 |
+
class=${input}
|
| 147 |
+
id=${prompt + " prompt"}
|
| 148 |
+
onChange=${onChange}
|
| 149 |
+
required
|
| 150 |
+
type="text"
|
| 151 |
+
value=${response}
|
| 152 |
+
/>
|
| 153 |
+
<button type="submit">Submit</button>
|
| 154 |
+
</form>
|
| 155 |
+
`;
|
| 156 |
+
};
|
| 157 |
+
|
| 158 |
+
/**
|
| 159 |
+
* Check answer button, rendered at top of page.
|
| 160 |
+
*/
|
| 161 |
+
const CheckButton = ({ prompts }) => {
|
| 162 |
+
const [open, setOpen] = React.useState(false);
|
| 163 |
+
const [feedback, setFeedback] = React.useState("Call in an answer.");
|
| 164 |
+
|
| 165 |
+
const wrapper = css`
|
| 166 |
+
font-family: "PT Sans", sans-serif;
|
| 167 |
+
font-size: 16px;
|
| 168 |
+
font-size: clamp(16px, 2.4vw, 21px);
|
| 169 |
+
height: 2.5em;
|
| 170 |
+
|
| 171 |
+
button {
|
| 172 |
+
background: #555;
|
| 173 |
+
border: none;
|
| 174 |
+
border-radius: 2px;
|
| 175 |
+
color: #fff;
|
| 176 |
+
cursor: pointer;
|
| 177 |
+
display: inline-block;
|
| 178 |
+
font-size: 1em;
|
| 179 |
+
font-family: "PT Sans", sans-serif;
|
| 180 |
+
font-weight: bold;
|
| 181 |
+
line-height: 1.2;
|
| 182 |
+
padding: 0.25em 1em;
|
| 183 |
+
text-align: center;
|
| 184 |
+
text-decoration: none;
|
| 185 |
+
text-transform: none;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
p {
|
| 189 |
+
margin: 0 0 1em;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
a {
|
| 193 |
+
color: inherit !important;
|
| 194 |
+
}
|
| 195 |
+
`;
|
| 196 |
+
|
| 197 |
+
const btnTop = [2015, 2016].includes(getYear())
|
| 198 |
+
? "50px"
|
| 199 |
+
: [2012].includes(getYear())
|
| 200 |
+
? "-2.5em"
|
| 201 |
+
: "0px";
|
| 202 |
+
|
| 203 |
+
const button = css`
|
| 204 |
+
box-sizing: border-box;
|
| 205 |
+
height: 2.5em;
|
| 206 |
+
left: 0;
|
| 207 |
+
position: absolute;
|
| 208 |
+
top: ${btnTop};
|
| 209 |
+
width: 100%;
|
| 210 |
+
z-index: 9999;
|
| 211 |
+
`;
|
| 212 |
+
|
| 213 |
+
const dropdownWrapper = css`
|
| 214 |
+
background: #edeff0;
|
| 215 |
+
color: #121212;
|
| 216 |
+
left: 0;
|
| 217 |
+
position: absolute;
|
| 218 |
+
right: 0;
|
| 219 |
+
top: calc(2.5em + ${btnTop});
|
| 220 |
+
z-index: 9999;
|
| 221 |
+
`;
|
| 222 |
+
|
| 223 |
+
const dropdown = css`
|
| 224 |
+
margin: 0 auto;
|
| 225 |
+
max-width: 40em;
|
| 226 |
+
padding: 1em;
|
| 227 |
+
z-index: 9999;
|
| 228 |
+
`;
|
| 229 |
+
|
| 230 |
+
const responses = css`
|
| 231 |
+
margin: 0 auto;
|
| 232 |
+
width: fit-content;
|
| 233 |
+
|
| 234 |
+
@media (max-width: 600px) {
|
| 235 |
+
width: auto;
|
| 236 |
+
}
|
| 237 |
+
`;
|
| 238 |
+
|
| 239 |
+
const onClick = () => setOpen(!open);
|
| 240 |
+
|
| 241 |
+
const body =
|
| 242 |
+
prompts.length > 0
|
| 243 |
+
? prompts.map(
|
| 244 |
+
(group) =>
|
| 245 |
+
html`<${ResponseRow} setFeedback=${setFeedback} ...${group} />`
|
| 246 |
+
)
|
| 247 |
+
: html`<p>
|
| 248 |
+
No answers found on this page. Please report this to${" "}
|
| 249 |
+
<a href="mailto:puzzle@mit.edu">puzzle@mit.edu</a>.
|
| 250 |
+
</p>`;
|
| 251 |
+
|
| 252 |
+
return html`
|
| 253 |
+
<style>
|
| 254 |
+
@import url("https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&display=swap");
|
| 255 |
+
|
| 256 |
+
${[2015, 2016].includes(getYear()) &&
|
| 257 |
+
".navbar-fixed-top { z-index: 10000 }"}
|
| 258 |
+
${[2012].includes(getYear()) &&
|
| 259 |
+
"body { top: 2.5em } #check-answer, #shortcuts { z-index: 10000 !important }"}
|
| 260 |
+
${[2006].includes(getYear()) && 'img[alt="Check Answer"] { display: none }'}
|
| 261 |
+
</style>
|
| 262 |
+
<div class=${wrapper}>
|
| 263 |
+
<button class=${button} onClick=${onClick}>
|
| 264 |
+
Check your answers spoiler-free
|
| 265 |
+
</button>
|
| 266 |
+
${open &&
|
| 267 |
+
html`
|
| 268 |
+
<div class=${dropdownWrapper}>
|
| 269 |
+
<div class=${dropdown}>
|
| 270 |
+
<p>${feedback}</p>
|
| 271 |
+
<div class=${responses}>${body}</div>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
`}
|
| 275 |
+
</div>
|
| 276 |
+
`;
|
| 277 |
+
};
|
| 278 |
+
|
| 279 |
+
const data = await getData();
|
| 280 |
+
const prompts = getAnswers(data, document.URL);
|
| 281 |
+
render(html`<${CheckButton} prompts=${prompts} />`, container);
|
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2003/2003_www.acme-corp.com_teamGuest_2_2_8.html/index.html
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>ACMECorp: Section 2</title>
|
| 5 |
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6 |
+
</head>
|
| 7 |
+
|
| 8 |
+
<body bgcolor=white><!--CUT--><div align=right><small><a href="../../solutions/m2.html">(Meta-puzzle solution)</a></small></div><!--CUT--><font face="arial">
|
| 9 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 10 |
+
<tr>
|
| 11 |
+
<td><img src="images/head2.jpg"></td>
|
| 12 |
+
</tr>
|
| 13 |
+
</table>
|
| 14 |
+
<p><strong><font face="Arial">Section 2</font></strong></p>
|
| 15 |
+
|
| 16 |
+
<i>Yesterday the boss went to the theatre. You ask around, and eventually the guy in the cloakroom nods and says, "Hey, yeah, I remember him. Big tipper. Forgot to pick this book up when he left--sort of a scrapbook." You open it; mostly it's meaningless old photos of vacations and such, but there's one page with the following on it:
|
| 17 |
+
|
| 18 |
+
<p>
|
| 19 |
+
|
| 20 |
+
<table border="1" align="center" cellspacing="0" cellpadding="10">
|
| 21 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 22 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 23 |
+
<tr align=center><td width="100" height="100"> <td width="100" height="100"> <td width="100" height="100"> <tr>
|
| 24 |
+
</table>
|
| 25 |
+
|
| 26 |
+
<p>
|
| 27 |
+
|
| 28 |
+
Some puzzles have been paper-clipped to this page.</i>
|
| 29 |
+
|
| 30 |
+
<p><ol>
|
| 31 |
+
<li><a href="2_1.html">Company Picnic</a></li>
|
| 32 |
+
<li><a href="2_2.html">Shredded What?</a></li>
|
| 33 |
+
<li><a href="2_3.html">Abducted!</a></li>
|
| 34 |
+
<li><a href="2_4.html">That Mixer</a></li>
|
| 35 |
+
<li><a href="2_5.html">The Road Signs of Unspeakable Chaos</a></li>
|
| 36 |
+
<li><a href="2_6.html">Stairway to Heaven</a></li>
|
| 37 |
+
<li><a href="2_7.html">A Problem With Printing</a></li>
|
| 38 |
+
<li><a href="2_8.html">What's Green, Hangs on the Wall, and Whistles?</a></li>
|
| 39 |
+
</ol>
|
| 40 |
+
</p>
|
| 41 |
+
<p> </p>
|
| 42 |
+
<p> </p>
|
| 43 |
+
<p> </p>
|
| 44 |
+
<p> </p>
|
| 45 |
+
<p> </p>
|
| 46 |
+
<a href="../index.html">Back to the index</a>
|
| 47 |
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 48 |
+
<tr>
|
| 49 |
+
<td><img src="images/foot2.jpg"></td>
|
| 50 |
+
</tr>
|
| 51 |
+
</table>
|
| 52 |
+
</font>
|
| 53 |
+
</body><script type="module" src="/checkanswer.js"></script>
|
| 54 |
+
</html>
|