akaaafk commited on
Commit
695ba1d
·
verified ·
1 Parent(s): 2480f07

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. benchmark/MIT_Mystery_Hunt/puzzles/answers_tsv_manifest.jsonl +0 -0
  2. benchmark/MIT_Mystery_Hunt/puzzles/answers_tsv_state.json +383 -1
  3. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_1_2_3/1_2_3 +145 -0
  4. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_1_2_3/checkanswer.js +281 -0
  5. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_1_2_3/index.html +145 -0
  6. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_league_of_their_own/a_league_of_their_own +253 -0
  7. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_league_of_their_own/checkanswer.js +281 -0
  8. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_league_of_their_own/index.html +253 -0
  9. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_most_congenial_odyssey/a_most_congenial_odyssey +173 -0
  10. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_most_congenial_odyssey/checkanswer.js +281 -0
  11. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_most_congenial_odyssey/index.html +173 -0
  12. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_quick_sudoku/a_quick_sudoku +159 -0
  13. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_quick_sudoku/checkanswer.js +281 -0
  14. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_quick_sudoku/index.html +159 -0
  15. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_round_at_the_golf_course/a_round_at_the_golf_course +156 -0
  16. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_round_at_the_golf_course/checkanswer.js +281 -0
  17. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_round_at_the_golf_course/index.html +156 -0
  18. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_aborigine_dream_fragment/aborigine_dream_fragment +137 -0
  19. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_aborigine_dream_fragment/checkanswer.js +281 -0
  20. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_aborigine_dream_fragment/index.html +137 -0
  21. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_all_history_is_local/all_history_is_local +709 -0
  22. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_all_history_is_local/checkanswer.js +281 -0
  23. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_all_history_is_local/index.html +709 -0
  24. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_always_amusing/always_amusing +155 -0
  25. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_always_amusing/checkanswer.js +281 -0
  26. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_always_amusing/index.html +155 -0
  27. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_ascii_characters/ascii_characters +0 -0
  28. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_ascii_characters/checkanswer.js +281 -0
  29. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_ascii_characters/index.html +0 -0
  30. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_before_and_after/before_and_after +217 -0
  31. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_before_and_after/checkanswer.js +281 -0
  32. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_before_and_after/index.html +217 -0
  33. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_behind_the_music/behind_the_music +141 -0
  34. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_behind_the_music/checkanswer.js +281 -0
  35. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_behind_the_music/index.html +141 -0
  36. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_believe/believe +182 -0
  37. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_believe/checkanswer.js +281 -0
  38. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_believe/index.html +182 -0
  39. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_bits_of_nomenclature_zoned_appropriately/bits_of_nomenclature_zoned_appropriately +163 -0
  40. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_bits_of_nomenclature_zoned_appropriately/checkanswer.js +281 -0
  41. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_bits_of_nomenclature_zoned_appropriately/index.html +163 -0
  42. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_blazing_trails/blazing_trails +141 -0
  43. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_blazing_trails/checkanswer.js +281 -0
  44. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_blazing_trails/index.html +141 -0
  45. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_blocks/blocks +175 -0
  46. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_blocks/checkanswer.js +281 -0
  47. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_blocks/index.html +175 -0
  48. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_blocks_and_blocks/blocks_and_blocks +162 -0
  49. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_blocks_and_blocks/checkanswer.js +281 -0
  50. benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_blocks_and_blocks/index.html +162 -0
benchmark/MIT_Mystery_Hunt/puzzles/answers_tsv_manifest.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
benchmark/MIT_Mystery_Hunt/puzzles/answers_tsv_state.json CHANGED
@@ -1665,7 +1665,389 @@
1665
  "2014/puzzle/obsessive_compulsive_dickishness/",
1666
  "2014/puzzle/one_tequila_two_tequila_three_tequila_floor/",
1667
  "2014/puzzle/only_carmen_sandiego_explores_nigh_unstoppably/",
1668
- "2014/puzzle/operator_test/"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1669
  ],
1670
  "failed": {}
1671
  }
 
1665
  "2014/puzzle/obsessive_compulsive_dickishness/",
1666
  "2014/puzzle/one_tequila_two_tequila_three_tequila_floor/",
1667
  "2014/puzzle/only_carmen_sandiego_explores_nigh_unstoppably/",
1668
+ "2014/puzzle/operator_test/",
1669
+ "2014/puzzle/opposites_are_not_downbeats/",
1670
+ "2014/puzzle/oyster_card/",
1671
+ "2014/puzzle/please_remain_seated/",
1672
+ "2014/puzzle/puzzle_with_answer_a_hard_days_night/",
1673
+ "2014/puzzle/puzzle_with_answer_and_i_love_her/",
1674
+ "2014/puzzle/puzzle_with_answer_cant_buy_me_love/",
1675
+ "2014/puzzle/puzzle_with_answer_clemens/",
1676
+ "2014/puzzle/puzzle_with_answer_cronin/",
1677
+ "2014/puzzle/puzzle_with_answer_drive_my_car/",
1678
+ "2014/puzzle/puzzle_with_answer_eight_days_a_week/",
1679
+ "2014/puzzle/puzzle_with_answer_garciaparra/",
1680
+ "2014/puzzle/puzzle_with_answer_i_want_to_hold_your_hand/",
1681
+ "2014/puzzle/puzzle_with_answer_love_me_do/",
1682
+ "2014/puzzle/puzzle_with_answer_lynn/",
1683
+ "2014/puzzle/puzzle_with_answer_norwegian_wood/",
1684
+ "2014/puzzle/puzzle_with_answer_nowhere_man/",
1685
+ "2014/puzzle/puzzle_with_answer_rice/",
1686
+ "2014/puzzle/puzzle_with_answer_sullivan/",
1687
+ "2014/puzzle/puzzle_with_answer_williams/",
1688
+ "2014/puzzle/puzzle_with_answer_youkilis/",
1689
+ "2014/puzzle/ring_around_the_music/",
1690
+ "2014/puzzle/round_tripper/",
1691
+ "2014/puzzle/runaround_white_rabbit/",
1692
+ "2014/puzzle/safer_sephiroth/",
1693
+ "2014/puzzle/safety_first/",
1694
+ "2014/puzzle/sat_iii/",
1695
+ "2014/puzzle/saturdy_sundy/",
1696
+ "2014/puzzle/ski_trees/",
1697
+ "2014/puzzle/sledgehammered/",
1698
+ "2014/puzzle/sneaky_fox/",
1699
+ "2014/puzzle/some_nutty_lines/",
1700
+ "2014/puzzle/stage_select/",
1701
+ "2014/puzzle/stalk_us_maybe/",
1702
+ "2014/puzzle/stronghold_fire/",
1703
+ "2014/puzzle/talking_flowers_meta/",
1704
+ "2014/puzzle/technical_program_committee_report/",
1705
+ "2014/puzzle/thank_heaven_for_little_girls/",
1706
+ "2014/puzzle/the_circle_of_life/",
1707
+ "2014/puzzle/the_duck_konundrum_vi/",
1708
+ "2014/puzzle/the_great_collapse/",
1709
+ "2014/puzzle/the_most_dangerous_night/",
1710
+ "2014/puzzle/the_puzzle_your_puzzle_could_smell_like/",
1711
+ "2014/puzzle/the_revenge_of_yuki_nagato_episode_00/",
1712
+ "2014/puzzle/the_spy_who_read_me/",
1713
+ "2014/puzzle/time_flies/",
1714
+ "2014/puzzle/top_shelf/",
1715
+ "2014/puzzle/uncommon_nonsense/",
1716
+ "2014/puzzle/upstairs_downstairs/",
1717
+ "2014/puzzle/venntersections/",
1718
+ "2014/puzzle/walk_across_some_dungeons/",
1719
+ "2014/puzzle/wandering_stars/",
1720
+ "2014/puzzle/wat/",
1721
+ "2014/puzzle/wonderwang/",
1722
+ "2014/puzzle/youve_got_some_nerve/",
1723
+ "2014/puzzle/zoinks/",
1724
+ "2014/round/caucus_race/",
1725
+ "2014/round/events/",
1726
+ "2014/round/humpty_dumpty/",
1727
+ "2014/round/knights/",
1728
+ "2014/round/mit/",
1729
+ "2014/round/mock_turtle/",
1730
+ "2014/round/tea_party/",
1731
+ "2014/round/white_queen/",
1732
+ "2015/puzzle/a_case_of_the_monday_crosswords",
1733
+ "2015/puzzle/a_poem_by_shell_silverstein",
1734
+ "2015/puzzle/a_push_in_the_right_direction",
1735
+ "2015/puzzle/a_puzzle_consisting_entirely_of_random_anagrams",
1736
+ "2015/puzzle/a_rare_teak",
1737
+ "2015/puzzle/a_short_transmission",
1738
+ "2015/puzzle/a_thousand_words",
1739
+ "2015/puzzle/a_toast",
1740
+ "2015/puzzle/ariels_scavenger_hunt",
1741
+ "2015/puzzle/atlantean_graves",
1742
+ "2015/puzzle/atlantis_meta_meta",
1743
+ "2015/puzzle/back_and_forth",
1744
+ "2015/puzzle/back_on_the_move",
1745
+ "2015/puzzle/be_a_star",
1746
+ "2015/puzzle/benny_lava",
1747
+ "2015/puzzle/beth",
1748
+ "2015/puzzle/blocks",
1749
+ "2015/puzzle/blub_blub_pub_trivia",
1750
+ "2015/puzzle/blue_bomber",
1751
+ "2015/puzzle/bookshelves",
1752
+ "2015/puzzle/bubbles",
1753
+ "2015/puzzle/captain_agers_puzzling_adventure",
1754
+ "2015/puzzle/captain_planet",
1755
+ "2015/puzzle/charybdis_charades",
1756
+ "2015/puzzle/check_out_this_sticked_asiatic_music",
1757
+ "2015/puzzle/chemistry_lab_meta",
1758
+ "2015/puzzle/choose_your_language",
1759
+ "2015/puzzle/coins",
1760
+ "2015/puzzle/colorful_tower_meta",
1761
+ "2015/puzzle/connect_the_ducks",
1762
+ "2015/puzzle/constraint_chef",
1763
+ "2015/puzzle/coral_reef_meta",
1764
+ "2015/puzzle/cryptic_golf",
1765
+ "2015/puzzle/cryptochains",
1766
+ "2015/puzzle/cthulhu",
1767
+ "2015/puzzle/cube",
1768
+ "2015/puzzle/denizen_of_the_deep",
1769
+ "2015/puzzle/dory",
1770
+ "2015/puzzle/dr_nautiluss_secret_notes",
1771
+ "2015/puzzle/eh",
1772
+ "2015/puzzle/encephalon",
1773
+ "2015/puzzle/erraticism",
1774
+ "2015/puzzle/escape_from_the_classroom",
1775
+ "2015/puzzle/even_the_blossoming_flowers",
1776
+ "2015/puzzle/feeling_bluefin",
1777
+ "2015/puzzle/fencing",
1778
+ "2015/puzzle/field_trip",
1779
+ "2015/puzzle/fill_in_the_blanks",
1780
+ "2015/puzzle/finsey_gillhone",
1781
+ "2015/puzzle/fjf_s",
1782
+ "2015/puzzle/flat_containers",
1783
+ "2015/puzzle/floating_crossword",
1784
+ "2015/puzzle/foamy",
1785
+ "2015/puzzle/follow_the_bees",
1786
+ "2015/puzzle/frequency_distribution_tank",
1787
+ "2015/puzzle/funny_shapes",
1788
+ "2015/puzzle/game",
1789
+ "2015/puzzle/go_at_it",
1790
+ "2015/puzzle/go_fish",
1791
+ "2015/puzzle/golden_tower_meta",
1792
+ "2015/puzzle/goldfish_memory",
1793
+ "2015/puzzle/graveyard_meta",
1794
+ "2015/puzzle/hash",
1795
+ "2015/puzzle/hashi_it_out",
1796
+ "2015/puzzle/headshots",
1797
+ "2015/puzzle/hunt_life_3_confirmed",
1798
+ "2015/puzzle/i_know_thats_a_pisser_baby",
1799
+ "2015/puzzle/image",
1800
+ "2015/puzzle/imba",
1801
+ "2015/puzzle/its_play_time",
1802
+ "2015/puzzle/jack_and_jill_or_janet",
1803
+ "2015/puzzle/knit_square",
1804
+ "2015/puzzle/lead_right",
1805
+ "2015/puzzle/les_faux_amis_valent_rien",
1806
+ "2015/puzzle/lets_get_submersible",
1807
+ "2015/puzzle/locks",
1808
+ "2015/puzzle/loony_playhouse_actors",
1809
+ "2015/puzzle/machine_room_meta",
1810
+ "2015/puzzle/mashup",
1811
+ "2015/puzzle/memory_lane",
1812
+ "2015/puzzle/mit_mystery_hunt",
1813
+ "2015/puzzle/montages",
1814
+ "2015/puzzle/moves",
1815
+ "2015/puzzle/munchies",
1816
+ "2015/puzzle/mythological_connections",
1817
+ "2015/puzzle/nautiluss_duplicated_quest",
1818
+ "2015/puzzle/night_of_the_living_kraken",
1819
+ "2015/puzzle/nina",
1820
+ "2015/puzzle/no_pluto",
1821
+ "2015/puzzle/nope",
1822
+ "2015/puzzle/not_all_there",
1823
+ "2015/puzzle/ocean_meta_meta",
1824
+ "2015/puzzle/optics_lab_meta",
1825
+ "2015/puzzle/p1ctures",
1826
+ "2015/puzzle/paper_jigsaw",
1827
+ "2015/puzzle/people_and_places",
1828
+ "2015/puzzle/per_verse_poetry",
1829
+ "2015/puzzle/pipe",
1830
+ "2015/puzzle/pod_of_dolphins_meta",
1831
+ "2015/puzzle/polyglot",
1832
+ "2015/puzzle/practice_in_theory",
1833
+ "2015/puzzle/quodlibet",
1834
+ "2015/puzzle/read_between_the_lines",
1835
+ "2015/puzzle/ready_set_go",
1836
+ "2015/puzzle/rectangles",
1837
+ "2015/puzzle/representative_characters",
1838
+ "2015/puzzle/rid_fill",
1839
+ "2015/puzzle/ride_em_in",
1840
+ "2015/puzzle/ropes",
1841
+ "2015/puzzle/say_cheese_and_dive",
1842
+ "2015/puzzle/school_of_fish_meta",
1843
+ "2015/puzzle/shark_blood",
1844
+ "2015/puzzle/siamese_quintuplets",
1845
+ "2015/puzzle/smiling_vessel",
1846
+ "2015/puzzle/something_looks_fishy",
1847
+ "2015/puzzle/speak_of_the_devil_fruit",
1848
+ "2015/puzzle/spiky_tower_meta",
1849
+ "2015/puzzle/spittle_loon",
1850
+ "2015/puzzle/spongebob",
1851
+ "2015/puzzle/spotted_tower_meta",
1852
+ "2015/puzzle/starfish",
1853
+ "2015/puzzle/stay_out_of_the_trench",
1854
+ "2015/puzzle/steamteam",
1855
+ "2015/puzzle/steves_parable",
1856
+ "2015/puzzle/striptease",
1857
+ "2015/puzzle/sunken_treasure",
1858
+ "2015/puzzle/suns_of_china",
1859
+ "2015/puzzle/takeout_ordering",
1860
+ "2015/puzzle/tantalum",
1861
+ "2015/puzzle/the_10_000_puzzle_pyramid",
1862
+ "2015/puzzle/the_accumulator",
1863
+ "2015/puzzle/the_acerbic_sixteen",
1864
+ "2015/puzzle/the_cats_meow",
1865
+ "2015/puzzle/the_curse_of_the_atlanteans_tomb",
1866
+ "2015/puzzle/the_er_of_men",
1867
+ "2015/puzzle/the_hidden_city",
1868
+ "2015/puzzle/the_last_airbender",
1869
+ "2015/puzzle/the_misspelled_insects",
1870
+ "2015/puzzle/the_resistance",
1871
+ "2015/puzzle/the_sun_will_come_out",
1872
+ "2015/puzzle/the_wheels_go_round_and_round",
1873
+ "2015/puzzle/this_puzzle_has_no_errata",
1874
+ "2015/puzzle/this_story_is_canon",
1875
+ "2015/puzzle/threes_the_charm",
1876
+ "2015/puzzle/tickle_me_pink",
1877
+ "2015/puzzle/time_amp_place",
1878
+ "2015/puzzle/time_is_out_of_joint",
1879
+ "2015/puzzle/toasting_the_bagel",
1880
+ "2015/puzzle/topsy_turvy",
1881
+ "2015/puzzle/tournament",
1882
+ "2015/puzzle/treasure_chest_meta",
1883
+ "2015/puzzle/trivia_round",
1884
+ "2015/puzzle/twelve_grids_of_pictures",
1885
+ "2015/puzzle/ukacd",
1886
+ "2015/puzzle/wait_what_did_you_say",
1887
+ "2015/puzzle/watch_me_blow_this",
1888
+ "2015/puzzle/welcome_to_dead_waters",
1889
+ "2015/puzzle/wizardly_tales",
1890
+ "2015/puzzle/wood",
1891
+ "2015/puzzle/word_fork",
1892
+ "2015/puzzle/wordsearches_are_a_piece_of_cake",
1893
+ "2015/puzzle/workshop_meta_meta",
1894
+ "2015/puzzle/write_it_build_it",
1895
+ "2016/puzzle/1_2_3",
1896
+ "2016/puzzle/a_league_of_their_own",
1897
+ "2016/puzzle/a_most_congenial_odyssey",
1898
+ "2016/puzzle/a_quick_sudoku",
1899
+ "2016/puzzle/a_round_at_the_golf_course",
1900
+ "2016/puzzle/aborigine_dream_fragment",
1901
+ "2016/puzzle/all_history_is_local",
1902
+ "2016/puzzle/always_amusing",
1903
+ "2016/puzzle/ascii_characters",
1904
+ "2016/puzzle/before_and_after",
1905
+ "2016/puzzle/behind_the_music",
1906
+ "2016/puzzle/believe",
1907
+ "2016/puzzle/bits_of_nomenclature_zoned_appropriately",
1908
+ "2016/puzzle/blazing_trails",
1909
+ "2016/puzzle/blocks",
1910
+ "2016/puzzle/blocks_and_blocks",
1911
+ "2016/puzzle/boxes_tm",
1912
+ "2016/puzzle/cannery",
1913
+ "2016/puzzle/click_to_win",
1914
+ "2016/puzzle/crimes_against_cruciverbalism",
1915
+ "2016/puzzle/crushed_petals",
1916
+ "2016/puzzle/cubism",
1917
+ "2016/puzzle/disappointment",
1918
+ "2016/puzzle/dog_food",
1919
+ "2016/puzzle/dont_cross_an_alpha_bitch",
1920
+ "2016/puzzle/emergency_deportation",
1921
+ "2016/puzzle/endymion_dream_fragment",
1922
+ "2016/puzzle/everything_you_read",
1923
+ "2016/puzzle/feel_the_music",
1924
+ "2016/puzzle/field_scribe",
1925
+ "2016/puzzle/follow_the_pipes",
1926
+ "2016/puzzle/formulating_teams",
1927
+ "2016/puzzle/fun_sized",
1928
+ "2016/puzzle/gaming_the_system",
1929
+ "2016/puzzle/girl_talk",
1930
+ "2016/puzzle/gravitational_pull",
1931
+ "2016/puzzle/haddock_walk",
1932
+ "2016/puzzle/high_rollers",
1933
+ "2016/puzzle/honey_i_shrunk_the_hunt",
1934
+ "2016/puzzle/how_far",
1935
+ "2016/puzzle/i_never_promised_you_a_rows_garden",
1936
+ "2016/puzzle/identify_sort_index_solve",
1937
+ "2016/puzzle/indecipherable",
1938
+ "2016/puzzle/is_that_even_music",
1939
+ "2016/puzzle/it_is_what_it_is",
1940
+ "2016/puzzle/its_a_long_story",
1941
+ "2016/puzzle/its_so_obvious",
1942
+ "2016/puzzle/jackson_pollock",
1943
+ "2016/puzzle/king_arthur_dream_fragment",
1944
+ "2016/puzzle/ladder_dogs",
1945
+ "2016/puzzle/lesser_works",
1946
+ "2016/puzzle/life_braid",
1947
+ "2016/puzzle/losers",
1948
+ "2016/puzzle/lost_skull",
1949
+ "2016/puzzle/luminance_shift",
1950
+ "2016/puzzle/luna_park",
1951
+ "2016/puzzle/mad_dogs",
1952
+ "2016/puzzle/may_the_shortz_be_with_you",
1953
+ "2016/puzzle/meet_the_loremipsumstanis",
1954
+ "2016/puzzle/meshed_together",
1955
+ "2016/puzzle/mind_your_peas",
1956
+ "2016/puzzle/missed_connections",
1957
+ "2016/puzzle/missing_the_mark",
1958
+ "2016/puzzle/obstacle_training",
1959
+ "2016/puzzle/off_the_leash",
1960
+ "2016/puzzle/on_the_road",
1961
+ "2016/puzzle/one_starry_night",
1962
+ "2016/puzzle/opus_dream_fragment",
1963
+ "2016/puzzle/orbits",
1964
+ "2016/puzzle/paddywhack",
1965
+ "2016/puzzle/paint_it_black",
1966
+ "2016/puzzle/pam_ewing_dream_fragment",
1967
+ "2016/puzzle/peter_is_the_bomb",
1968
+ "2016/puzzle/pictocryptolists",
1969
+ "2016/puzzle/prints",
1970
+ "2016/puzzle/provision",
1971
+ "2016/puzzle/puzzle_extravaganza",
1972
+ "2016/puzzle/quantum_minesweeper",
1973
+ "2016/puzzle/quest_for_the_truth",
1974
+ "2016/puzzle/quilt_by_association",
1975
+ "2016/puzzle/race_around_the_block_again",
1976
+ "2016/puzzle/randolph_carter_dream_fragment",
1977
+ "2016/puzzle/reaching_for_the_stars",
1978
+ "2016/puzzle/replication",
1979
+ "2016/puzzle/rhythms_of_the_season",
1980
+ "2016/puzzle/ribbons",
1981
+ "2016/puzzle/rip_van_winkle_dream_fragment",
1982
+ "2016/puzzle/road_trip",
1983
+ "2016/puzzle/roller_coaster",
1984
+ "2016/puzzle/satellite_navigation",
1985
+ "2016/puzzle/sculptural_disassembly",
1986
+ "2016/puzzle/see_spot_run",
1987
+ "2016/puzzle/sleeping_beauty_dream_fragment",
1988
+ "2016/puzzle/sleeping_gypsy_dream_fragment",
1989
+ "2016/puzzle/so_smart",
1990
+ "2016/puzzle/some_assembly_required_sar",
1991
+ "2016/puzzle/something_for_everyone",
1992
+ "2016/puzzle/soul_searching",
1993
+ "2016/puzzle/spot_the_dog",
1994
+ "2016/puzzle/staggered_starts",
1995
+ "2016/puzzle/student_simulator",
1996
+ "2016/puzzle/the_case_of_the_dangerous_game",
1997
+ "2016/puzzle/the_contest",
1998
+ "2016/puzzle/the_dogged_pursuit_of_justice_aka_caught_red_handed",
1999
+ "2016/puzzle/the_eldritch_gambrel_scavenger_hunt",
2000
+ "2016/puzzle/the_fire_swamp",
2001
+ "2016/puzzle/the_foetid_charnel_pie_charts",
2002
+ "2016/puzzle/the_gibbous_non_euclidean_program",
2003
+ "2016/puzzle/the_indescribable_amorphous_cryptic",
2004
+ "2016/puzzle/the_lost_dream",
2005
+ "2016/puzzle/the_man_in_the_moon",
2006
+ "2016/puzzle/the_pernicious_revenge_of_juno",
2007
+ "2016/puzzle/the_scenic_route",
2008
+ "2016/puzzle/the_shunned_cyclopean_postcards",
2009
+ "2016/puzzle/the_sound_of_silence",
2010
+ "2016/puzzle/the_spectral_daemoniac_web_of_links",
2011
+ "2016/puzzle/the_tenebrous_stygian_test_of_knowledge",
2012
+ "2016/puzzle/the_tv_puzzle",
2013
+ "2016/puzzle/the_unutterable_antediluvian_robots_in_disguise",
2014
+ "2016/puzzle/the_white_house_or_bust",
2015
+ "2016/puzzle/thinking_caps",
2016
+ "2016/puzzle/time_suck",
2017
+ "2016/puzzle/to_serve_and_protect",
2018
+ "2016/puzzle/toll_bridges",
2019
+ "2016/puzzle/trail_goods",
2020
+ "2016/puzzle/travelogue",
2021
+ "2016/puzzle/triangular_intrigue",
2022
+ "2016/puzzle/triptychs",
2023
+ "2016/puzzle/trivial_mathematics",
2024
+ "2016/puzzle/trubled_monicas",
2025
+ "2016/puzzle/unimaginably_twisted_files",
2026
+ "2016/puzzle/vagabond_tours",
2027
+ "2016/puzzle/vocabulary_quiz",
2028
+ "2016/puzzle/wanderer",
2029
+ "2016/puzzle/whistle_training",
2030
+ "2016/puzzle/who",
2031
+ "2016/puzzle/wisdom_is_eternal",
2032
+ "2016/puzzle/words_search",
2033
+ "2016/puzzle/world_s_longest_diagramless",
2034
+ "2016/puzzle/worldly_possessions",
2035
+ "2016/puzzle/worrying_ziggurats",
2036
+ "2016/puzzle/you_complete_me",
2037
+ "2016/puzzle/ysera_dream_fragment",
2038
+ "2016/puzzle/zodiac_quest",
2039
+ "2016/round/dog_show",
2040
+ "2016/round/dreamtime",
2041
+ "2016/round/endymion",
2042
+ "2016/round/king_arthur",
2043
+ "2016/round/limbo",
2044
+ "2016/round/opus",
2045
+ "2016/round/pam_ewing",
2046
+ "2016/round/randolph_carter",
2047
+ "2016/round/rip_van_winkle",
2048
+ "2016/round/sleeping_beauty",
2049
+ "2016/round/sleeping_gypsy",
2050
+ "2016/round/ysera"
2051
  ],
2052
  "failed": {}
2053
  }
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_1_2_3/1_2_3 ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>1, 2, 3 &mdash; Dreamtime &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dreamtime/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/1_2_3/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/dreamtime"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/dreamtime/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+
107
+ <img class="puzzle-logo" src="../../static/round/dreamtime/images/1_2_3/header.png">
108
+
109
+
110
+ <h2>1, 2, 3</h2>
111
+
112
+ </div>
113
+ <div class="content">
114
+ <p><a href="images/ott.pdf">[View this puzzle as a PDF]</a></p>
115
+
116
+ </div>
117
+ </div>
118
+ </div>
119
+
120
+
121
+
122
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
123
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
124
+ <script>
125
+ $(document).ready(function(){
126
+
127
+ $.getJSON('../../sheep.json')
128
+ .done(function(data) {
129
+ $('span.current-sheep').html(data.sheep);
130
+ $('span.next-update').html(data.update);
131
+ });
132
+
133
+ $("#nextupdate").hover(function(){
134
+ $('#navtooltip').addClass('hover');
135
+ }, function(){
136
+ $('#navtooltip').removeClass('hover');
137
+ });
138
+ });
139
+ </script>
140
+
141
+
142
+
143
+
144
+ </body><script type="module" src="/checkanswer.js"></script>
145
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_1_2_3/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/2016/2016_puzzle_1_2_3/index.html ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>1, 2, 3 &mdash; Dreamtime &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dreamtime/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/1_2_3/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/dreamtime"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/dreamtime/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+
107
+ <img class="puzzle-logo" src="../../static/round/dreamtime/images/1_2_3/header.png">
108
+
109
+
110
+ <h2>1, 2, 3</h2>
111
+
112
+ </div>
113
+ <div class="content">
114
+ <p><a href="images/ott.pdf">[View this puzzle as a PDF]</a></p>
115
+
116
+ </div>
117
+ </div>
118
+ </div>
119
+
120
+
121
+
122
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
123
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
124
+ <script>
125
+ $(document).ready(function(){
126
+
127
+ $.getJSON('../../sheep.json')
128
+ .done(function(data) {
129
+ $('span.current-sheep').html(data.sheep);
130
+ $('span.next-update').html(data.update);
131
+ });
132
+
133
+ $("#nextupdate").hover(function(){
134
+ $('#navtooltip').addClass('hover');
135
+ }, function(){
136
+ $('#navtooltip').removeClass('hover');
137
+ });
138
+ });
139
+ </script>
140
+
141
+
142
+
143
+
144
+ </body><script type="module" src="/checkanswer.js"></script>
145
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_league_of_their_own/a_league_of_their_own ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>A League of Their Own &mdash; Dreamtime &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dreamtime/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/a_league_of_their_own/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/dreamtime"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/dreamtime/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <h2>A League of Their Own</h2>
107
+
108
+ </div>
109
+ <div class="content">
110
+ <div style="font-family:Arial, sans-serif;color:#293A55;font-size:14px; padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;">
111
+ <p>
112
+ Sometimes having a league of your own means you can decide what the better answer is even if it isn't the right one.
113
+ </p>
114
+ </div>
115
+
116
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
117
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
118
+ <p style="text-indent:-15px;">1. What Dave Eggers memoir is told in rhyming pairs of lines? (1 13 4 2 10 8)</p><p class="list-indent">A.&nbsp;<input type="text" name="q1a" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="21"></p>
119
+ </div>
120
+ </div>
121
+
122
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
123
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
124
+ <p style="text-indent:-15px;">2. Name the Ashton Kutcher/Seann William Scott film about trying to find a lost elderly man. (4 5'1 2 11?)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="8"></p>
125
+ </div>
126
+ </div>
127
+
128
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
129
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
130
+ <p style="text-indent:-15px;">3. What rapper-endorsed company was formed when a major truck-rental company branched out into rafts and other river crafts? (4 5)</p><p class="list-indent">A.&nbsp;<input type="text" name="q3a" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="6"></p>
131
+ </div>
132
+ </div>
133
+
134
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
135
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
136
+ <p style="text-indent:-15px;">4. This fancy party is thrown annually for the most loyal "little monsters". (4 4)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" value="2" class="p2"></p>
137
+ </div>
138
+ </div>
139
+
140
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
141
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
142
+ <p style="text-indent:-15px;">5. What dessert lost at Little Bighorn? (7 6 7)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" value="5" size="1" maxlength="1" class="p2"></p>
143
+ </div>
144
+ </div>
145
+
146
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
147
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
148
+ <p style="text-indent:-15px;">6. What 2014 "play within a play" features Ed Oxenbould as the slain title character? (7 3 3 8 8 2 4 4 3 3)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" name="q6v" size="1" maxlength="1" class="p2" value="6"></p>
149
+ </div>
150
+ </div>
151
+
152
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
153
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
154
+ <p style="text-indent:-15px;">7. What car, bearing the number 53, is considered a real pest despite its good heart? (6 3 4 6)</p><p class="list-indent">A.&nbsp;<input type="text" name="q3a" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="15"></p>
155
+ </div>
156
+ </div>
157
+
158
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
159
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
160
+ <p style="text-indent:-15px;">8. What E! show presents the exciting travails of Nancy, Ron, Patti, and the gang? (7 2 4 3 7)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" name="q6v" size="1" maxlength="1" class="p2" value="2"></p>
161
+ </div>
162
+ </div>
163
+
164
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
165
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
166
+ <p style="text-indent:-15px;">9. Which first lady had her number retired by the Celtics? (5 4 7)</p><p class="list-indent">A.&nbsp;<input type="text" name="q3a" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="5"></p>
167
+ </div>
168
+ </div>
169
+
170
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
171
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
172
+ <p style="text-indent:-15px;">10. What spin-off show follows Steve McGarrett as he takes his talents to Boston? (13 4-1)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" name="q6v" size="1" maxlength="1" class="p2" value="7"></p>
173
+ </div>
174
+ </div>
175
+
176
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
177
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
178
+ <p style="text-indent:-15px;">11. What classic Whitman poem is a paean to a breakfast-cereal mascot? (1 3'1 2 3'1 6)</p><p class="list-indent">A.&nbsp;<input type="text" name="q3a" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="13"></p>
179
+ </div>
180
+ </div>
181
+
182
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
183
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
184
+ <p style="text-indent:-15px;">12. What are "Omaha", "Marshall", "Montana", and "Apple Apple"? (6 7 4 5)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="9"></p>
185
+ </div>
186
+ </div>
187
+
188
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
189
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
190
+ <p style="text-indent:-15px;">13. What ailment often arises after working out a very difficult (-b +- sqrt(b^2 - 4ac)) / 2a calculation? (4-9 6 8)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" value="9" class="p2"></p>
191
+ </div>
192
+ </div>
193
+
194
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
195
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
196
+ <p style="text-indent:-15px;">14. What graceful New Jersey-based hair-metal band is noted for their long white necks? (4 4)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2" name="3">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" name="q6v" size="1" maxlength="1" class="p2" value="3"></p>
197
+ </div>
198
+ </div>
199
+
200
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
201
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
202
+ <p style="text-indent:-15px;">15. Who are the subjects of "Back to December", "Dear John", &amp; "We Are Never Ever Getting Back Together"? (6 5 2-10)</p><p class="list-indent">A.&nbsp;<input type="text" name="q3a" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="2"></p>
203
+ </div>
204
+ </div>
205
+
206
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
207
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
208
+ <p style="text-indent:-15px;">16. What British-French-Swedish film tells the tale of a chef, a robber, the robber's spouse, and a Scandinavian lye-treated fish? (3 4, 3 5, 3 4 3 3 8)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="1"></p>
209
+ </div>
210
+ </div>
211
+
212
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
213
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
214
+ <p style="text-indent:-15px;">17. What fringe political party was founded by Lord James McMillan? (3 4 2 3 6 4)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="6"></p>
215
+ </div>
216
+ </div>
217
+
218
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
219
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
220
+ <p style="text-indent:-15px;">18. What group sings the '90s hits "Poison" and "Do Me!" as well as an instrumental from "The Exorcist"? (7 4 3 5)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" name="q6v" size="1" maxlength="1" class="p2" value="5"></p>
221
+ </div>
222
+ </div>
223
+
224
+ </div>
225
+ </div>
226
+ </div>
227
+
228
+
229
+
230
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
231
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
232
+ <script>
233
+ $(document).ready(function(){
234
+
235
+ $.getJSON('../../sheep.json')
236
+ .done(function(data) {
237
+ $('span.current-sheep').html(data.sheep);
238
+ $('span.next-update').html(data.update);
239
+ });
240
+
241
+ $("#nextupdate").hover(function(){
242
+ $('#navtooltip').addClass('hover');
243
+ }, function(){
244
+ $('#navtooltip').removeClass('hover');
245
+ });
246
+ });
247
+ </script>
248
+
249
+
250
+
251
+
252
+ </body><script type="module" src="/checkanswer.js"></script>
253
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_league_of_their_own/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/2016/2016_puzzle_a_league_of_their_own/index.html ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>A League of Their Own &mdash; Dreamtime &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dreamtime/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/a_league_of_their_own/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/dreamtime"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/dreamtime/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <h2>A League of Their Own</h2>
107
+
108
+ </div>
109
+ <div class="content">
110
+ <div style="font-family:Arial, sans-serif;color:#293A55;font-size:14px; padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;">
111
+ <p>
112
+ Sometimes having a league of your own means you can decide what the better answer is even if it isn't the right one.
113
+ </p>
114
+ </div>
115
+
116
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
117
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
118
+ <p style="text-indent:-15px;">1. What Dave Eggers memoir is told in rhyming pairs of lines? (1 13 4 2 10 8)</p><p class="list-indent">A.&nbsp;<input type="text" name="q1a" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="21"></p>
119
+ </div>
120
+ </div>
121
+
122
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
123
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
124
+ <p style="text-indent:-15px;">2. Name the Ashton Kutcher/Seann William Scott film about trying to find a lost elderly man. (4 5'1 2 11?)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="8"></p>
125
+ </div>
126
+ </div>
127
+
128
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
129
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
130
+ <p style="text-indent:-15px;">3. What rapper-endorsed company was formed when a major truck-rental company branched out into rafts and other river crafts? (4 5)</p><p class="list-indent">A.&nbsp;<input type="text" name="q3a" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="6"></p>
131
+ </div>
132
+ </div>
133
+
134
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
135
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
136
+ <p style="text-indent:-15px;">4. This fancy party is thrown annually for the most loyal "little monsters". (4 4)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" value="2" class="p2"></p>
137
+ </div>
138
+ </div>
139
+
140
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
141
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
142
+ <p style="text-indent:-15px;">5. What dessert lost at Little Bighorn? (7 6 7)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" value="5" size="1" maxlength="1" class="p2"></p>
143
+ </div>
144
+ </div>
145
+
146
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
147
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
148
+ <p style="text-indent:-15px;">6. What 2014 "play within a play" features Ed Oxenbould as the slain title character? (7 3 3 8 8 2 4 4 3 3)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" name="q6v" size="1" maxlength="1" class="p2" value="6"></p>
149
+ </div>
150
+ </div>
151
+
152
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
153
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
154
+ <p style="text-indent:-15px;">7. What car, bearing the number 53, is considered a real pest despite its good heart? (6 3 4 6)</p><p class="list-indent">A.&nbsp;<input type="text" name="q3a" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="15"></p>
155
+ </div>
156
+ </div>
157
+
158
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
159
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
160
+ <p style="text-indent:-15px;">8. What E! show presents the exciting travails of Nancy, Ron, Patti, and the gang? (7 2 4 3 7)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" name="q6v" size="1" maxlength="1" class="p2" value="2"></p>
161
+ </div>
162
+ </div>
163
+
164
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
165
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
166
+ <p style="text-indent:-15px;">9. Which first lady had her number retired by the Celtics? (5 4 7)</p><p class="list-indent">A.&nbsp;<input type="text" name="q3a" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="5"></p>
167
+ </div>
168
+ </div>
169
+
170
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
171
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
172
+ <p style="text-indent:-15px;">10. What spin-off show follows Steve McGarrett as he takes his talents to Boston? (13 4-1)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" name="q6v" size="1" maxlength="1" class="p2" value="7"></p>
173
+ </div>
174
+ </div>
175
+
176
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
177
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
178
+ <p style="text-indent:-15px;">11. What classic Whitman poem is a paean to a breakfast-cereal mascot? (1 3'1 2 3'1 6)</p><p class="list-indent">A.&nbsp;<input type="text" name="q3a" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="13"></p>
179
+ </div>
180
+ </div>
181
+
182
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
183
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
184
+ <p style="text-indent:-15px;">12. What are "Omaha", "Marshall", "Montana", and "Apple Apple"? (6 7 4 5)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="9"></p>
185
+ </div>
186
+ </div>
187
+
188
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
189
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
190
+ <p style="text-indent:-15px;">13. What ailment often arises after working out a very difficult (-b +- sqrt(b^2 - 4ac)) / 2a calculation? (4-9 6 8)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" value="9" class="p2"></p>
191
+ </div>
192
+ </div>
193
+
194
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
195
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
196
+ <p style="text-indent:-15px;">14. What graceful New Jersey-based hair-metal band is noted for their long white necks? (4 4)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2" name="3">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" name="q6v" size="1" maxlength="1" class="p2" value="3"></p>
197
+ </div>
198
+ </div>
199
+
200
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
201
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
202
+ <p style="text-indent:-15px;">15. Who are the subjects of "Back to December", "Dear John", &amp; "We Are Never Ever Getting Back Together"? (6 5 2-10)</p><p class="list-indent">A.&nbsp;<input type="text" name="q3a" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="2"></p>
203
+ </div>
204
+ </div>
205
+
206
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
207
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
208
+ <p style="text-indent:-15px;">16. What British-French-Swedish film tells the tale of a chef, a robber, the robber's spouse, and a Scandinavian lye-treated fish? (3 4, 3 5, 3 4 3 3 8)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="1"></p>
209
+ </div>
210
+ </div>
211
+
212
+ <div style="background-color:#F6F7F2;width:100%;border-top:1px solid Gainsboro;padding:9px;">
213
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
214
+ <p style="text-indent:-15px;">17. What fringe political party was founded by Lord James McMillan? (3 4 2 3 6 4)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" size="1" maxlength="1" class="p2" value="6"></p>
215
+ </div>
216
+ </div>
217
+
218
+ <div style="background-color:#FFFFFF;width:100%;border-top:1px solid Gainsboro;padding:9px;">
219
+ <div style="font-family:Arial, sans-serif;font-size: 14px;padding: 0px 3px 7px 15px;margin: 6px 0px 0px 0px;color: #293A55;">
220
+ <p style="text-indent:-15px;">18. What group sings the '90s hits "Poison" and "Do Me!" as well as an instrumental from "The Exorcist"? (7 4 3 5)</p><p class="list-indent">A.&nbsp;<input type="text" size="40" maxlength="130" class="p2">&nbsp;&nbsp;&nbsp;Pts:&nbsp;<input type="text" name="q6v" size="1" maxlength="1" class="p2" value="5"></p>
221
+ </div>
222
+ </div>
223
+
224
+ </div>
225
+ </div>
226
+ </div>
227
+
228
+
229
+
230
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
231
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
232
+ <script>
233
+ $(document).ready(function(){
234
+
235
+ $.getJSON('../../sheep.json')
236
+ .done(function(data) {
237
+ $('span.current-sheep').html(data.sheep);
238
+ $('span.next-update').html(data.update);
239
+ });
240
+
241
+ $("#nextupdate").hover(function(){
242
+ $('#navtooltip').addClass('hover');
243
+ }, function(){
244
+ $('#navtooltip').removeClass('hover');
245
+ });
246
+ });
247
+ </script>
248
+
249
+
250
+
251
+
252
+ </body><script type="module" src="/checkanswer.js"></script>
253
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_most_congenial_odyssey/a_most_congenial_odyssey ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>A Most Congenial Odyssey &mdash; Pam Ewing &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/pam_ewing/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/a_most_congenial_odyssey/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/pam_ewing"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/pam_ewing/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <img class="puzzle-logo" src="../../static/round/pam_ewing/images/a_most_congenial_odyssey/header.png">
107
+
108
+ <h2>A Most Congenial Odyssey</h2>
109
+
110
+ </div>
111
+ <div class="content">
112
+ <p class="flavortext">Oh no, he's starting to ramble again.</p>
113
+
114
+ <p>My odyssey began in the hottest part of the summer, at the very beginning of August – only five months ago. It was a dry heat, totally unlike the sweltering humid stickiness of Back Bay (or along the Charles, for that matter). It would have probably been cooler a few weeks later; I don’t know why it couldn’t have started then, as it normally would.</p>
115
+
116
+ <p>Any good odyssey begins at a memorable starting point. Mine began at that big sculpture of a head which Massachusetts is known for. (Surely that’s one of a kind, right?) I traveled southerly from there, until I reached a fork in the road. From there, I could have gone to New York or Delaware. I chose to travel west, but I turned south to avoid crossing a Meridian. As I travelled south, I faced a monumental climb (331 steps, to be precise); upon the climb’s completion, I took in the panoramic view as I determined where my travels would lead me next. As befits any intrepid traveler, I also picked up a shirt commemorating my accomplishment at the gift shop, before continuing to proceed south.</p>
117
+
118
+ <p>Upon reaching Georgia, I made the decision to travel west. A short distance to the west of the Capitol, I paused to admire some truly riveting construction work in progress. I suppose I should clarify that statement; I was riveted, but the construction workers used no fasteners whatsoever. A sudden gust blew through, but fortunately, most of the construction was unaffected. I doglegged a few yards to the south to avoid the construction as I proceeded, and continued west, turning south as soon as I passed the on-ramp/off-ramp combination to my left. I presented my passport to the border guard there, and I was immediately transported to a land of wonder and whimsy. Who knows what sort of fantastical creature I might encounter here?</p>
119
+
120
+ <p>I immediately made a point of getting my bearings. To my right was a path of onyx; after consulting with a gentleman standing there, I elected to continue travelling south. As I proceeded, people were congregated to my left and right under placards which declared that aviation was a figment of the imagination. The very notion made me chuckle, and I shook my head as I passed through the crowds, turning left immediately after I made it through. Coming face-to-face with pirates, I turned to the right, but almost immediately I ran into a major storm, so I turned left, then right to avoid it. Proceeding south, I noticed a giant steampunk robot to my right, along with a bunch of spare parts of various shapes and colors. “Who are you?” I asked the robot. The robot did not respond, but I did receive a third-party answer from one of the people keeping watch over the parts nearby. I thanked her kindly, got my bearings, and decide to head east. On my way, I adjusted my course slightly to left twice before the path ended. </p>
121
+
122
+ <p>As I considered my next move, I noticed an exterminator close at hand, operating outside a nearby booth. “What kind of machine is that?” I asked, pointing in the appropriate direction. Nobody seemed to know for certain, though somebody suggested that it may have been purchased second-hand.</p>
123
+
124
+ <p>Leaving the exterminator to his work, I elected to proceed south, passing a nation proclaiming its official policy of non-violence. In that spirit, upon reaching the training ground, I turned to my right and then to my left (to proceed south again) to travel around the perimeter of those grounds. Having reached a point where I could travel south no further I turned to travel west; then having travelled west until I could travel no further, I travelled to the north again, observing a commune of artists to my left going about their business as I did so. As I finished passing the commune, I observed a blind burrowing animal to my right. I don’t trust the weasely things, so I took an immediate left turn, observing some obscure ancient wonders as I proceeded in my new direction. As I continued along this new path, I passed the den of a wolf, a pair of purveyors of kilts, a slugfest, and even an assortment of plans which would have obvious appeal to someone like Bugs Bunny.</p>
125
+
126
+ <p>Having proceeded in that direction until I could go no further, I turned once again to the north. Before I had travelled very far, however, I happened upon a kobold, which frightened me into taking a path heading west. As I meandered in this direction I came upon a line of people at a photo booth, getting their picture taken with someone glad-handing them with great gusto. Curious, I joined the line, and was pleased to discover as I talked to the people ahead of me that encounter would not cost me 40 gold pieces, as I might have expected.</p>
127
+
128
+ <p>When I reached the head of the line, I had a chance to have a quick chat with him as the photographer set up. “Who are you?” I asked, and he told me. We talked about apocalyptic fiction (he’s particularly fond of “The Seventh Seal”), care of one’s beard or beard-analogue, and how surprising it is that he actually has to moisturize. We said cheese for the photographer, and I took the adjacent path to the north on the west side.</p>
129
+
130
+ <p>At this point my mouth was really dry. (I think that old guy at the photo booth may have addled my brain significantly too, but first things first.) As I continued to meander north in my foggy-headed state, I happened upon a shop where a casual glance informed me that all they sold was gum, and I bought their eight-flavor special, unzipped it, and tore into it in a frenzy. I pulled out a pack at random, worked it open, grabbed a stick, and popped it into my mouth. The texture was even worse than the gum I remembered from the packs of baseball cards when I was young, and the taste was just not right. I took another glance at the pack, then dropped it in horror. Why on earth would anyone invent fly-flavored chewing gum? “Who would sell this?" I asked the now thoroughly bewildered person behind the counter. I asked about the shady business practices of their company until he eventually pleaded the fifth.</p>
131
+
132
+ <p>After that bizarre episode, I really needed to take a walk and clear my head. I went north, then took a right at the pink bunny, and continued on, passing a self-proclaimed nice guy before coming to a stop. The signage seemed to indicate a superhero was nearby, but I saw no trace of capes or leotards in the area with the signs – nor even the conspicuously button down-glasses and boring hairstyles of a typical alter ego. Eventually, I flagged down one of several similarly-dressed people I assumed to be acolytes of their hero and asked “So who do you work for?” She pointed to one of the signs and with a smile, she told me that that was the first time anyone ever asked her that question.</p>
133
+
134
+ <p>I continued heading east. As I proceeded, I noted a great throng of people there, all facing what appeared to be the king of... something. All of the pomp and circumstance reminded me of the funeral of someone really important – a giant in his field, maybe – except that everyone was really happy. I joined the lines to pay my respects. “What’s everyone so excited about?” I asked. He said it was something he had done, although everyone present had a role to play. I said I had always dreamed of traveling to the stars with him, and asked if he could make it so, only to discover that I was decades too late for that. (I might need to settle for the outer reaches of earthbound 60187 or 60189 instead.) </p>
135
+
136
+ <p>At this point, I decided that he looked like he could use a little fortification, so I offered him some of my mead. He declined politely, but indicated that if I had a fifth of whiskey he might partake of that instead. With that jovial encounter completed, I returned to the eastward path I was previously proceeding on, passing by those deniers of aviation again (though in a different direction this time).</p>
137
+
138
+ <p>After passing by some laboratories to my left and right I turned left, with my odyssey nearly completed and my exit in sight. As I proceeded to the north, I suddenly noticed a bespectacled man with a ponytail. He looked familiar to me from MIT Mystery Hunts of times past. “Dude!” I said, “This place is like a Maze of –“ He looked at me quizzically, then pointed at a neighboring display. “Uh, never mind. At any rate, I’ve almost finished a different puzzling odyssey.”
139
+ “Ah! And now you wish to make order out of your chaos.” he said. “I can help you. The order you seek is funerary, transatlantic, different in Canada, pseudovictorian, ancient, and vext”.</p>
140
+
141
+ <p>I thanked the gentleman, as his wise words enabled me to make sense of my encounters. Then I strolled away, my odyssey complete.</p>
142
+
143
+
144
+ </div>
145
+ </div>
146
+ </div>
147
+
148
+
149
+
150
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
151
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
152
+ <script>
153
+ $(document).ready(function(){
154
+
155
+ $.getJSON('../../sheep.json')
156
+ .done(function(data) {
157
+ $('span.current-sheep').html(data.sheep);
158
+ $('span.next-update').html(data.update);
159
+ });
160
+
161
+ $("#nextupdate").hover(function(){
162
+ $('#navtooltip').addClass('hover');
163
+ }, function(){
164
+ $('#navtooltip').removeClass('hover');
165
+ });
166
+ });
167
+ </script>
168
+
169
+
170
+
171
+
172
+ </body><script type="module" src="/checkanswer.js"></script>
173
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_most_congenial_odyssey/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/2016/2016_puzzle_a_most_congenial_odyssey/index.html ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>A Most Congenial Odyssey &mdash; Pam Ewing &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/pam_ewing/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/a_most_congenial_odyssey/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/pam_ewing"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/pam_ewing/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <img class="puzzle-logo" src="../../static/round/pam_ewing/images/a_most_congenial_odyssey/header.png">
107
+
108
+ <h2>A Most Congenial Odyssey</h2>
109
+
110
+ </div>
111
+ <div class="content">
112
+ <p class="flavortext">Oh no, he's starting to ramble again.</p>
113
+
114
+ <p>My odyssey began in the hottest part of the summer, at the very beginning of August – only five months ago. It was a dry heat, totally unlike the sweltering humid stickiness of Back Bay (or along the Charles, for that matter). It would have probably been cooler a few weeks later; I don’t know why it couldn’t have started then, as it normally would.</p>
115
+
116
+ <p>Any good odyssey begins at a memorable starting point. Mine began at that big sculpture of a head which Massachusetts is known for. (Surely that’s one of a kind, right?) I traveled southerly from there, until I reached a fork in the road. From there, I could have gone to New York or Delaware. I chose to travel west, but I turned south to avoid crossing a Meridian. As I travelled south, I faced a monumental climb (331 steps, to be precise); upon the climb’s completion, I took in the panoramic view as I determined where my travels would lead me next. As befits any intrepid traveler, I also picked up a shirt commemorating my accomplishment at the gift shop, before continuing to proceed south.</p>
117
+
118
+ <p>Upon reaching Georgia, I made the decision to travel west. A short distance to the west of the Capitol, I paused to admire some truly riveting construction work in progress. I suppose I should clarify that statement; I was riveted, but the construction workers used no fasteners whatsoever. A sudden gust blew through, but fortunately, most of the construction was unaffected. I doglegged a few yards to the south to avoid the construction as I proceeded, and continued west, turning south as soon as I passed the on-ramp/off-ramp combination to my left. I presented my passport to the border guard there, and I was immediately transported to a land of wonder and whimsy. Who knows what sort of fantastical creature I might encounter here?</p>
119
+
120
+ <p>I immediately made a point of getting my bearings. To my right was a path of onyx; after consulting with a gentleman standing there, I elected to continue travelling south. As I proceeded, people were congregated to my left and right under placards which declared that aviation was a figment of the imagination. The very notion made me chuckle, and I shook my head as I passed through the crowds, turning left immediately after I made it through. Coming face-to-face with pirates, I turned to the right, but almost immediately I ran into a major storm, so I turned left, then right to avoid it. Proceeding south, I noticed a giant steampunk robot to my right, along with a bunch of spare parts of various shapes and colors. “Who are you?” I asked the robot. The robot did not respond, but I did receive a third-party answer from one of the people keeping watch over the parts nearby. I thanked her kindly, got my bearings, and decide to head east. On my way, I adjusted my course slightly to left twice before the path ended. </p>
121
+
122
+ <p>As I considered my next move, I noticed an exterminator close at hand, operating outside a nearby booth. “What kind of machine is that?” I asked, pointing in the appropriate direction. Nobody seemed to know for certain, though somebody suggested that it may have been purchased second-hand.</p>
123
+
124
+ <p>Leaving the exterminator to his work, I elected to proceed south, passing a nation proclaiming its official policy of non-violence. In that spirit, upon reaching the training ground, I turned to my right and then to my left (to proceed south again) to travel around the perimeter of those grounds. Having reached a point where I could travel south no further I turned to travel west; then having travelled west until I could travel no further, I travelled to the north again, observing a commune of artists to my left going about their business as I did so. As I finished passing the commune, I observed a blind burrowing animal to my right. I don’t trust the weasely things, so I took an immediate left turn, observing some obscure ancient wonders as I proceeded in my new direction. As I continued along this new path, I passed the den of a wolf, a pair of purveyors of kilts, a slugfest, and even an assortment of plans which would have obvious appeal to someone like Bugs Bunny.</p>
125
+
126
+ <p>Having proceeded in that direction until I could go no further, I turned once again to the north. Before I had travelled very far, however, I happened upon a kobold, which frightened me into taking a path heading west. As I meandered in this direction I came upon a line of people at a photo booth, getting their picture taken with someone glad-handing them with great gusto. Curious, I joined the line, and was pleased to discover as I talked to the people ahead of me that encounter would not cost me 40 gold pieces, as I might have expected.</p>
127
+
128
+ <p>When I reached the head of the line, I had a chance to have a quick chat with him as the photographer set up. “Who are you?” I asked, and he told me. We talked about apocalyptic fiction (he’s particularly fond of “The Seventh Seal”), care of one’s beard or beard-analogue, and how surprising it is that he actually has to moisturize. We said cheese for the photographer, and I took the adjacent path to the north on the west side.</p>
129
+
130
+ <p>At this point my mouth was really dry. (I think that old guy at the photo booth may have addled my brain significantly too, but first things first.) As I continued to meander north in my foggy-headed state, I happened upon a shop where a casual glance informed me that all they sold was gum, and I bought their eight-flavor special, unzipped it, and tore into it in a frenzy. I pulled out a pack at random, worked it open, grabbed a stick, and popped it into my mouth. The texture was even worse than the gum I remembered from the packs of baseball cards when I was young, and the taste was just not right. I took another glance at the pack, then dropped it in horror. Why on earth would anyone invent fly-flavored chewing gum? “Who would sell this?" I asked the now thoroughly bewildered person behind the counter. I asked about the shady business practices of their company until he eventually pleaded the fifth.</p>
131
+
132
+ <p>After that bizarre episode, I really needed to take a walk and clear my head. I went north, then took a right at the pink bunny, and continued on, passing a self-proclaimed nice guy before coming to a stop. The signage seemed to indicate a superhero was nearby, but I saw no trace of capes or leotards in the area with the signs – nor even the conspicuously button down-glasses and boring hairstyles of a typical alter ego. Eventually, I flagged down one of several similarly-dressed people I assumed to be acolytes of their hero and asked “So who do you work for?” She pointed to one of the signs and with a smile, she told me that that was the first time anyone ever asked her that question.</p>
133
+
134
+ <p>I continued heading east. As I proceeded, I noted a great throng of people there, all facing what appeared to be the king of... something. All of the pomp and circumstance reminded me of the funeral of someone really important – a giant in his field, maybe – except that everyone was really happy. I joined the lines to pay my respects. “What’s everyone so excited about?” I asked. He said it was something he had done, although everyone present had a role to play. I said I had always dreamed of traveling to the stars with him, and asked if he could make it so, only to discover that I was decades too late for that. (I might need to settle for the outer reaches of earthbound 60187 or 60189 instead.) </p>
135
+
136
+ <p>At this point, I decided that he looked like he could use a little fortification, so I offered him some of my mead. He declined politely, but indicated that if I had a fifth of whiskey he might partake of that instead. With that jovial encounter completed, I returned to the eastward path I was previously proceeding on, passing by those deniers of aviation again (though in a different direction this time).</p>
137
+
138
+ <p>After passing by some laboratories to my left and right I turned left, with my odyssey nearly completed and my exit in sight. As I proceeded to the north, I suddenly noticed a bespectacled man with a ponytail. He looked familiar to me from MIT Mystery Hunts of times past. “Dude!” I said, “This place is like a Maze of –“ He looked at me quizzically, then pointed at a neighboring display. “Uh, never mind. At any rate, I’ve almost finished a different puzzling odyssey.”
139
+ “Ah! And now you wish to make order out of your chaos.” he said. “I can help you. The order you seek is funerary, transatlantic, different in Canada, pseudovictorian, ancient, and vext”.</p>
140
+
141
+ <p>I thanked the gentleman, as his wise words enabled me to make sense of my encounters. Then I strolled away, my odyssey complete.</p>
142
+
143
+
144
+ </div>
145
+ </div>
146
+ </div>
147
+
148
+
149
+
150
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
151
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
152
+ <script>
153
+ $(document).ready(function(){
154
+
155
+ $.getJSON('../../sheep.json')
156
+ .done(function(data) {
157
+ $('span.current-sheep').html(data.sheep);
158
+ $('span.next-update').html(data.update);
159
+ });
160
+
161
+ $("#nextupdate").hover(function(){
162
+ $('#navtooltip').addClass('hover');
163
+ }, function(){
164
+ $('#navtooltip').removeClass('hover');
165
+ });
166
+ });
167
+ </script>
168
+
169
+
170
+
171
+
172
+ </body><script type="module" src="/checkanswer.js"></script>
173
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_quick_sudoku/a_quick_sudoku ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>A Quick Sudoku &mdash; Dreamtime &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dreamtime/stylesheets/puzzle.css" />
19
+
20
+ <link rel="stylesheet" href="puzzle.css" />
21
+
22
+
23
+ <style>
24
+ .navtooltip.hover {
25
+ display: block;
26
+ }
27
+ .navtooltip {
28
+ display: none;
29
+ position: absolute;
30
+ background-color: rgba(20,20,20, 1);
31
+ border: 1px solid #888;
32
+ padding: 10px 10px;
33
+ color: white;
34
+ border-radius: 5px;
35
+ box-shadow: 0 0 7px black;
36
+ width: 13em;
37
+ margin: 10px 10px;
38
+ color: rgba(255, 255, 255, 0.9);
39
+ }
40
+ </style>
41
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
42
+ </head>
43
+
44
+ <body class="puzzle-page">
45
+
46
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
47
+ <div class="container">
48
+ <div class="navbar-header">
49
+ <!-- mobile toggle -->
50
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
51
+ <span class="sr-only">Toggle navigation</span>
52
+ <span class="icon-bar"></span>
53
+ <span class="icon-bar"></span>
54
+ <span class="icon-bar"></span>
55
+ </button>
56
+ </div>
57
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
58
+
59
+ <ul class="nav navbar-nav navbar-left">
60
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
61
+ <li class="dropdown">
62
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
63
+ <ul class="dropdown-menu inverse-dropdown">
64
+ <li><a href="../../toc.html">All Puzzles</a></li>
65
+ <li><a href="../../faq.html">FAQ</a></li>
66
+ </ul>
67
+ </li>
68
+
69
+ </ul>
70
+
71
+ <ul class="nav navbar-nav navbar-right">
72
+
73
+
74
+
75
+ <li class="dropdown">
76
+
77
+
78
+
79
+ <!--<a href="../../submit/puzzle/a_quick_sudoku/">Call in Answer</a>-->
80
+ <a href="solution/">Solution</a>
81
+
82
+
83
+
84
+ </li>
85
+ </ul>
86
+
87
+
88
+
89
+ <a class="navbar-brand logo" href="../../"></a>
90
+
91
+
92
+ </div><!-- /.navbar-collapse -->
93
+ </div>
94
+ </nav>
95
+
96
+
97
+
98
+ <div class="back">
99
+ <div class="main">
100
+ <a class="btn back-to-round" href="../../round/dreamtime"><span class="glyphicon glyphicon-menu-left"></span></a>
101
+
102
+ <img id="bg-desat" src="../../static/round/dreamtime/images/bg-desat.jpg"/>
103
+
104
+ </div>
105
+ <div class="puzzle">
106
+ <div class="header">
107
+
108
+ <h2>A Quick Sudoku</h2>
109
+
110
+ </div>
111
+ <div class="content">
112
+ <table>
113
+ <colgroup><col><col><col>
114
+ <colgroup><col><col><col>
115
+ <colgroup><col><col><col>
116
+ <tbody>
117
+ <tr> <td>9 <td> <td> <td> <td> <td> <td>7 <td> <td>
118
+ <tr> <td> <td> <td> <td> <td>9 <td> <td>1 <td>6 <td>
119
+ <tr> <td>4 <td> <td> <td> <td> <td>8 <td> <td> <td>5
120
+ <tbody>
121
+ <tr> <td> <td> <td> <td> <td>7 <td> <td> <td> <td>
122
+ <tr> <td> <td>1 <td> <td> <td> <td>4 <td> <td>8 <td>6
123
+ <tr> <td> <td>8 <td> <td> <td>1 <td>5 <td>9 <td> <td>
124
+ <tbody>
125
+ <tr> <td> <td> <td>8 <td> <td>5 <td> <td>4 <td> <td>9
126
+ <tr> <td>7 <td>2 <td> <td>3 <td> <td> <td>8 <td> <td>
127
+ <tr> <td> <td> <td>5 <td>7 <td> <td> <td> <td> <td>
128
+ </table>
129
+
130
+ </div>
131
+ </div>
132
+ </div>
133
+
134
+
135
+
136
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
137
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
138
+ <script>
139
+ $(document).ready(function(){
140
+
141
+ $.getJSON('../../sheep.json')
142
+ .done(function(data) {
143
+ $('span.current-sheep').html(data.sheep);
144
+ $('span.next-update').html(data.update);
145
+ });
146
+
147
+ $("#nextupdate").hover(function(){
148
+ $('#navtooltip').addClass('hover');
149
+ }, function(){
150
+ $('#navtooltip').removeClass('hover');
151
+ });
152
+ });
153
+ </script>
154
+
155
+
156
+
157
+
158
+ </body><script type="module" src="/checkanswer.js"></script>
159
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_quick_sudoku/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/2016/2016_puzzle_a_quick_sudoku/index.html ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>A Quick Sudoku &mdash; Dreamtime &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dreamtime/stylesheets/puzzle.css" />
19
+
20
+ <link rel="stylesheet" href="puzzle.css" />
21
+
22
+
23
+ <style>
24
+ .navtooltip.hover {
25
+ display: block;
26
+ }
27
+ .navtooltip {
28
+ display: none;
29
+ position: absolute;
30
+ background-color: rgba(20,20,20, 1);
31
+ border: 1px solid #888;
32
+ padding: 10px 10px;
33
+ color: white;
34
+ border-radius: 5px;
35
+ box-shadow: 0 0 7px black;
36
+ width: 13em;
37
+ margin: 10px 10px;
38
+ color: rgba(255, 255, 255, 0.9);
39
+ }
40
+ </style>
41
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
42
+ </head>
43
+
44
+ <body class="puzzle-page">
45
+
46
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
47
+ <div class="container">
48
+ <div class="navbar-header">
49
+ <!-- mobile toggle -->
50
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
51
+ <span class="sr-only">Toggle navigation</span>
52
+ <span class="icon-bar"></span>
53
+ <span class="icon-bar"></span>
54
+ <span class="icon-bar"></span>
55
+ </button>
56
+ </div>
57
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
58
+
59
+ <ul class="nav navbar-nav navbar-left">
60
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
61
+ <li class="dropdown">
62
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
63
+ <ul class="dropdown-menu inverse-dropdown">
64
+ <li><a href="../../toc.html">All Puzzles</a></li>
65
+ <li><a href="../../faq.html">FAQ</a></li>
66
+ </ul>
67
+ </li>
68
+
69
+ </ul>
70
+
71
+ <ul class="nav navbar-nav navbar-right">
72
+
73
+
74
+
75
+ <li class="dropdown">
76
+
77
+
78
+
79
+ <!--<a href="../../submit/puzzle/a_quick_sudoku/">Call in Answer</a>-->
80
+ <a href="solution/">Solution</a>
81
+
82
+
83
+
84
+ </li>
85
+ </ul>
86
+
87
+
88
+
89
+ <a class="navbar-brand logo" href="../../"></a>
90
+
91
+
92
+ </div><!-- /.navbar-collapse -->
93
+ </div>
94
+ </nav>
95
+
96
+
97
+
98
+ <div class="back">
99
+ <div class="main">
100
+ <a class="btn back-to-round" href="../../round/dreamtime"><span class="glyphicon glyphicon-menu-left"></span></a>
101
+
102
+ <img id="bg-desat" src="../../static/round/dreamtime/images/bg-desat.jpg"/>
103
+
104
+ </div>
105
+ <div class="puzzle">
106
+ <div class="header">
107
+
108
+ <h2>A Quick Sudoku</h2>
109
+
110
+ </div>
111
+ <div class="content">
112
+ <table>
113
+ <colgroup><col><col><col>
114
+ <colgroup><col><col><col>
115
+ <colgroup><col><col><col>
116
+ <tbody>
117
+ <tr> <td>9 <td> <td> <td> <td> <td> <td>7 <td> <td>
118
+ <tr> <td> <td> <td> <td> <td>9 <td> <td>1 <td>6 <td>
119
+ <tr> <td>4 <td> <td> <td> <td> <td>8 <td> <td> <td>5
120
+ <tbody>
121
+ <tr> <td> <td> <td> <td> <td>7 <td> <td> <td> <td>
122
+ <tr> <td> <td>1 <td> <td> <td> <td>4 <td> <td>8 <td>6
123
+ <tr> <td> <td>8 <td> <td> <td>1 <td>5 <td>9 <td> <td>
124
+ <tbody>
125
+ <tr> <td> <td> <td>8 <td> <td>5 <td> <td>4 <td> <td>9
126
+ <tr> <td>7 <td>2 <td> <td>3 <td> <td> <td>8 <td> <td>
127
+ <tr> <td> <td> <td>5 <td>7 <td> <td> <td> <td> <td>
128
+ </table>
129
+
130
+ </div>
131
+ </div>
132
+ </div>
133
+
134
+
135
+
136
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
137
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
138
+ <script>
139
+ $(document).ready(function(){
140
+
141
+ $.getJSON('../../sheep.json')
142
+ .done(function(data) {
143
+ $('span.current-sheep').html(data.sheep);
144
+ $('span.next-update').html(data.update);
145
+ });
146
+
147
+ $("#nextupdate").hover(function(){
148
+ $('#navtooltip').addClass('hover');
149
+ }, function(){
150
+ $('#navtooltip').removeClass('hover');
151
+ });
152
+ });
153
+ </script>
154
+
155
+
156
+
157
+
158
+ </body><script type="module" src="/checkanswer.js"></script>
159
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_round_at_the_golf_course/a_round_at_the_golf_course ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>A Round at the Golf Course &mdash; Dreamtime &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dreamtime/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/a_round_at_the_golf_course/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/dreamtime"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/dreamtime/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <h2>A Round at the Golf Course</h2>
107
+
108
+ </div>
109
+ <div class="content">
110
+ <p><i>This is the craziest golf course you've ever seen! Back and forth across the entire kingdom multiple times, and there are no distance markers on the holes. If you owned this golf course, you'd be willing to take anything in exchange for it.</i></p>
111
+ <p><img src="images/1.png"/></p>
112
+ <p><img src="images/2.png"/></p>
113
+ <p><img src="images/3.png"/></p>
114
+ <p><img src="images/4.png"/></p>
115
+ <p><img src="images/5.png"/></p>
116
+ <p><img src="images/6.png"/></p>
117
+ <p><img src="images/7.png"/></p>
118
+ <p><img src="images/8.png"/></p>
119
+ <p><img src="images/9.png"/></p>
120
+ <p><img src="images/10.png"/></p>
121
+ <p><img src="images/11.png"/></p>
122
+ <p><img src="images/12.png"/></p>
123
+ <p><img src="images/13.png"/></p>
124
+ <p><img src="images/14.png"/></p>
125
+ <p><img src="images/15.png"/></p>
126
+
127
+ </div>
128
+ </div>
129
+ </div>
130
+
131
+
132
+
133
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
134
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
135
+ <script>
136
+ $(document).ready(function(){
137
+
138
+ $.getJSON('../../sheep.json')
139
+ .done(function(data) {
140
+ $('span.current-sheep').html(data.sheep);
141
+ $('span.next-update').html(data.update);
142
+ });
143
+
144
+ $("#nextupdate").hover(function(){
145
+ $('#navtooltip').addClass('hover');
146
+ }, function(){
147
+ $('#navtooltip').removeClass('hover');
148
+ });
149
+ });
150
+ </script>
151
+
152
+
153
+
154
+
155
+ </body><script type="module" src="/checkanswer.js"></script>
156
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_a_round_at_the_golf_course/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/2016/2016_puzzle_a_round_at_the_golf_course/index.html ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>A Round at the Golf Course &mdash; Dreamtime &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dreamtime/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/a_round_at_the_golf_course/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/dreamtime"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/dreamtime/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <h2>A Round at the Golf Course</h2>
107
+
108
+ </div>
109
+ <div class="content">
110
+ <p><i>This is the craziest golf course you've ever seen! Back and forth across the entire kingdom multiple times, and there are no distance markers on the holes. If you owned this golf course, you'd be willing to take anything in exchange for it.</i></p>
111
+ <p><img src="images/1.png"/></p>
112
+ <p><img src="images/2.png"/></p>
113
+ <p><img src="images/3.png"/></p>
114
+ <p><img src="images/4.png"/></p>
115
+ <p><img src="images/5.png"/></p>
116
+ <p><img src="images/6.png"/></p>
117
+ <p><img src="images/7.png"/></p>
118
+ <p><img src="images/8.png"/></p>
119
+ <p><img src="images/9.png"/></p>
120
+ <p><img src="images/10.png"/></p>
121
+ <p><img src="images/11.png"/></p>
122
+ <p><img src="images/12.png"/></p>
123
+ <p><img src="images/13.png"/></p>
124
+ <p><img src="images/14.png"/></p>
125
+ <p><img src="images/15.png"/></p>
126
+
127
+ </div>
128
+ </div>
129
+ </div>
130
+
131
+
132
+
133
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
134
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
135
+ <script>
136
+ $(document).ready(function(){
137
+
138
+ $.getJSON('../../sheep.json')
139
+ .done(function(data) {
140
+ $('span.current-sheep').html(data.sheep);
141
+ $('span.next-update').html(data.update);
142
+ });
143
+
144
+ $("#nextupdate").hover(function(){
145
+ $('#navtooltip').addClass('hover');
146
+ }, function(){
147
+ $('#navtooltip').removeClass('hover');
148
+ });
149
+ });
150
+ </script>
151
+
152
+
153
+
154
+
155
+ </body><script type="module" src="/checkanswer.js"></script>
156
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_aborigine_dream_fragment/aborigine_dream_fragment ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Aborigine Dream Fragment &mdash; Limbo &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/limbo/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/aborigine_dream_fragment/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/limbo"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ </div>
101
+ <div class="puzzle" style="background-color: #000000;">
102
+ <div class="header">
103
+
104
+ </div>
105
+ <div class="content">
106
+ <p style="text-align:center"><img src="images/aborigine.png"></p>
107
+
108
+ </div>
109
+ </div>
110
+ </div>
111
+
112
+
113
+
114
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
115
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
116
+ <script>
117
+ $(document).ready(function(){
118
+
119
+ $.getJSON('../../sheep.json')
120
+ .done(function(data) {
121
+ $('span.current-sheep').html(data.sheep);
122
+ $('span.next-update').html(data.update);
123
+ });
124
+
125
+ $("#nextupdate").hover(function(){
126
+ $('#navtooltip').addClass('hover');
127
+ }, function(){
128
+ $('#navtooltip').removeClass('hover');
129
+ });
130
+ });
131
+ </script>
132
+
133
+
134
+
135
+
136
+ </body><script type="module" src="/checkanswer.js"></script>
137
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_aborigine_dream_fragment/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/2016/2016_puzzle_aborigine_dream_fragment/index.html ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Aborigine Dream Fragment &mdash; Limbo &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/limbo/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/aborigine_dream_fragment/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/limbo"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ </div>
101
+ <div class="puzzle" style="background-color: #000000;">
102
+ <div class="header">
103
+
104
+ </div>
105
+ <div class="content">
106
+ <p style="text-align:center"><img src="images/aborigine.png"></p>
107
+
108
+ </div>
109
+ </div>
110
+ </div>
111
+
112
+
113
+
114
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
115
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
116
+ <script>
117
+ $(document).ready(function(){
118
+
119
+ $.getJSON('../../sheep.json')
120
+ .done(function(data) {
121
+ $('span.current-sheep').html(data.sheep);
122
+ $('span.next-update').html(data.update);
123
+ });
124
+
125
+ $("#nextupdate").hover(function(){
126
+ $('#navtooltip').addClass('hover');
127
+ }, function(){
128
+ $('#navtooltip').removeClass('hover');
129
+ });
130
+ });
131
+ </script>
132
+
133
+
134
+
135
+
136
+ </body><script type="module" src="/checkanswer.js"></script>
137
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_all_history_is_local/all_history_is_local ADDED
@@ -0,0 +1,709 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>All History Is Local &mdash; Sleeping Gypsy &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/sleeping_gypsy/stylesheets/puzzle.css" />
19
+
20
+ <link rel="stylesheet" href="puzzle.css" />
21
+
22
+
23
+ <style>
24
+ .navtooltip.hover {
25
+ display: block;
26
+ }
27
+ .navtooltip {
28
+ display: none;
29
+ position: absolute;
30
+ background-color: rgba(20,20,20, 1);
31
+ border: 1px solid #888;
32
+ padding: 10px 10px;
33
+ color: white;
34
+ border-radius: 5px;
35
+ box-shadow: 0 0 7px black;
36
+ width: 13em;
37
+ margin: 10px 10px;
38
+ color: rgba(255, 255, 255, 0.9);
39
+ }
40
+ </style>
41
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
42
+ </head>
43
+
44
+ <body class="puzzle-page">
45
+
46
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
47
+ <div class="container">
48
+ <div class="navbar-header">
49
+ <!-- mobile toggle -->
50
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
51
+ <span class="sr-only">Toggle navigation</span>
52
+ <span class="icon-bar"></span>
53
+ <span class="icon-bar"></span>
54
+ <span class="icon-bar"></span>
55
+ </button>
56
+ </div>
57
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
58
+
59
+ <ul class="nav navbar-nav navbar-left">
60
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
61
+ <li class="dropdown">
62
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
63
+ <ul class="dropdown-menu inverse-dropdown">
64
+ <li><a href="../../toc.html">All Puzzles</a></li>
65
+ <li><a href="../../faq.html">FAQ</a></li>
66
+ </ul>
67
+ </li>
68
+
69
+ </ul>
70
+
71
+ <ul class="nav navbar-nav navbar-right">
72
+
73
+
74
+
75
+ <li class="dropdown">
76
+
77
+
78
+
79
+ <!--<a href="../../submit/puzzle/all_history_is_local/">Call in Answer</a>-->
80
+ <a href="solution/">Solution</a>
81
+
82
+
83
+
84
+ </li>
85
+ </ul>
86
+
87
+
88
+
89
+ <a class="navbar-brand logo" href="../../"></a>
90
+
91
+
92
+ </div><!-- /.navbar-collapse -->
93
+ </div>
94
+ </nav>
95
+
96
+
97
+
98
+ <div class="back">
99
+ <div class="main">
100
+ <a class="btn back-to-round" href="../../round/sleeping_gypsy"><span class="glyphicon glyphicon-menu-left"></span></a>
101
+
102
+ <img id="bg-desat" src="../../static/round/sleeping_gypsy/images/all_history_is_local/bg-desat.jpg"/>
103
+
104
+ </div>
105
+ <div class="puzzle">
106
+ <div class="header">
107
+
108
+ <img class="puzzle-logo" src="../../static/round/sleeping_gypsy/images/all_history_is_local/header.png">
109
+
110
+ <h2>All History Is Local</h2>
111
+
112
+ </div>
113
+ <div class="content">
114
+ <div class="container-fluid">
115
+
116
+ <div id="events">
117
+ <p>
118
+ <img src="images/event1.jpg">
119
+ <img src="images/event2.jpg">
120
+ <img src="images/event3.jpg">
121
+ <img src="images/event4.jpg">
122
+ <img src="images/event5.jpg">
123
+ <img src="images/event6.png">
124
+ <img src="images/event7.jpg">
125
+ <img src="images/event8.jpg">
126
+ <img src="images/event9.jpg">
127
+ <img src="images/event10.png">
128
+ <img src="images/event11.gif">
129
+ <img src="images/event12.jpg">
130
+ <img src="images/event13.jpg">
131
+ <img src="images/event14.jpg">
132
+ <img src="images/event15.png">
133
+ <img src="images/event16.png">
134
+ <img src="images/event17.jpg">
135
+ <img src="images/event18.jpg">
136
+ </p>
137
+ </div>
138
+
139
+ <div class="row">
140
+ <div class="col-xs-6">
141
+ <p>
142
+ <table class="table-bordered">
143
+ <tr>
144
+ <td></td>
145
+ <td>N</td>
146
+ <td>O</td>
147
+ <td>M</td>
148
+ <td>E</td>
149
+ <td>S</td>
150
+ <td>S</td>
151
+ </tr>
152
+ <tr>
153
+ <td>A</td>
154
+ <td>G</td>
155
+ <td>E</td>
156
+ <td>H</td>
157
+ <td>E</td>
158
+ <td>R</td>
159
+ <td>E</td>
160
+ </tr>
161
+ <tr>
162
+ <td>E</td>
163
+ <td>D</td>
164
+ <td>B</td>
165
+ <td>L</td>
166
+ <td>M</td>
167
+ <td>H</td>
168
+ <td>E</td>
169
+ </tr>
170
+ <tr>
171
+ <td>R</td>
172
+ <td>E</td>
173
+ <td>O</td>
174
+ <td>N</td>
175
+ <td>P</td>
176
+ <td>L</td>
177
+ <td>H</td>
178
+ </tr>
179
+ <tr>
180
+ <td>S</td>
181
+ <td>B</td>
182
+ <td>E</td>
183
+ <td></td>
184
+ <td></td>
185
+ <td></td>
186
+ <td></td>
187
+ </tr>
188
+ </table>
189
+ </p>
190
+ </div>
191
+ <div class="col-xs-6">
192
+ <p>
193
+ <table class="table-bordered">
194
+ <tr>
195
+ <td></td>
196
+ <td></td>
197
+ <td>D</td>
198
+ <td>S</td>
199
+ <td>O</td>
200
+ <td>G</td>
201
+ <td>R</td>
202
+ </tr>
203
+ <tr>
204
+ <td>T</td>
205
+ <td>T</td>
206
+ <td>N</td>
207
+ <td>H</td>
208
+ <td>M</td>
209
+ <td>E</td>
210
+ <td>E</td>
211
+ </tr>
212
+ <tr>
213
+ <td>G</td>
214
+ <td>L</td>
215
+ <td>G</td>
216
+ <td>G</td>
217
+ <td>E</td>
218
+ <td>E</td>
219
+ <td>L</td>
220
+ </tr>
221
+ <tr>
222
+ <td>G</td>
223
+ <td>R</td>
224
+ <td>V</td>
225
+ <td>P</td>
226
+ <td>T</td>
227
+ <td>I</td>
228
+ <td>M</td>
229
+ </tr>
230
+ <tr>
231
+ <td>N</td>
232
+ <td>W</td>
233
+ <td>G</td>
234
+ <td>T</td>
235
+ <td></td>
236
+ <td></td>
237
+ <td></td>
238
+ </tr>
239
+ </table>
240
+ </p>
241
+ </div>
242
+ </div>
243
+ <div class="row">
244
+ <div class="col-xs-6">
245
+ <p>
246
+ <table class="table-bordered">
247
+ <tr>
248
+ <td></td>
249
+ <td></td>
250
+ <td></td>
251
+ <td></td>
252
+ <td>M</td>
253
+ <td>M</td>
254
+ <td>T</td>
255
+ </tr>
256
+ <tr>
257
+ <td>B</td>
258
+ <td>P</td>
259
+ <td>I</td>
260
+ <td>G</td>
261
+ <td>I</td>
262
+ <td>G</td>
263
+ <td>D</td>
264
+ </tr>
265
+ <tr>
266
+ <td>O</td>
267
+ <td>H</td>
268
+ <td>S</td>
269
+ <td>G</td>
270
+ <td>O</td>
271
+ <td>T</td>
272
+ <td>E</td>
273
+ </tr>
274
+ <tr>
275
+ <td>F</td>
276
+ <td>R</td>
277
+ <td>R</td>
278
+ <td>L</td>
279
+ <td>T</td>
280
+ <td>L</td>
281
+ <td>O</td>
282
+ </tr>
283
+ <tr>
284
+ <td>I</td>
285
+ <td>T</td>
286
+ <td>C</td>
287
+ <td>I</td>
288
+ <td>O</td>
289
+ <td>E</td>
290
+ <td></td>
291
+ </tr>
292
+ </table>
293
+ </p>
294
+ </div>
295
+ <div class="col-xs-6">
296
+ <p>
297
+ <table class="table-bordered">
298
+ <tr>
299
+ <td>B</td>
300
+ <td>O</td>
301
+ <td>T</td>
302
+ <td>I</td>
303
+ <td>T</td>
304
+ <td>L</td>
305
+ <td>T</td>
306
+ </tr>
307
+ <tr>
308
+ <td>H</td>
309
+ <td>A</td>
310
+ <td>T</td>
311
+ <td>G</td>
312
+ <td>P</td>
313
+ <td>T</td>
314
+ <td>G</td>
315
+ </tr>
316
+ <tr>
317
+ <td>L</td>
318
+ <td>G</td>
319
+ <td>P</td>
320
+ <td>N</td>
321
+ <td>T</td>
322
+ <td>R</td>
323
+ <td>L</td>
324
+ </tr>
325
+ <tr>
326
+ <td>R</td>
327
+ <td>L</td>
328
+ <td>F</td>
329
+ <td>E</td>
330
+ <td>Y</td>
331
+ <td>F</td>
332
+ <td>E</td>
333
+ </tr>
334
+ <tr>
335
+ <td>H</td>
336
+ <td>G</td>
337
+ <td>S</td>
338
+ <td></td>
339
+ <td></td>
340
+ <td></td>
341
+ <td></td>
342
+ </tr>
343
+ </table>
344
+ </p>
345
+ </div>
346
+ </div>
347
+ <div class="row">
348
+ <div class="col-xs-6">
349
+ <td>
350
+ <p>
351
+ <table class="table-bordered">
352
+ <tr>
353
+ <td></td>
354
+ <td>V</td>
355
+ <td>S</td>
356
+ <td>D</td>
357
+ <td>T</td>
358
+ <td>C</td>
359
+ <td>T</td>
360
+ </tr>
361
+ <tr>
362
+ <td>S</td>
363
+ <td>P</td>
364
+ <td>T</td>
365
+ <td>L</td>
366
+ <td>T</td>
367
+ <td>W</td>
368
+ <td>U</td>
369
+ </tr>
370
+ <tr>
371
+ <td>J</td>
372
+ <td>O</td>
373
+ <td>H</td>
374
+ <td>D</td>
375
+ <td>G</td>
376
+ <td>Y</td>
377
+ <td>I</td>
378
+ </tr>
379
+ <tr>
380
+ <td>X</td>
381
+ <td>H</td>
382
+ <td>T</td>
383
+ <td>S</td>
384
+ <td>T</td>
385
+ <td>P</td>
386
+ <td>O</td>
387
+ </tr>
388
+ <tr>
389
+ <td>L</td>
390
+ <td>G</td>
391
+ <td>T</td>
392
+ <td>P</td>
393
+ <td></td>
394
+ <td></td>
395
+ <td></td>
396
+ </tr>
397
+ </table>
398
+ </p>
399
+ </div>
400
+ <div class="col-xs-6">
401
+ <p>
402
+ <table class="table-bordered">
403
+ <tr>
404
+ <td></td>
405
+ <td></td>
406
+ <td>M</td>
407
+ <td>G</td>
408
+ <td>F</td>
409
+ <td>S</td>
410
+ <td>S</td>
411
+ </tr>
412
+ <tr>
413
+ <td>N</td>
414
+ <td>E</td>
415
+ <td>E</td>
416
+ <td>T</td>
417
+ <td>S</td>
418
+ <td>T</td>
419
+ <td>R</td>
420
+ </tr>
421
+ <tr>
422
+ <td>N</td>
423
+ <td>S</td>
424
+ <td>G</td>
425
+ <td>E</td>
426
+ <td>E</td>
427
+ <td>S</td>
428
+ <td>G</td>
429
+ </tr>
430
+ <tr>
431
+ <td>D</td>
432
+ <td>R</td>
433
+ <td>O</td>
434
+ <td>A</td>
435
+ <td>O</td>
436
+ <td>S</td>
437
+ <td>M</td>
438
+ </tr>
439
+ <tr>
440
+ <td>C</td>
441
+ <td>T</td>
442
+ <td>X</td>
443
+ <td>C</td>
444
+ <td>D</td>
445
+ <td></td>
446
+ <td></td>
447
+ </tr>
448
+ </table>
449
+ </p>
450
+ </div>
451
+ </div>
452
+ <div class="row">
453
+ <div class="col-xs-6">
454
+ <p>
455
+ <table class="table-bordered">
456
+ <tr>
457
+ <td></td>
458
+ <td></td>
459
+ <td></td>
460
+ <td>A</td>
461
+ <td>L</td>
462
+ <td>T</td>
463
+ <td>A</td>
464
+ </tr>
465
+ <tr>
466
+ <td>U</td>
467
+ <td>T</td>
468
+ <td>O</td>
469
+ <td>E</td>
470
+ <td>U</td>
471
+ <td>O</td>
472
+ <td>S</td>
473
+ </tr>
474
+ <tr>
475
+ <td>L</td>
476
+ <td>A</td>
477
+ <td>D</td>
478
+ <td>L</td>
479
+ <td>T</td>
480
+ <td>U</td>
481
+ <td>G</td>
482
+ </tr>
483
+ <tr>
484
+ <td>T</td>
485
+ <td>D</td>
486
+ <td>L</td>
487
+ <td>C</td>
488
+ <td>I</td>
489
+ <td>T</td>
490
+ <td>T</td>
491
+ </tr>
492
+ <tr>
493
+ <td>E</td>
494
+ <td>D</td>
495
+ <td>R</td>
496
+ <td>G</td>
497
+ <td>K</td>
498
+ <td>E</td>
499
+ <td></td>
500
+ </tr>
501
+ </table>
502
+ </p>
503
+ </div>
504
+ <div class="col-xs-6">
505
+ <p>
506
+ <table class="table-bordered">
507
+ <tr>
508
+ <td></td>
509
+ <td></td>
510
+ <td></td>
511
+ <td></td>
512
+ <td>E</td>
513
+ <td>T</td>
514
+ <td>T</td>
515
+ </tr>
516
+ <tr>
517
+ <td>R</td>
518
+ <td>A</td>
519
+ <td>A</td>
520
+ <td>E</td>
521
+ <td>L</td>
522
+ <td>K</td>
523
+ <td>T</td>
524
+ </tr>
525
+ <tr>
526
+ <td>T</td>
527
+ <td>M</td>
528
+ <td>N</td>
529
+ <td>I</td>
530
+ <td>E</td>
531
+ <td>M</td>
532
+ <td>E</td>
533
+ </tr>
534
+ <tr>
535
+ <td>A</td>
536
+ <td>X</td>
537
+ <td>R</td>
538
+ <td>F</td>
539
+ <td>M</td>
540
+ <td>P</td>
541
+ <td>W</td>
542
+ </tr>
543
+ <tr>
544
+ <td>I</td>
545
+ <td>I</td>
546
+ <td>L</td>
547
+ <td>H</td>
548
+ <td>N</td>
549
+ <td>K</td>
550
+ <td>C</td>
551
+ </tr>
552
+ </table>
553
+ </p>
554
+ </div>
555
+ </div>
556
+ <div class="row">
557
+ <div class="col-xs-6">
558
+ <p>
559
+ <table class="table-bordered">
560
+ <tr>
561
+ <td></td>
562
+ <td></td>
563
+ <td></td>
564
+ <td></td>
565
+ <td></td>
566
+ <td>E</td>
567
+ <td>D</td>
568
+ </tr>
569
+ <tr>
570
+ <td>E</td>
571
+ <td>F</td>
572
+ <td>S</td>
573
+ <td>W</td>
574
+ <td>N</td>
575
+ <td>T</td>
576
+ <td>G</td>
577
+ </tr>
578
+ <tr>
579
+ <td>M</td>
580
+ <td>E</td>
581
+ <td>O</td>
582
+ <td>X</td>
583
+ <td>O</td>
584
+ <td>G</td>
585
+ <td>O</td>
586
+ </tr>
587
+ <tr>
588
+ <td>K</td>
589
+ <td>I</td>
590
+ <td>G</td>
591
+ <td>G</td>
592
+ <td>M</td>
593
+ <td>I</td>
594
+ <td>T</td>
595
+ </tr>
596
+ <tr>
597
+ <td>T</td>
598
+ <td>T</td>
599
+ <td>E</td>
600
+ <td>T</td>
601
+ <td>L</td>
602
+ <td>T</td>
603
+ <td>O</td>
604
+ </tr>
605
+ <tr>
606
+ <td>U</td>
607
+ <td></td>
608
+ <td></td>
609
+ <td></td>
610
+ <td></td>
611
+ <td></td>
612
+ <td></td>
613
+ </tr>
614
+ </table>
615
+ </p>
616
+ </div>
617
+ <div class="col-xs-6">
618
+ <p>
619
+ <table class="table-bordered">
620
+ <tr>
621
+ <td></td>
622
+ <td></td>
623
+ <td></td>
624
+ <td></td>
625
+ <td></td>
626
+ <td></td>
627
+ <td>L</td>
628
+ </tr>
629
+ <tr>
630
+ <td>I</td>
631
+ <td>R</td>
632
+ <td>L</td>
633
+ <td>A</td>
634
+ <td>U</td>
635
+ <td>E</td>
636
+ <td>O</td>
637
+ </tr>
638
+ <tr>
639
+ <td>C</td>
640
+ <td>L</td>
641
+ <td>G</td>
642
+ <td>D</td>
643
+ <td>E</td>
644
+ <td>F</td>
645
+ <td>O</td>
646
+ </tr>
647
+ <tr>
648
+ <td>M</td>
649
+ <td>D</td>
650
+ <td>W</td>
651
+ <td>P</td>
652
+ <td>E</td>
653
+ <td>K</td>
654
+ <td>S</td>
655
+ </tr>
656
+ <tr>
657
+ <td>L</td>
658
+ <td>S</td>
659
+ <td>T</td>
660
+ <td>H</td>
661
+ <td>T</td>
662
+ <td>G</td>
663
+ <td>O</td>
664
+ </tr>
665
+ <tr>
666
+ <td>L</td>
667
+ <td>B</td>
668
+ <td></td>
669
+ <td></td>
670
+ <td></td>
671
+ <td></td>
672
+ <td></td>
673
+ </tr>
674
+ </table>
675
+ </p>
676
+ </div>
677
+ </div>
678
+ </div>
679
+
680
+ </div>
681
+ </div>
682
+ </div>
683
+
684
+
685
+
686
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
687
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
688
+ <script>
689
+ $(document).ready(function(){
690
+
691
+ $.getJSON('../../sheep.json')
692
+ .done(function(data) {
693
+ $('span.current-sheep').html(data.sheep);
694
+ $('span.next-update').html(data.update);
695
+ });
696
+
697
+ $("#nextupdate").hover(function(){
698
+ $('#navtooltip').addClass('hover');
699
+ }, function(){
700
+ $('#navtooltip').removeClass('hover');
701
+ });
702
+ });
703
+ </script>
704
+
705
+
706
+
707
+
708
+ </body><script type="module" src="/checkanswer.js"></script>
709
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_all_history_is_local/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/2016/2016_puzzle_all_history_is_local/index.html ADDED
@@ -0,0 +1,709 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>All History Is Local &mdash; Sleeping Gypsy &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/sleeping_gypsy/stylesheets/puzzle.css" />
19
+
20
+ <link rel="stylesheet" href="puzzle.css" />
21
+
22
+
23
+ <style>
24
+ .navtooltip.hover {
25
+ display: block;
26
+ }
27
+ .navtooltip {
28
+ display: none;
29
+ position: absolute;
30
+ background-color: rgba(20,20,20, 1);
31
+ border: 1px solid #888;
32
+ padding: 10px 10px;
33
+ color: white;
34
+ border-radius: 5px;
35
+ box-shadow: 0 0 7px black;
36
+ width: 13em;
37
+ margin: 10px 10px;
38
+ color: rgba(255, 255, 255, 0.9);
39
+ }
40
+ </style>
41
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
42
+ </head>
43
+
44
+ <body class="puzzle-page">
45
+
46
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
47
+ <div class="container">
48
+ <div class="navbar-header">
49
+ <!-- mobile toggle -->
50
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
51
+ <span class="sr-only">Toggle navigation</span>
52
+ <span class="icon-bar"></span>
53
+ <span class="icon-bar"></span>
54
+ <span class="icon-bar"></span>
55
+ </button>
56
+ </div>
57
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
58
+
59
+ <ul class="nav navbar-nav navbar-left">
60
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
61
+ <li class="dropdown">
62
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
63
+ <ul class="dropdown-menu inverse-dropdown">
64
+ <li><a href="../../toc.html">All Puzzles</a></li>
65
+ <li><a href="../../faq.html">FAQ</a></li>
66
+ </ul>
67
+ </li>
68
+
69
+ </ul>
70
+
71
+ <ul class="nav navbar-nav navbar-right">
72
+
73
+
74
+
75
+ <li class="dropdown">
76
+
77
+
78
+
79
+ <!--<a href="../../submit/puzzle/all_history_is_local/">Call in Answer</a>-->
80
+ <a href="solution/">Solution</a>
81
+
82
+
83
+
84
+ </li>
85
+ </ul>
86
+
87
+
88
+
89
+ <a class="navbar-brand logo" href="../../"></a>
90
+
91
+
92
+ </div><!-- /.navbar-collapse -->
93
+ </div>
94
+ </nav>
95
+
96
+
97
+
98
+ <div class="back">
99
+ <div class="main">
100
+ <a class="btn back-to-round" href="../../round/sleeping_gypsy"><span class="glyphicon glyphicon-menu-left"></span></a>
101
+
102
+ <img id="bg-desat" src="../../static/round/sleeping_gypsy/images/all_history_is_local/bg-desat.jpg"/>
103
+
104
+ </div>
105
+ <div class="puzzle">
106
+ <div class="header">
107
+
108
+ <img class="puzzle-logo" src="../../static/round/sleeping_gypsy/images/all_history_is_local/header.png">
109
+
110
+ <h2>All History Is Local</h2>
111
+
112
+ </div>
113
+ <div class="content">
114
+ <div class="container-fluid">
115
+
116
+ <div id="events">
117
+ <p>
118
+ <img src="images/event1.jpg">
119
+ <img src="images/event2.jpg">
120
+ <img src="images/event3.jpg">
121
+ <img src="images/event4.jpg">
122
+ <img src="images/event5.jpg">
123
+ <img src="images/event6.png">
124
+ <img src="images/event7.jpg">
125
+ <img src="images/event8.jpg">
126
+ <img src="images/event9.jpg">
127
+ <img src="images/event10.png">
128
+ <img src="images/event11.gif">
129
+ <img src="images/event12.jpg">
130
+ <img src="images/event13.jpg">
131
+ <img src="images/event14.jpg">
132
+ <img src="images/event15.png">
133
+ <img src="images/event16.png">
134
+ <img src="images/event17.jpg">
135
+ <img src="images/event18.jpg">
136
+ </p>
137
+ </div>
138
+
139
+ <div class="row">
140
+ <div class="col-xs-6">
141
+ <p>
142
+ <table class="table-bordered">
143
+ <tr>
144
+ <td></td>
145
+ <td>N</td>
146
+ <td>O</td>
147
+ <td>M</td>
148
+ <td>E</td>
149
+ <td>S</td>
150
+ <td>S</td>
151
+ </tr>
152
+ <tr>
153
+ <td>A</td>
154
+ <td>G</td>
155
+ <td>E</td>
156
+ <td>H</td>
157
+ <td>E</td>
158
+ <td>R</td>
159
+ <td>E</td>
160
+ </tr>
161
+ <tr>
162
+ <td>E</td>
163
+ <td>D</td>
164
+ <td>B</td>
165
+ <td>L</td>
166
+ <td>M</td>
167
+ <td>H</td>
168
+ <td>E</td>
169
+ </tr>
170
+ <tr>
171
+ <td>R</td>
172
+ <td>E</td>
173
+ <td>O</td>
174
+ <td>N</td>
175
+ <td>P</td>
176
+ <td>L</td>
177
+ <td>H</td>
178
+ </tr>
179
+ <tr>
180
+ <td>S</td>
181
+ <td>B</td>
182
+ <td>E</td>
183
+ <td></td>
184
+ <td></td>
185
+ <td></td>
186
+ <td></td>
187
+ </tr>
188
+ </table>
189
+ </p>
190
+ </div>
191
+ <div class="col-xs-6">
192
+ <p>
193
+ <table class="table-bordered">
194
+ <tr>
195
+ <td></td>
196
+ <td></td>
197
+ <td>D</td>
198
+ <td>S</td>
199
+ <td>O</td>
200
+ <td>G</td>
201
+ <td>R</td>
202
+ </tr>
203
+ <tr>
204
+ <td>T</td>
205
+ <td>T</td>
206
+ <td>N</td>
207
+ <td>H</td>
208
+ <td>M</td>
209
+ <td>E</td>
210
+ <td>E</td>
211
+ </tr>
212
+ <tr>
213
+ <td>G</td>
214
+ <td>L</td>
215
+ <td>G</td>
216
+ <td>G</td>
217
+ <td>E</td>
218
+ <td>E</td>
219
+ <td>L</td>
220
+ </tr>
221
+ <tr>
222
+ <td>G</td>
223
+ <td>R</td>
224
+ <td>V</td>
225
+ <td>P</td>
226
+ <td>T</td>
227
+ <td>I</td>
228
+ <td>M</td>
229
+ </tr>
230
+ <tr>
231
+ <td>N</td>
232
+ <td>W</td>
233
+ <td>G</td>
234
+ <td>T</td>
235
+ <td></td>
236
+ <td></td>
237
+ <td></td>
238
+ </tr>
239
+ </table>
240
+ </p>
241
+ </div>
242
+ </div>
243
+ <div class="row">
244
+ <div class="col-xs-6">
245
+ <p>
246
+ <table class="table-bordered">
247
+ <tr>
248
+ <td></td>
249
+ <td></td>
250
+ <td></td>
251
+ <td></td>
252
+ <td>M</td>
253
+ <td>M</td>
254
+ <td>T</td>
255
+ </tr>
256
+ <tr>
257
+ <td>B</td>
258
+ <td>P</td>
259
+ <td>I</td>
260
+ <td>G</td>
261
+ <td>I</td>
262
+ <td>G</td>
263
+ <td>D</td>
264
+ </tr>
265
+ <tr>
266
+ <td>O</td>
267
+ <td>H</td>
268
+ <td>S</td>
269
+ <td>G</td>
270
+ <td>O</td>
271
+ <td>T</td>
272
+ <td>E</td>
273
+ </tr>
274
+ <tr>
275
+ <td>F</td>
276
+ <td>R</td>
277
+ <td>R</td>
278
+ <td>L</td>
279
+ <td>T</td>
280
+ <td>L</td>
281
+ <td>O</td>
282
+ </tr>
283
+ <tr>
284
+ <td>I</td>
285
+ <td>T</td>
286
+ <td>C</td>
287
+ <td>I</td>
288
+ <td>O</td>
289
+ <td>E</td>
290
+ <td></td>
291
+ </tr>
292
+ </table>
293
+ </p>
294
+ </div>
295
+ <div class="col-xs-6">
296
+ <p>
297
+ <table class="table-bordered">
298
+ <tr>
299
+ <td>B</td>
300
+ <td>O</td>
301
+ <td>T</td>
302
+ <td>I</td>
303
+ <td>T</td>
304
+ <td>L</td>
305
+ <td>T</td>
306
+ </tr>
307
+ <tr>
308
+ <td>H</td>
309
+ <td>A</td>
310
+ <td>T</td>
311
+ <td>G</td>
312
+ <td>P</td>
313
+ <td>T</td>
314
+ <td>G</td>
315
+ </tr>
316
+ <tr>
317
+ <td>L</td>
318
+ <td>G</td>
319
+ <td>P</td>
320
+ <td>N</td>
321
+ <td>T</td>
322
+ <td>R</td>
323
+ <td>L</td>
324
+ </tr>
325
+ <tr>
326
+ <td>R</td>
327
+ <td>L</td>
328
+ <td>F</td>
329
+ <td>E</td>
330
+ <td>Y</td>
331
+ <td>F</td>
332
+ <td>E</td>
333
+ </tr>
334
+ <tr>
335
+ <td>H</td>
336
+ <td>G</td>
337
+ <td>S</td>
338
+ <td></td>
339
+ <td></td>
340
+ <td></td>
341
+ <td></td>
342
+ </tr>
343
+ </table>
344
+ </p>
345
+ </div>
346
+ </div>
347
+ <div class="row">
348
+ <div class="col-xs-6">
349
+ <td>
350
+ <p>
351
+ <table class="table-bordered">
352
+ <tr>
353
+ <td></td>
354
+ <td>V</td>
355
+ <td>S</td>
356
+ <td>D</td>
357
+ <td>T</td>
358
+ <td>C</td>
359
+ <td>T</td>
360
+ </tr>
361
+ <tr>
362
+ <td>S</td>
363
+ <td>P</td>
364
+ <td>T</td>
365
+ <td>L</td>
366
+ <td>T</td>
367
+ <td>W</td>
368
+ <td>U</td>
369
+ </tr>
370
+ <tr>
371
+ <td>J</td>
372
+ <td>O</td>
373
+ <td>H</td>
374
+ <td>D</td>
375
+ <td>G</td>
376
+ <td>Y</td>
377
+ <td>I</td>
378
+ </tr>
379
+ <tr>
380
+ <td>X</td>
381
+ <td>H</td>
382
+ <td>T</td>
383
+ <td>S</td>
384
+ <td>T</td>
385
+ <td>P</td>
386
+ <td>O</td>
387
+ </tr>
388
+ <tr>
389
+ <td>L</td>
390
+ <td>G</td>
391
+ <td>T</td>
392
+ <td>P</td>
393
+ <td></td>
394
+ <td></td>
395
+ <td></td>
396
+ </tr>
397
+ </table>
398
+ </p>
399
+ </div>
400
+ <div class="col-xs-6">
401
+ <p>
402
+ <table class="table-bordered">
403
+ <tr>
404
+ <td></td>
405
+ <td></td>
406
+ <td>M</td>
407
+ <td>G</td>
408
+ <td>F</td>
409
+ <td>S</td>
410
+ <td>S</td>
411
+ </tr>
412
+ <tr>
413
+ <td>N</td>
414
+ <td>E</td>
415
+ <td>E</td>
416
+ <td>T</td>
417
+ <td>S</td>
418
+ <td>T</td>
419
+ <td>R</td>
420
+ </tr>
421
+ <tr>
422
+ <td>N</td>
423
+ <td>S</td>
424
+ <td>G</td>
425
+ <td>E</td>
426
+ <td>E</td>
427
+ <td>S</td>
428
+ <td>G</td>
429
+ </tr>
430
+ <tr>
431
+ <td>D</td>
432
+ <td>R</td>
433
+ <td>O</td>
434
+ <td>A</td>
435
+ <td>O</td>
436
+ <td>S</td>
437
+ <td>M</td>
438
+ </tr>
439
+ <tr>
440
+ <td>C</td>
441
+ <td>T</td>
442
+ <td>X</td>
443
+ <td>C</td>
444
+ <td>D</td>
445
+ <td></td>
446
+ <td></td>
447
+ </tr>
448
+ </table>
449
+ </p>
450
+ </div>
451
+ </div>
452
+ <div class="row">
453
+ <div class="col-xs-6">
454
+ <p>
455
+ <table class="table-bordered">
456
+ <tr>
457
+ <td></td>
458
+ <td></td>
459
+ <td></td>
460
+ <td>A</td>
461
+ <td>L</td>
462
+ <td>T</td>
463
+ <td>A</td>
464
+ </tr>
465
+ <tr>
466
+ <td>U</td>
467
+ <td>T</td>
468
+ <td>O</td>
469
+ <td>E</td>
470
+ <td>U</td>
471
+ <td>O</td>
472
+ <td>S</td>
473
+ </tr>
474
+ <tr>
475
+ <td>L</td>
476
+ <td>A</td>
477
+ <td>D</td>
478
+ <td>L</td>
479
+ <td>T</td>
480
+ <td>U</td>
481
+ <td>G</td>
482
+ </tr>
483
+ <tr>
484
+ <td>T</td>
485
+ <td>D</td>
486
+ <td>L</td>
487
+ <td>C</td>
488
+ <td>I</td>
489
+ <td>T</td>
490
+ <td>T</td>
491
+ </tr>
492
+ <tr>
493
+ <td>E</td>
494
+ <td>D</td>
495
+ <td>R</td>
496
+ <td>G</td>
497
+ <td>K</td>
498
+ <td>E</td>
499
+ <td></td>
500
+ </tr>
501
+ </table>
502
+ </p>
503
+ </div>
504
+ <div class="col-xs-6">
505
+ <p>
506
+ <table class="table-bordered">
507
+ <tr>
508
+ <td></td>
509
+ <td></td>
510
+ <td></td>
511
+ <td></td>
512
+ <td>E</td>
513
+ <td>T</td>
514
+ <td>T</td>
515
+ </tr>
516
+ <tr>
517
+ <td>R</td>
518
+ <td>A</td>
519
+ <td>A</td>
520
+ <td>E</td>
521
+ <td>L</td>
522
+ <td>K</td>
523
+ <td>T</td>
524
+ </tr>
525
+ <tr>
526
+ <td>T</td>
527
+ <td>M</td>
528
+ <td>N</td>
529
+ <td>I</td>
530
+ <td>E</td>
531
+ <td>M</td>
532
+ <td>E</td>
533
+ </tr>
534
+ <tr>
535
+ <td>A</td>
536
+ <td>X</td>
537
+ <td>R</td>
538
+ <td>F</td>
539
+ <td>M</td>
540
+ <td>P</td>
541
+ <td>W</td>
542
+ </tr>
543
+ <tr>
544
+ <td>I</td>
545
+ <td>I</td>
546
+ <td>L</td>
547
+ <td>H</td>
548
+ <td>N</td>
549
+ <td>K</td>
550
+ <td>C</td>
551
+ </tr>
552
+ </table>
553
+ </p>
554
+ </div>
555
+ </div>
556
+ <div class="row">
557
+ <div class="col-xs-6">
558
+ <p>
559
+ <table class="table-bordered">
560
+ <tr>
561
+ <td></td>
562
+ <td></td>
563
+ <td></td>
564
+ <td></td>
565
+ <td></td>
566
+ <td>E</td>
567
+ <td>D</td>
568
+ </tr>
569
+ <tr>
570
+ <td>E</td>
571
+ <td>F</td>
572
+ <td>S</td>
573
+ <td>W</td>
574
+ <td>N</td>
575
+ <td>T</td>
576
+ <td>G</td>
577
+ </tr>
578
+ <tr>
579
+ <td>M</td>
580
+ <td>E</td>
581
+ <td>O</td>
582
+ <td>X</td>
583
+ <td>O</td>
584
+ <td>G</td>
585
+ <td>O</td>
586
+ </tr>
587
+ <tr>
588
+ <td>K</td>
589
+ <td>I</td>
590
+ <td>G</td>
591
+ <td>G</td>
592
+ <td>M</td>
593
+ <td>I</td>
594
+ <td>T</td>
595
+ </tr>
596
+ <tr>
597
+ <td>T</td>
598
+ <td>T</td>
599
+ <td>E</td>
600
+ <td>T</td>
601
+ <td>L</td>
602
+ <td>T</td>
603
+ <td>O</td>
604
+ </tr>
605
+ <tr>
606
+ <td>U</td>
607
+ <td></td>
608
+ <td></td>
609
+ <td></td>
610
+ <td></td>
611
+ <td></td>
612
+ <td></td>
613
+ </tr>
614
+ </table>
615
+ </p>
616
+ </div>
617
+ <div class="col-xs-6">
618
+ <p>
619
+ <table class="table-bordered">
620
+ <tr>
621
+ <td></td>
622
+ <td></td>
623
+ <td></td>
624
+ <td></td>
625
+ <td></td>
626
+ <td></td>
627
+ <td>L</td>
628
+ </tr>
629
+ <tr>
630
+ <td>I</td>
631
+ <td>R</td>
632
+ <td>L</td>
633
+ <td>A</td>
634
+ <td>U</td>
635
+ <td>E</td>
636
+ <td>O</td>
637
+ </tr>
638
+ <tr>
639
+ <td>C</td>
640
+ <td>L</td>
641
+ <td>G</td>
642
+ <td>D</td>
643
+ <td>E</td>
644
+ <td>F</td>
645
+ <td>O</td>
646
+ </tr>
647
+ <tr>
648
+ <td>M</td>
649
+ <td>D</td>
650
+ <td>W</td>
651
+ <td>P</td>
652
+ <td>E</td>
653
+ <td>K</td>
654
+ <td>S</td>
655
+ </tr>
656
+ <tr>
657
+ <td>L</td>
658
+ <td>S</td>
659
+ <td>T</td>
660
+ <td>H</td>
661
+ <td>T</td>
662
+ <td>G</td>
663
+ <td>O</td>
664
+ </tr>
665
+ <tr>
666
+ <td>L</td>
667
+ <td>B</td>
668
+ <td></td>
669
+ <td></td>
670
+ <td></td>
671
+ <td></td>
672
+ <td></td>
673
+ </tr>
674
+ </table>
675
+ </p>
676
+ </div>
677
+ </div>
678
+ </div>
679
+
680
+ </div>
681
+ </div>
682
+ </div>
683
+
684
+
685
+
686
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
687
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
688
+ <script>
689
+ $(document).ready(function(){
690
+
691
+ $.getJSON('../../sheep.json')
692
+ .done(function(data) {
693
+ $('span.current-sheep').html(data.sheep);
694
+ $('span.next-update').html(data.update);
695
+ });
696
+
697
+ $("#nextupdate").hover(function(){
698
+ $('#navtooltip').addClass('hover');
699
+ }, function(){
700
+ $('#navtooltip').removeClass('hover');
701
+ });
702
+ });
703
+ </script>
704
+
705
+
706
+
707
+
708
+ </body><script type="module" src="/checkanswer.js"></script>
709
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_always_amusing/always_amusing ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Always Amusing &mdash; Dog Show &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dog_show/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/always_amusing/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand" href="../../">MIT MUTTSTERY HUNT</a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/dog_show"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/dog_show/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <img class="puzzle-logo" src="../../static/round/dog_show/images/header.png">
107
+
108
+ <h2>Always Amusing</h2>
109
+
110
+ </div>
111
+ <div class="content">
112
+ <em>Ha! Idiot.</em></br></br>
113
+ Peach relative (3)</br>
114
+ Tums or Maalox (6)</br>
115
+ Moolah, dough, skrilla, etc. (8)</br>
116
+ Stretchy (1)</br>
117
+ Patriarch on a 2001-05 MTV reality show (5)</br>
118
+ "Viva Rock Vegas" family (2)</br>
119
+ "Colorful" hot drink used as an appetite suppressant: 2 wds. (3)</br>
120
+ Mystery in the sky, briefly (7)</br>
121
+ Extreme happiness, or a drug that might induce it (4)</br>
122
+ Root beer ingredient (4)</br>
123
+ Robert Smigel's dog puppet (2)
124
+
125
+ </div>
126
+ </div>
127
+ </div>
128
+
129
+
130
+
131
+ <div class="footer" style="margin-top:25px;z-index:1000;color:#444;position:fixed;left:285px">Puzzle artwork designed and produced by <a target="_blank" href="http://www.ahc.com/">ahc.com</a></div>
132
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
133
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
134
+ <script>
135
+ $(document).ready(function(){
136
+
137
+ $.getJSON('../../sheep.json')
138
+ .done(function(data) {
139
+ $('span.current-sheep').html(data.sheep);
140
+ $('span.next-update').html(data.update);
141
+ });
142
+
143
+ $("#nextupdate").hover(function(){
144
+ $('#navtooltip').addClass('hover');
145
+ }, function(){
146
+ $('#navtooltip').removeClass('hover');
147
+ });
148
+ });
149
+ </script>
150
+
151
+
152
+
153
+
154
+ </body><script type="module" src="/checkanswer.js"></script>
155
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_always_amusing/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/2016/2016_puzzle_always_amusing/index.html ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Always Amusing &mdash; Dog Show &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dog_show/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/always_amusing/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand" href="../../">MIT MUTTSTERY HUNT</a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/dog_show"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/dog_show/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <img class="puzzle-logo" src="../../static/round/dog_show/images/header.png">
107
+
108
+ <h2>Always Amusing</h2>
109
+
110
+ </div>
111
+ <div class="content">
112
+ <em>Ha! Idiot.</em></br></br>
113
+ Peach relative (3)</br>
114
+ Tums or Maalox (6)</br>
115
+ Moolah, dough, skrilla, etc. (8)</br>
116
+ Stretchy (1)</br>
117
+ Patriarch on a 2001-05 MTV reality show (5)</br>
118
+ "Viva Rock Vegas" family (2)</br>
119
+ "Colorful" hot drink used as an appetite suppressant: 2 wds. (3)</br>
120
+ Mystery in the sky, briefly (7)</br>
121
+ Extreme happiness, or a drug that might induce it (4)</br>
122
+ Root beer ingredient (4)</br>
123
+ Robert Smigel's dog puppet (2)
124
+
125
+ </div>
126
+ </div>
127
+ </div>
128
+
129
+
130
+
131
+ <div class="footer" style="margin-top:25px;z-index:1000;color:#444;position:fixed;left:285px">Puzzle artwork designed and produced by <a target="_blank" href="http://www.ahc.com/">ahc.com</a></div>
132
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
133
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
134
+ <script>
135
+ $(document).ready(function(){
136
+
137
+ $.getJSON('../../sheep.json')
138
+ .done(function(data) {
139
+ $('span.current-sheep').html(data.sheep);
140
+ $('span.next-update').html(data.update);
141
+ });
142
+
143
+ $("#nextupdate").hover(function(){
144
+ $('#navtooltip').addClass('hover');
145
+ }, function(){
146
+ $('#navtooltip').removeClass('hover');
147
+ });
148
+ });
149
+ </script>
150
+
151
+
152
+
153
+
154
+ </body><script type="module" src="/checkanswer.js"></script>
155
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_ascii_characters/ascii_characters ADDED
The diff for this file is too large to render. See raw diff
 
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_ascii_characters/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/2016/2016_puzzle_ascii_characters/index.html ADDED
The diff for this file is too large to render. See raw diff
 
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_before_and_after/before_and_after ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Before and After &mdash; Dog Show &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dog_show/stylesheets/puzzle.css" />
19
+
20
+ <link rel="stylesheet" href="puzzle.css" />
21
+
22
+
23
+ <style>
24
+ .navtooltip.hover {
25
+ display: block;
26
+ }
27
+ .navtooltip {
28
+ display: none;
29
+ position: absolute;
30
+ background-color: rgba(20,20,20, 1);
31
+ border: 1px solid #888;
32
+ padding: 10px 10px;
33
+ color: white;
34
+ border-radius: 5px;
35
+ box-shadow: 0 0 7px black;
36
+ width: 13em;
37
+ margin: 10px 10px;
38
+ color: rgba(255, 255, 255, 0.9);
39
+ }
40
+ </style>
41
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
42
+ </head>
43
+
44
+ <body class="puzzle-page">
45
+
46
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
47
+ <div class="container">
48
+ <div class="navbar-header">
49
+ <!-- mobile toggle -->
50
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
51
+ <span class="sr-only">Toggle navigation</span>
52
+ <span class="icon-bar"></span>
53
+ <span class="icon-bar"></span>
54
+ <span class="icon-bar"></span>
55
+ </button>
56
+ </div>
57
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
58
+
59
+ <ul class="nav navbar-nav navbar-left">
60
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
61
+ <li class="dropdown">
62
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
63
+ <ul class="dropdown-menu inverse-dropdown">
64
+ <li><a href="../../toc.html">All Puzzles</a></li>
65
+ <li><a href="../../faq.html">FAQ</a></li>
66
+ </ul>
67
+ </li>
68
+
69
+ </ul>
70
+
71
+ <ul class="nav navbar-nav navbar-right">
72
+
73
+
74
+
75
+ <li class="dropdown">
76
+
77
+
78
+
79
+ <!--<a href="../../submit/puzzle/before_and_after/">Call in Answer</a>-->
80
+ <a href="solution/">Solution</a>
81
+
82
+
83
+
84
+ </li>
85
+ </ul>
86
+
87
+
88
+
89
+ <a class="navbar-brand" href="../../">MIT MUTTSTERY HUNT</a>
90
+
91
+
92
+ </div><!-- /.navbar-collapse -->
93
+ </div>
94
+ </nav>
95
+
96
+
97
+
98
+ <div class="back">
99
+ <div class="main">
100
+ <a class="btn back-to-round" href="../../round/dog_show"><span class="glyphicon glyphicon-menu-left"></span></a>
101
+
102
+ <img id="bg-desat" src="../../static/round/dog_show/images/bg-desat.jpg"/>
103
+
104
+ </div>
105
+ <div class="puzzle">
106
+ <div class="header">
107
+
108
+ <img class="puzzle-logo" src="../../static/round/dog_show/images/header.png">
109
+
110
+ <h2>Before and After</h2>
111
+
112
+ </div>
113
+ <div class="content">
114
+ <table>
115
+ <tr>
116
+ <td>
117
+
118
+ <table>
119
+
120
+ <tbody><tr><td>
121
+
122
+ <ul>
123
+ <li>CW superhero show (5)</li>
124
+ <li>Place that may hold Sunday School (6)</li>
125
+ <li>Controlled growth of bacteria (7)</li>
126
+ <li>Place that may hold sundaes cool? (7)</li>
127
+ <li>____ and center (5)</li>
128
+ <li>Hearty, as an appetite (7)</li>
129
+ <li>Downey, Jr.'s partner in crime-solving (3)</li>
130
+ <li>Went away (4)</li>
131
+ <li>Prone to chest-thumping and flexing, say (5)</li>
132
+ <li>Shut up the ShamWow guy, say (4)</li>
133
+ <li>Elf's holiday home? (5)</li>
134
+ <li>To sleep, perchance to dream? (7)</li>
135
+ <li>Common substitute for meat (4)</li>
136
+ <li>Branson-owned Airline with an entertaining safety video (6)</li>
137
+ <li>Hindu ascetic (4)</li>
138
+ </ul>
139
+ </td>
140
+ <td>
141
+ <ul>
142
+ <li>Atkinson's childish "Mr." (4)</li>
143
+ <li>Gift-giving holiday (9)</li>
144
+ <li>Like the weather outside right now, probably (4)</li>
145
+ <li>Profound or philosophical (4)</li>
146
+ <li>X + 2 = 3, for example (8)</li>
147
+ <li>Feeling of hopeful anticipation, e.g. (10)</li>
148
+ <li>Hit song by Bruno Mars (7)</li>
149
+ <li>Enthusiastically beyond what was required; gonzo (9)</li>
150
+ <li>Diaper wearer (if it's a stinky one) (6)</li>
151
+ <li>Post on Yelp, or review on IMDb (4)</li>
152
+ <li>Like germs such as MRSA (9)</li>
153
+ <li>Do what a Post-it note does (5)</li>
154
+ <li>Hollywood's Oliver or Sharon (5)</li>
155
+ <li>Homogeneous (7)</li>
156
+ <li>Bystander (7)</li>
157
+ </ul></td></tr></tbody></table>
158
+ <p></p>
159
+
160
+ </td></tr>
161
+ <tr><td>
162
+
163
+ <table id="bottom">
164
+ <tbody><tr><td><p>S__________</p></td><td><p>_ _ _ _ _</p></td><td><p>__________R</p></td></tr>
165
+ <tr><td><p>F__________</p></td><td><p>_ _ _ _</p></td><td><p>__________E</p></td></tr>
166
+ <tr><td><p>A__________</p></td><td><p>_ _ _ _</p></td><td><p>__________D</p></td></tr>
167
+ <tr><td><p>M__________</p></td><td><p>_ _ _ _</p></td><td><p>__________N</p></td></tr>
168
+ <tr><td><p>Y__________</p></td><td><p>_ _ _ _</p></td><td><p>__________S</p></td></tr>
169
+ <tr><td><p>F__________</p></td><td><p>_ _ _ _ _ _</p></td><td><p>__________N</p></td></tr>
170
+ <tr><td><p>C__________</p></td><td><p>_ _ _ _ _ _</p></td><td><p>__________S</p></td></tr>
171
+ <tr><td><p>H__________</p></td><td><p>_ _ _ _</p></td><td><p>__________K</p></td></tr>
172
+ <tr><td><p>M__________</p></td><td><p>_ _ _</p></td><td><p>__________D</p></td></tr>
173
+ <tr><td><p>V__________</p></td><td><p>_ _ _ _ _</p></td><td><p>__________E</p></td></tr>
174
+ <tr><td><p>L__________</p></td><td><p>_ _ _ _ _ _</p></td><td><p>__________M</p></td></tr>
175
+ <tr><td><p>T__________</p></td><td><p>_ _ _ _</p></td><td><p>__________P</p></td></tr>
176
+ <tr><td><p>C__________</p></td><td><p>_ _ _ _ _</p></td><td><p>__________T</p></td></tr>
177
+ <tr><td><p>L__________</p></td><td><p>_ _ _ _</p></td><td><p>__________E</p></td></tr>
178
+ <tr><td><p>S__________</p></td><td><p>_ _ _ _</p></td><td><p>__________Y</p></td></tr>
179
+
180
+
181
+ </tbody></table>
182
+
183
+ </td></tr>
184
+
185
+ </table>
186
+
187
+ </div>
188
+ </div>
189
+ </div>
190
+
191
+
192
+
193
+ <div class="footer" style="margin-top:25px;z-index:1000;color:#444;position:fixed;left:285px">Puzzle artwork designed and produced by <a target="_blank" href="http://www.ahc.com/">ahc.com</a></div>
194
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
195
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
196
+ <script>
197
+ $(document).ready(function(){
198
+
199
+ $.getJSON('../../sheep.json')
200
+ .done(function(data) {
201
+ $('span.current-sheep').html(data.sheep);
202
+ $('span.next-update').html(data.update);
203
+ });
204
+
205
+ $("#nextupdate").hover(function(){
206
+ $('#navtooltip').addClass('hover');
207
+ }, function(){
208
+ $('#navtooltip').removeClass('hover');
209
+ });
210
+ });
211
+ </script>
212
+
213
+
214
+
215
+
216
+ </body><script type="module" src="/checkanswer.js"></script>
217
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_before_and_after/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/2016/2016_puzzle_before_and_after/index.html ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Before and After &mdash; Dog Show &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dog_show/stylesheets/puzzle.css" />
19
+
20
+ <link rel="stylesheet" href="puzzle.css" />
21
+
22
+
23
+ <style>
24
+ .navtooltip.hover {
25
+ display: block;
26
+ }
27
+ .navtooltip {
28
+ display: none;
29
+ position: absolute;
30
+ background-color: rgba(20,20,20, 1);
31
+ border: 1px solid #888;
32
+ padding: 10px 10px;
33
+ color: white;
34
+ border-radius: 5px;
35
+ box-shadow: 0 0 7px black;
36
+ width: 13em;
37
+ margin: 10px 10px;
38
+ color: rgba(255, 255, 255, 0.9);
39
+ }
40
+ </style>
41
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
42
+ </head>
43
+
44
+ <body class="puzzle-page">
45
+
46
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
47
+ <div class="container">
48
+ <div class="navbar-header">
49
+ <!-- mobile toggle -->
50
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
51
+ <span class="sr-only">Toggle navigation</span>
52
+ <span class="icon-bar"></span>
53
+ <span class="icon-bar"></span>
54
+ <span class="icon-bar"></span>
55
+ </button>
56
+ </div>
57
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
58
+
59
+ <ul class="nav navbar-nav navbar-left">
60
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
61
+ <li class="dropdown">
62
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
63
+ <ul class="dropdown-menu inverse-dropdown">
64
+ <li><a href="../../toc.html">All Puzzles</a></li>
65
+ <li><a href="../../faq.html">FAQ</a></li>
66
+ </ul>
67
+ </li>
68
+
69
+ </ul>
70
+
71
+ <ul class="nav navbar-nav navbar-right">
72
+
73
+
74
+
75
+ <li class="dropdown">
76
+
77
+
78
+
79
+ <!--<a href="../../submit/puzzle/before_and_after/">Call in Answer</a>-->
80
+ <a href="solution/">Solution</a>
81
+
82
+
83
+
84
+ </li>
85
+ </ul>
86
+
87
+
88
+
89
+ <a class="navbar-brand" href="../../">MIT MUTTSTERY HUNT</a>
90
+
91
+
92
+ </div><!-- /.navbar-collapse -->
93
+ </div>
94
+ </nav>
95
+
96
+
97
+
98
+ <div class="back">
99
+ <div class="main">
100
+ <a class="btn back-to-round" href="../../round/dog_show"><span class="glyphicon glyphicon-menu-left"></span></a>
101
+
102
+ <img id="bg-desat" src="../../static/round/dog_show/images/bg-desat.jpg"/>
103
+
104
+ </div>
105
+ <div class="puzzle">
106
+ <div class="header">
107
+
108
+ <img class="puzzle-logo" src="../../static/round/dog_show/images/header.png">
109
+
110
+ <h2>Before and After</h2>
111
+
112
+ </div>
113
+ <div class="content">
114
+ <table>
115
+ <tr>
116
+ <td>
117
+
118
+ <table>
119
+
120
+ <tbody><tr><td>
121
+
122
+ <ul>
123
+ <li>CW superhero show (5)</li>
124
+ <li>Place that may hold Sunday School (6)</li>
125
+ <li>Controlled growth of bacteria (7)</li>
126
+ <li>Place that may hold sundaes cool? (7)</li>
127
+ <li>____ and center (5)</li>
128
+ <li>Hearty, as an appetite (7)</li>
129
+ <li>Downey, Jr.'s partner in crime-solving (3)</li>
130
+ <li>Went away (4)</li>
131
+ <li>Prone to chest-thumping and flexing, say (5)</li>
132
+ <li>Shut up the ShamWow guy, say (4)</li>
133
+ <li>Elf's holiday home? (5)</li>
134
+ <li>To sleep, perchance to dream? (7)</li>
135
+ <li>Common substitute for meat (4)</li>
136
+ <li>Branson-owned Airline with an entertaining safety video (6)</li>
137
+ <li>Hindu ascetic (4)</li>
138
+ </ul>
139
+ </td>
140
+ <td>
141
+ <ul>
142
+ <li>Atkinson's childish "Mr." (4)</li>
143
+ <li>Gift-giving holiday (9)</li>
144
+ <li>Like the weather outside right now, probably (4)</li>
145
+ <li>Profound or philosophical (4)</li>
146
+ <li>X + 2 = 3, for example (8)</li>
147
+ <li>Feeling of hopeful anticipation, e.g. (10)</li>
148
+ <li>Hit song by Bruno Mars (7)</li>
149
+ <li>Enthusiastically beyond what was required; gonzo (9)</li>
150
+ <li>Diaper wearer (if it's a stinky one) (6)</li>
151
+ <li>Post on Yelp, or review on IMDb (4)</li>
152
+ <li>Like germs such as MRSA (9)</li>
153
+ <li>Do what a Post-it note does (5)</li>
154
+ <li>Hollywood's Oliver or Sharon (5)</li>
155
+ <li>Homogeneous (7)</li>
156
+ <li>Bystander (7)</li>
157
+ </ul></td></tr></tbody></table>
158
+ <p></p>
159
+
160
+ </td></tr>
161
+ <tr><td>
162
+
163
+ <table id="bottom">
164
+ <tbody><tr><td><p>S__________</p></td><td><p>_ _ _ _ _</p></td><td><p>__________R</p></td></tr>
165
+ <tr><td><p>F__________</p></td><td><p>_ _ _ _</p></td><td><p>__________E</p></td></tr>
166
+ <tr><td><p>A__________</p></td><td><p>_ _ _ _</p></td><td><p>__________D</p></td></tr>
167
+ <tr><td><p>M__________</p></td><td><p>_ _ _ _</p></td><td><p>__________N</p></td></tr>
168
+ <tr><td><p>Y__________</p></td><td><p>_ _ _ _</p></td><td><p>__________S</p></td></tr>
169
+ <tr><td><p>F__________</p></td><td><p>_ _ _ _ _ _</p></td><td><p>__________N</p></td></tr>
170
+ <tr><td><p>C__________</p></td><td><p>_ _ _ _ _ _</p></td><td><p>__________S</p></td></tr>
171
+ <tr><td><p>H__________</p></td><td><p>_ _ _ _</p></td><td><p>__________K</p></td></tr>
172
+ <tr><td><p>M__________</p></td><td><p>_ _ _</p></td><td><p>__________D</p></td></tr>
173
+ <tr><td><p>V__________</p></td><td><p>_ _ _ _ _</p></td><td><p>__________E</p></td></tr>
174
+ <tr><td><p>L__________</p></td><td><p>_ _ _ _ _ _</p></td><td><p>__________M</p></td></tr>
175
+ <tr><td><p>T__________</p></td><td><p>_ _ _ _</p></td><td><p>__________P</p></td></tr>
176
+ <tr><td><p>C__________</p></td><td><p>_ _ _ _ _</p></td><td><p>__________T</p></td></tr>
177
+ <tr><td><p>L__________</p></td><td><p>_ _ _ _</p></td><td><p>__________E</p></td></tr>
178
+ <tr><td><p>S__________</p></td><td><p>_ _ _ _</p></td><td><p>__________Y</p></td></tr>
179
+
180
+
181
+ </tbody></table>
182
+
183
+ </td></tr>
184
+
185
+ </table>
186
+
187
+ </div>
188
+ </div>
189
+ </div>
190
+
191
+
192
+
193
+ <div class="footer" style="margin-top:25px;z-index:1000;color:#444;position:fixed;left:285px">Puzzle artwork designed and produced by <a target="_blank" href="http://www.ahc.com/">ahc.com</a></div>
194
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
195
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
196
+ <script>
197
+ $(document).ready(function(){
198
+
199
+ $.getJSON('../../sheep.json')
200
+ .done(function(data) {
201
+ $('span.current-sheep').html(data.sheep);
202
+ $('span.next-update').html(data.update);
203
+ });
204
+
205
+ $("#nextupdate").hover(function(){
206
+ $('#navtooltip').addClass('hover');
207
+ }, function(){
208
+ $('#navtooltip').removeClass('hover');
209
+ });
210
+ });
211
+ </script>
212
+
213
+
214
+
215
+
216
+ </body><script type="module" src="/checkanswer.js"></script>
217
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_behind_the_music/behind_the_music ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Behind the Music &mdash; Opus &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/opus/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/behind_the_music/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/opus"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/opus/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <h2>Behind the Music</h2>
107
+
108
+ </div>
109
+ <div class="content">
110
+ <iframe width="560" height="315" src="https://www.youtube.com/embed/RBesvmLGDm0" frameborder="0" allowfullscreen></iframe>
111
+
112
+ </div>
113
+ </div>
114
+ </div>
115
+
116
+
117
+
118
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
119
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
120
+ <script>
121
+ $(document).ready(function(){
122
+
123
+ $.getJSON('../../sheep.json')
124
+ .done(function(data) {
125
+ $('span.current-sheep').html(data.sheep);
126
+ $('span.next-update').html(data.update);
127
+ });
128
+
129
+ $("#nextupdate").hover(function(){
130
+ $('#navtooltip').addClass('hover');
131
+ }, function(){
132
+ $('#navtooltip').removeClass('hover');
133
+ });
134
+ });
135
+ </script>
136
+
137
+
138
+
139
+
140
+ </body><script type="module" src="/checkanswer.js"></script>
141
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_behind_the_music/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/2016/2016_puzzle_behind_the_music/index.html ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Behind the Music &mdash; Opus &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/opus/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/behind_the_music/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/opus"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/opus/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <h2>Behind the Music</h2>
107
+
108
+ </div>
109
+ <div class="content">
110
+ <iframe width="560" height="315" src="https://www.youtube.com/embed/RBesvmLGDm0" frameborder="0" allowfullscreen></iframe>
111
+
112
+ </div>
113
+ </div>
114
+ </div>
115
+
116
+
117
+
118
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
119
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
120
+ <script>
121
+ $(document).ready(function(){
122
+
123
+ $.getJSON('../../sheep.json')
124
+ .done(function(data) {
125
+ $('span.current-sheep').html(data.sheep);
126
+ $('span.next-update').html(data.update);
127
+ });
128
+
129
+ $("#nextupdate").hover(function(){
130
+ $('#navtooltip').addClass('hover');
131
+ }, function(){
132
+ $('#navtooltip').removeClass('hover');
133
+ });
134
+ });
135
+ </script>
136
+
137
+
138
+
139
+
140
+ </body><script type="module" src="/checkanswer.js"></script>
141
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_believe/believe ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Believe &mdash; Sleeping Gypsy &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/sleeping_gypsy/stylesheets/puzzle.css" />
19
+
20
+ <link rel="stylesheet" href="puzzle.css" />
21
+
22
+
23
+ <style>
24
+ .navtooltip.hover {
25
+ display: block;
26
+ }
27
+ .navtooltip {
28
+ display: none;
29
+ position: absolute;
30
+ background-color: rgba(20,20,20, 1);
31
+ border: 1px solid #888;
32
+ padding: 10px 10px;
33
+ color: white;
34
+ border-radius: 5px;
35
+ box-shadow: 0 0 7px black;
36
+ width: 13em;
37
+ margin: 10px 10px;
38
+ color: rgba(255, 255, 255, 0.9);
39
+ }
40
+ </style>
41
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
42
+ </head>
43
+
44
+ <body class="puzzle-page">
45
+
46
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
47
+ <div class="container">
48
+ <div class="navbar-header">
49
+ <!-- mobile toggle -->
50
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
51
+ <span class="sr-only">Toggle navigation</span>
52
+ <span class="icon-bar"></span>
53
+ <span class="icon-bar"></span>
54
+ <span class="icon-bar"></span>
55
+ </button>
56
+ </div>
57
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
58
+
59
+ <ul class="nav navbar-nav navbar-left">
60
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
61
+ <li class="dropdown">
62
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
63
+ <ul class="dropdown-menu inverse-dropdown">
64
+ <li><a href="../../toc.html">All Puzzles</a></li>
65
+ <li><a href="../../faq.html">FAQ</a></li>
66
+ </ul>
67
+ </li>
68
+
69
+ </ul>
70
+
71
+ <ul class="nav navbar-nav navbar-right">
72
+
73
+
74
+
75
+ <li class="dropdown">
76
+
77
+
78
+
79
+ <!--<a href="../../submit/puzzle/believe/">Call in Answer</a>-->
80
+ <a href="solution/">Solution</a>
81
+
82
+
83
+
84
+ </li>
85
+ </ul>
86
+
87
+
88
+
89
+ <a class="navbar-brand logo" href="../../"></a>
90
+
91
+
92
+ </div><!-- /.navbar-collapse -->
93
+ </div>
94
+ </nav>
95
+
96
+
97
+
98
+ <div class="back">
99
+ <div class="main">
100
+ <a class="btn back-to-round" href="../../round/sleeping_gypsy"><span class="glyphicon glyphicon-menu-left"></span></a>
101
+
102
+ <img id="bg-desat" src="../../static/round/sleeping_gypsy/images/believe/bg-desat.jpg"/>
103
+
104
+ </div>
105
+ <div class="puzzle">
106
+ <div class="header">
107
+
108
+ <img class="puzzle-logo" src="../../static/round/sleeping_gypsy/images/believe/header.png">
109
+
110
+ <h2>Believe</h2>
111
+
112
+ </div>
113
+ <div class="content">
114
+ <table>
115
+ <tr>
116
+ <td>
117
+ <div id="score">
118
+ <span class="orange">Score: <span id="score-num"></span></span>
119
+ </div>
120
+ </td>
121
+ <td>
122
+ </td>
123
+ </tr>
124
+ <tr>
125
+ <td>
126
+ <div>
127
+ <img id="hangman-image" src="images/hangman0.png" />
128
+ </div>
129
+ </td>
130
+ <td>
131
+ <div id="word-letters">
132
+ </div>
133
+ <div>
134
+ <form id="guess-form" style="display: none;">
135
+ <input type="text" id="guess-input" maxlength="1" size="1" />
136
+ <input type="submit" id="guess-button" class="game-button" value="Guess" />
137
+ </form>
138
+ <div id="win" style="display: none;">
139
+ <span class="orange" id="score-increment"></span>
140
+ <button class="play-again game-button">Next word</button>
141
+ </div>
142
+ <div id="lose" style="display: none;">
143
+ <button class="play-again game-button">Next word</button>
144
+ </div>
145
+ </div>
146
+ <div id="incorrect-letters">
147
+ </div>
148
+ </td>
149
+ </tr>
150
+ </table>
151
+ </div>
152
+ </div>
153
+ </div>
154
+
155
+
156
+
157
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
158
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
159
+ <script>
160
+ $(document).ready(function(){
161
+
162
+ $.getJSON('../../sheep.json')
163
+ .done(function(data) {
164
+ $('span.current-sheep').html(data.sheep);
165
+ $('span.next-update').html(data.update);
166
+ });
167
+
168
+ $("#nextupdate").hover(function(){
169
+ $('#navtooltip').addClass('hover');
170
+ }, function(){
171
+ $('#navtooltip').removeClass('hover');
172
+ });
173
+ });
174
+ </script>
175
+
176
+
177
+ <script src="puzzle.js"></script>
178
+
179
+
180
+
181
+ </body><script type="module" src="/checkanswer.js"></script>
182
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_believe/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/2016/2016_puzzle_believe/index.html ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Believe &mdash; Sleeping Gypsy &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/sleeping_gypsy/stylesheets/puzzle.css" />
19
+
20
+ <link rel="stylesheet" href="puzzle.css" />
21
+
22
+
23
+ <style>
24
+ .navtooltip.hover {
25
+ display: block;
26
+ }
27
+ .navtooltip {
28
+ display: none;
29
+ position: absolute;
30
+ background-color: rgba(20,20,20, 1);
31
+ border: 1px solid #888;
32
+ padding: 10px 10px;
33
+ color: white;
34
+ border-radius: 5px;
35
+ box-shadow: 0 0 7px black;
36
+ width: 13em;
37
+ margin: 10px 10px;
38
+ color: rgba(255, 255, 255, 0.9);
39
+ }
40
+ </style>
41
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
42
+ </head>
43
+
44
+ <body class="puzzle-page">
45
+
46
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
47
+ <div class="container">
48
+ <div class="navbar-header">
49
+ <!-- mobile toggle -->
50
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
51
+ <span class="sr-only">Toggle navigation</span>
52
+ <span class="icon-bar"></span>
53
+ <span class="icon-bar"></span>
54
+ <span class="icon-bar"></span>
55
+ </button>
56
+ </div>
57
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
58
+
59
+ <ul class="nav navbar-nav navbar-left">
60
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
61
+ <li class="dropdown">
62
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
63
+ <ul class="dropdown-menu inverse-dropdown">
64
+ <li><a href="../../toc.html">All Puzzles</a></li>
65
+ <li><a href="../../faq.html">FAQ</a></li>
66
+ </ul>
67
+ </li>
68
+
69
+ </ul>
70
+
71
+ <ul class="nav navbar-nav navbar-right">
72
+
73
+
74
+
75
+ <li class="dropdown">
76
+
77
+
78
+
79
+ <!--<a href="../../submit/puzzle/believe/">Call in Answer</a>-->
80
+ <a href="solution/">Solution</a>
81
+
82
+
83
+
84
+ </li>
85
+ </ul>
86
+
87
+
88
+
89
+ <a class="navbar-brand logo" href="../../"></a>
90
+
91
+
92
+ </div><!-- /.navbar-collapse -->
93
+ </div>
94
+ </nav>
95
+
96
+
97
+
98
+ <div class="back">
99
+ <div class="main">
100
+ <a class="btn back-to-round" href="../../round/sleeping_gypsy"><span class="glyphicon glyphicon-menu-left"></span></a>
101
+
102
+ <img id="bg-desat" src="../../static/round/sleeping_gypsy/images/believe/bg-desat.jpg"/>
103
+
104
+ </div>
105
+ <div class="puzzle">
106
+ <div class="header">
107
+
108
+ <img class="puzzle-logo" src="../../static/round/sleeping_gypsy/images/believe/header.png">
109
+
110
+ <h2>Believe</h2>
111
+
112
+ </div>
113
+ <div class="content">
114
+ <table>
115
+ <tr>
116
+ <td>
117
+ <div id="score">
118
+ <span class="orange">Score: <span id="score-num"></span></span>
119
+ </div>
120
+ </td>
121
+ <td>
122
+ </td>
123
+ </tr>
124
+ <tr>
125
+ <td>
126
+ <div>
127
+ <img id="hangman-image" src="images/hangman0.png" />
128
+ </div>
129
+ </td>
130
+ <td>
131
+ <div id="word-letters">
132
+ </div>
133
+ <div>
134
+ <form id="guess-form" style="display: none;">
135
+ <input type="text" id="guess-input" maxlength="1" size="1" />
136
+ <input type="submit" id="guess-button" class="game-button" value="Guess" />
137
+ </form>
138
+ <div id="win" style="display: none;">
139
+ <span class="orange" id="score-increment"></span>
140
+ <button class="play-again game-button">Next word</button>
141
+ </div>
142
+ <div id="lose" style="display: none;">
143
+ <button class="play-again game-button">Next word</button>
144
+ </div>
145
+ </div>
146
+ <div id="incorrect-letters">
147
+ </div>
148
+ </td>
149
+ </tr>
150
+ </table>
151
+ </div>
152
+ </div>
153
+ </div>
154
+
155
+
156
+
157
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
158
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
159
+ <script>
160
+ $(document).ready(function(){
161
+
162
+ $.getJSON('../../sheep.json')
163
+ .done(function(data) {
164
+ $('span.current-sheep').html(data.sheep);
165
+ $('span.next-update').html(data.update);
166
+ });
167
+
168
+ $("#nextupdate").hover(function(){
169
+ $('#navtooltip').addClass('hover');
170
+ }, function(){
171
+ $('#navtooltip').removeClass('hover');
172
+ });
173
+ });
174
+ </script>
175
+
176
+
177
+ <script src="puzzle.js"></script>
178
+
179
+
180
+
181
+ </body><script type="module" src="/checkanswer.js"></script>
182
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_bits_of_nomenclature_zoned_appropriately/bits_of_nomenclature_zoned_appropriately ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Bits Of Nomenclature, Zoned Appropriately &mdash; Dog Show &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dog_show/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/bits_of_nomenclature_zoned_appropriately/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand" href="../../">MIT MUTTSTERY HUNT</a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/dog_show"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/dog_show/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <img class="puzzle-logo" src="../../static/round/dog_show/images/header.png">
107
+
108
+ <h2>Bits Of Nomenclature, Zoned Appropriately</h2>
109
+
110
+ </div>
111
+ <div class="content">
112
+
113
+ <p>No dogs here, despite what you might expect.</p>
114
+
115
+ <br>
116
+ <table><tr>
117
+ <td>
118
+
119
+ <p><image src="images/Bonza1.png" style="vertical-align:top"></p>
120
+ <br>
121
+
122
+ <p><image src="images/Bonza2.png" style="vertical-align:top"></p>
123
+ <br>
124
+
125
+ <p><image src="images/Bonza3.png" style="vertical-align:top"></p>
126
+ <br>
127
+
128
+ <p><image src="images/Bonza4.png" style="vertical-align:top"></p>
129
+ <br>
130
+
131
+ </td></tr></table>
132
+
133
+ </div>
134
+ </div>
135
+ </div>
136
+
137
+
138
+
139
+ <div class="footer" style="margin-top:25px;z-index:1000;color:#444;position:fixed;left:285px">Puzzle artwork designed and produced by <a target="_blank" href="http://www.ahc.com/">ahc.com</a></div>
140
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
141
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
142
+ <script>
143
+ $(document).ready(function(){
144
+
145
+ $.getJSON('../../sheep.json')
146
+ .done(function(data) {
147
+ $('span.current-sheep').html(data.sheep);
148
+ $('span.next-update').html(data.update);
149
+ });
150
+
151
+ $("#nextupdate").hover(function(){
152
+ $('#navtooltip').addClass('hover');
153
+ }, function(){
154
+ $('#navtooltip').removeClass('hover');
155
+ });
156
+ });
157
+ </script>
158
+
159
+
160
+
161
+
162
+ </body><script type="module" src="/checkanswer.js"></script>
163
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_bits_of_nomenclature_zoned_appropriately/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/2016/2016_puzzle_bits_of_nomenclature_zoned_appropriately/index.html ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Bits Of Nomenclature, Zoned Appropriately &mdash; Dog Show &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dog_show/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/bits_of_nomenclature_zoned_appropriately/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand" href="../../">MIT MUTTSTERY HUNT</a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/dog_show"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/dog_show/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <img class="puzzle-logo" src="../../static/round/dog_show/images/header.png">
107
+
108
+ <h2>Bits Of Nomenclature, Zoned Appropriately</h2>
109
+
110
+ </div>
111
+ <div class="content">
112
+
113
+ <p>No dogs here, despite what you might expect.</p>
114
+
115
+ <br>
116
+ <table><tr>
117
+ <td>
118
+
119
+ <p><image src="images/Bonza1.png" style="vertical-align:top"></p>
120
+ <br>
121
+
122
+ <p><image src="images/Bonza2.png" style="vertical-align:top"></p>
123
+ <br>
124
+
125
+ <p><image src="images/Bonza3.png" style="vertical-align:top"></p>
126
+ <br>
127
+
128
+ <p><image src="images/Bonza4.png" style="vertical-align:top"></p>
129
+ <br>
130
+
131
+ </td></tr></table>
132
+
133
+ </div>
134
+ </div>
135
+ </div>
136
+
137
+
138
+
139
+ <div class="footer" style="margin-top:25px;z-index:1000;color:#444;position:fixed;left:285px">Puzzle artwork designed and produced by <a target="_blank" href="http://www.ahc.com/">ahc.com</a></div>
140
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
141
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
142
+ <script>
143
+ $(document).ready(function(){
144
+
145
+ $.getJSON('../../sheep.json')
146
+ .done(function(data) {
147
+ $('span.current-sheep').html(data.sheep);
148
+ $('span.next-update').html(data.update);
149
+ });
150
+
151
+ $("#nextupdate").hover(function(){
152
+ $('#navtooltip').addClass('hover');
153
+ }, function(){
154
+ $('#navtooltip').removeClass('hover');
155
+ });
156
+ });
157
+ </script>
158
+
159
+
160
+
161
+
162
+ </body><script type="module" src="/checkanswer.js"></script>
163
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_blazing_trails/blazing_trails ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Blazing Trails &mdash; Dreamtime &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dreamtime/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/blazing_trails/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/dreamtime"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/dreamtime/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <h2>Blazing Trails</h2>
107
+
108
+ </div>
109
+ <div class="content">
110
+ <p><a href="images/blazing_trails.pdf">[View this puzzle as a PDF]</a></p>
111
+
112
+ </div>
113
+ </div>
114
+ </div>
115
+
116
+
117
+
118
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
119
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
120
+ <script>
121
+ $(document).ready(function(){
122
+
123
+ $.getJSON('../../sheep.json')
124
+ .done(function(data) {
125
+ $('span.current-sheep').html(data.sheep);
126
+ $('span.next-update').html(data.update);
127
+ });
128
+
129
+ $("#nextupdate").hover(function(){
130
+ $('#navtooltip').addClass('hover');
131
+ }, function(){
132
+ $('#navtooltip').removeClass('hover');
133
+ });
134
+ });
135
+ </script>
136
+
137
+
138
+
139
+
140
+ </body><script type="module" src="/checkanswer.js"></script>
141
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_blazing_trails/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/2016/2016_puzzle_blazing_trails/index.html ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Blazing Trails &mdash; Dreamtime &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dreamtime/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/blazing_trails/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/dreamtime"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/dreamtime/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <h2>Blazing Trails</h2>
107
+
108
+ </div>
109
+ <div class="content">
110
+ <p><a href="images/blazing_trails.pdf">[View this puzzle as a PDF]</a></p>
111
+
112
+ </div>
113
+ </div>
114
+ </div>
115
+
116
+
117
+
118
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
119
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
120
+ <script>
121
+ $(document).ready(function(){
122
+
123
+ $.getJSON('../../sheep.json')
124
+ .done(function(data) {
125
+ $('span.current-sheep').html(data.sheep);
126
+ $('span.next-update').html(data.update);
127
+ });
128
+
129
+ $("#nextupdate").hover(function(){
130
+ $('#navtooltip').addClass('hover');
131
+ }, function(){
132
+ $('#navtooltip').removeClass('hover');
133
+ });
134
+ });
135
+ </script>
136
+
137
+
138
+
139
+
140
+ </body><script type="module" src="/checkanswer.js"></script>
141
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_blocks/blocks ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Blocks &mdash; Dreamtime &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dreamtime/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/blocks/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/dreamtime"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/dreamtime/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <h2>Blocks</h2>
107
+
108
+ </div>
109
+ <div class="content">
110
+ Oh, look at what someone left on the playmat.
111
+ <hr>
112
+
113
+ <table><tr><td><p>+&#189; <img src="images/cube1.png" width="300px" style="vertical-align:top"></p></td>
114
+ <td><p>+&#189;<img src="images/cube2.png" width="300px" style="vertical-align:top"></p></td>
115
+ <tr><td><p>+1 <img src="images/cube3.png" width="300px" style="vertical-align:top"></p></td>
116
+ <td><p>+3&#8532; <img src="images/cube4.png" width="300px" style="vertical-align:top"></p></td></tr>
117
+ <tr><td><p>+5 <img src="images/cube5.png" width="300px" style="vertical-align:top"></p></td>
118
+ <td><p>+5 <img src="images/cube6.png" width="300px" style="vertical-align:top"></p></td></tr>
119
+ <tr><td><p>+5&#8531; <img src="images/cube7.png" width="300px" style="vertical-align:top"></p></td>
120
+ <td><p>+6 <img src="images/cube8.png" width="300px" style="vertical-align:top"></p></td></tr></table>
121
+
122
+ <table><tr><td><ul>
123
+ <li>Copper and zinc alloy</li>
124
+ <li>Corpse</li>
125
+ <li>Deep valley</li>
126
+ <li>Decaying flesh</li>
127
+ <li>Your extracted message</li>
128
+ <li>Luminescence caused by fungus on rotting wood</li>
129
+ <li>Villain in Buffy: the Vampire Slayer's second season</li>
130
+ <li>Station between Waban and Riverside</li>
131
+ </ul></td>
132
+
133
+ <td><ul>
134
+ <li>Your answer</li>
135
+ <li>Mischievous child</li>
136
+ <li>Fool at court</li>
137
+ <li>People in chat who don't actually chat</li>
138
+ <li>Acorn product</li>
139
+ <li>Detective</li>
140
+ <li>Attendant to a knight</li>
141
+ <li>Metal subgenre popularized by Metallica</li>
142
+ </ul>
143
+
144
+ </td></tr></table>
145
+
146
+ </div>
147
+ </div>
148
+ </div>
149
+
150
+
151
+
152
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
153
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
154
+ <script>
155
+ $(document).ready(function(){
156
+
157
+ $.getJSON('../../sheep.json')
158
+ .done(function(data) {
159
+ $('span.current-sheep').html(data.sheep);
160
+ $('span.next-update').html(data.update);
161
+ });
162
+
163
+ $("#nextupdate").hover(function(){
164
+ $('#navtooltip').addClass('hover');
165
+ }, function(){
166
+ $('#navtooltip').removeClass('hover');
167
+ });
168
+ });
169
+ </script>
170
+
171
+
172
+
173
+
174
+ </body><script type="module" src="/checkanswer.js"></script>
175
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_blocks/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/2016/2016_puzzle_blocks/index.html ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Blocks &mdash; Dreamtime &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/dreamtime/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/blocks/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/dreamtime"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/dreamtime/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <h2>Blocks</h2>
107
+
108
+ </div>
109
+ <div class="content">
110
+ Oh, look at what someone left on the playmat.
111
+ <hr>
112
+
113
+ <table><tr><td><p>+&#189; <img src="images/cube1.png" width="300px" style="vertical-align:top"></p></td>
114
+ <td><p>+&#189;<img src="images/cube2.png" width="300px" style="vertical-align:top"></p></td>
115
+ <tr><td><p>+1 <img src="images/cube3.png" width="300px" style="vertical-align:top"></p></td>
116
+ <td><p>+3&#8532; <img src="images/cube4.png" width="300px" style="vertical-align:top"></p></td></tr>
117
+ <tr><td><p>+5 <img src="images/cube5.png" width="300px" style="vertical-align:top"></p></td>
118
+ <td><p>+5 <img src="images/cube6.png" width="300px" style="vertical-align:top"></p></td></tr>
119
+ <tr><td><p>+5&#8531; <img src="images/cube7.png" width="300px" style="vertical-align:top"></p></td>
120
+ <td><p>+6 <img src="images/cube8.png" width="300px" style="vertical-align:top"></p></td></tr></table>
121
+
122
+ <table><tr><td><ul>
123
+ <li>Copper and zinc alloy</li>
124
+ <li>Corpse</li>
125
+ <li>Deep valley</li>
126
+ <li>Decaying flesh</li>
127
+ <li>Your extracted message</li>
128
+ <li>Luminescence caused by fungus on rotting wood</li>
129
+ <li>Villain in Buffy: the Vampire Slayer's second season</li>
130
+ <li>Station between Waban and Riverside</li>
131
+ </ul></td>
132
+
133
+ <td><ul>
134
+ <li>Your answer</li>
135
+ <li>Mischievous child</li>
136
+ <li>Fool at court</li>
137
+ <li>People in chat who don't actually chat</li>
138
+ <li>Acorn product</li>
139
+ <li>Detective</li>
140
+ <li>Attendant to a knight</li>
141
+ <li>Metal subgenre popularized by Metallica</li>
142
+ </ul>
143
+
144
+ </td></tr></table>
145
+
146
+ </div>
147
+ </div>
148
+ </div>
149
+
150
+
151
+
152
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
153
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
154
+ <script>
155
+ $(document).ready(function(){
156
+
157
+ $.getJSON('../../sheep.json')
158
+ .done(function(data) {
159
+ $('span.current-sheep').html(data.sheep);
160
+ $('span.next-update').html(data.update);
161
+ });
162
+
163
+ $("#nextupdate").hover(function(){
164
+ $('#navtooltip').addClass('hover');
165
+ }, function(){
166
+ $('#navtooltip').removeClass('hover');
167
+ });
168
+ });
169
+ </script>
170
+
171
+
172
+
173
+
174
+ </body><script type="module" src="/checkanswer.js"></script>
175
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_blocks_and_blocks/blocks_and_blocks ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Blocks and Blocks &mdash; Sleeping Beauty &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/sleeping_beauty/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/blocks_and_blocks/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/sleeping_beauty"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/sleeping_beauty/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <img class="puzzle-logo" src="../../static/round/sleeping_beauty/images/blocks_and_blocks/header.png">
107
+
108
+ <h2>Blocks and Blocks</h2>
109
+
110
+ </div>
111
+ <div class="content">
112
+ <p class="flavortext">Some royalty love modern art, even sponsoring several artist-in-residence programs.</p>
113
+ <ul>
114
+ <li><em>The Island</em> by Leslie Wilson</li>
115
+ <li><em>Colors</em> by M&uuml;nk Re&scaron;</li>
116
+ <li><em>Are the Officials on Their Way?</em> by Cornelia Vancot</li>
117
+ <li><em>There is a Community in Every Area</em> by Farb</li>
118
+ <li><em>Just Authority</em> by T. Kimura</li>
119
+ <li><em>To Analyze a Plan</em> by Gerald Porter</li>
120
+ <li><em>Look Large</em> by Kho Vanov</li>
121
+ <li><em>Pretty Creative</em> by Rick Schwartz</li>
122
+ </ul>
123
+ <body>
124
+ <a href="images/1.png"><img src="images/1.png" width="500" /></a></br><br />
125
+ <a href="images/2.png"><img src="images/2.png" width="500" /></a></br><br />
126
+ <a href="images/3.png"><img src="images/3.png" width="500" /></a></br><br />
127
+ <a href="images/4.png"><img src="images/4.png" width="500" /></a></br><br />
128
+ <a href="images/5.png"><img src="images/5.png" width="500" /></a></br><br />
129
+ <a href="images/6.png"><img src="images/6.png" width="500" /></a></br><br />
130
+ <a href="images/7.png"><img src="images/7.png" width="500" /></a></br><br />
131
+ <a href="images/8.png"><img src="images/8.png" width="500" /></a></br><br />
132
+
133
+ </div>
134
+ </div>
135
+ </div>
136
+
137
+
138
+
139
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
140
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
141
+ <script>
142
+ $(document).ready(function(){
143
+
144
+ $.getJSON('../../sheep.json')
145
+ .done(function(data) {
146
+ $('span.current-sheep').html(data.sheep);
147
+ $('span.next-update').html(data.update);
148
+ });
149
+
150
+ $("#nextupdate").hover(function(){
151
+ $('#navtooltip').addClass('hover');
152
+ }, function(){
153
+ $('#navtooltip').removeClass('hover');
154
+ });
155
+ });
156
+ </script>
157
+
158
+
159
+
160
+
161
+ </body><script type="module" src="/checkanswer.js"></script>
162
+ </html>
benchmark/MIT_Mystery_Hunt/puzzles/by_tsv/2016/2016_puzzle_blocks_and_blocks/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/2016/2016_puzzle_blocks_and_blocks/index.html ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+
3
+
4
+
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=1240, user-scalable=yes"></meta>
9
+
10
+ <link rel="icon" href="../../static/hunt/images/icon32.png" type="image/x-icon" />
11
+ <title>Blocks and Blocks &mdash; Sleeping Beauty &mdash; MIT Mystery Hunt 2016</title>
12
+ <link rel="stylesheet" href="../../static/stylesheets/puzzle.css" />
13
+ <link rel="stylesheet" href="../../static/spoilr/css/extra.css" />
14
+ <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
15
+ <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:400,300,700' rel='stylesheet' type='text/css'>
16
+
17
+
18
+ <link rel="stylesheet" href="../../static/round/sleeping_beauty/stylesheets/puzzle.css" />
19
+
20
+
21
+ <style>
22
+ .navtooltip.hover {
23
+ display: block;
24
+ }
25
+ .navtooltip {
26
+ display: none;
27
+ position: absolute;
28
+ background-color: rgba(20,20,20, 1);
29
+ border: 1px solid #888;
30
+ padding: 10px 10px;
31
+ color: white;
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 7px black;
34
+ width: 13em;
35
+ margin: 10px 10px;
36
+ color: rgba(255, 255, 255, 0.9);
37
+ }
38
+ </style>
39
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
40
+ </head>
41
+
42
+ <body class="puzzle-page">
43
+
44
+ <nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation" id="nav">
45
+ <div class="container">
46
+ <div class="navbar-header">
47
+ <!-- mobile toggle -->
48
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
49
+ <span class="sr-only">Toggle navigation</span>
50
+ <span class="icon-bar"></span>
51
+ <span class="icon-bar"></span>
52
+ <span class="icon-bar"></span>
53
+ </button>
54
+ </div>
55
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
56
+
57
+ <ul class="nav navbar-nav navbar-left">
58
+ <li><a class="navbar-link visible-xs" href="index.html">Home</a></li>
59
+ <li class="dropdown">
60
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Navigation <b class="caret"></b></a>
61
+ <ul class="dropdown-menu inverse-dropdown">
62
+ <li><a href="../../toc.html">All Puzzles</a></li>
63
+ <li><a href="../../faq.html">FAQ</a></li>
64
+ </ul>
65
+ </li>
66
+
67
+ </ul>
68
+
69
+ <ul class="nav navbar-nav navbar-right">
70
+
71
+
72
+
73
+ <li class="dropdown">
74
+
75
+
76
+
77
+ <!--<a href="../../submit/puzzle/blocks_and_blocks/">Call in Answer</a>-->
78
+ <a href="solution/">Solution</a>
79
+
80
+
81
+
82
+ </li>
83
+ </ul>
84
+
85
+
86
+
87
+ <a class="navbar-brand logo" href="../../"></a>
88
+
89
+
90
+ </div><!-- /.navbar-collapse -->
91
+ </div>
92
+ </nav>
93
+
94
+
95
+
96
+ <div class="back">
97
+ <div class="main">
98
+ <a class="btn back-to-round" href="../../round/sleeping_beauty"><span class="glyphicon glyphicon-menu-left"></span></a>
99
+
100
+ <img id="bg-desat" src="../../static/round/sleeping_beauty/images/bg-desat.jpg"/>
101
+
102
+ </div>
103
+ <div class="puzzle">
104
+ <div class="header">
105
+
106
+ <img class="puzzle-logo" src="../../static/round/sleeping_beauty/images/blocks_and_blocks/header.png">
107
+
108
+ <h2>Blocks and Blocks</h2>
109
+
110
+ </div>
111
+ <div class="content">
112
+ <p class="flavortext">Some royalty love modern art, even sponsoring several artist-in-residence programs.</p>
113
+ <ul>
114
+ <li><em>The Island</em> by Leslie Wilson</li>
115
+ <li><em>Colors</em> by M&uuml;nk Re&scaron;</li>
116
+ <li><em>Are the Officials on Their Way?</em> by Cornelia Vancot</li>
117
+ <li><em>There is a Community in Every Area</em> by Farb</li>
118
+ <li><em>Just Authority</em> by T. Kimura</li>
119
+ <li><em>To Analyze a Plan</em> by Gerald Porter</li>
120
+ <li><em>Look Large</em> by Kho Vanov</li>
121
+ <li><em>Pretty Creative</em> by Rick Schwartz</li>
122
+ </ul>
123
+ <body>
124
+ <a href="images/1.png"><img src="images/1.png" width="500" /></a></br><br />
125
+ <a href="images/2.png"><img src="images/2.png" width="500" /></a></br><br />
126
+ <a href="images/3.png"><img src="images/3.png" width="500" /></a></br><br />
127
+ <a href="images/4.png"><img src="images/4.png" width="500" /></a></br><br />
128
+ <a href="images/5.png"><img src="images/5.png" width="500" /></a></br><br />
129
+ <a href="images/6.png"><img src="images/6.png" width="500" /></a></br><br />
130
+ <a href="images/7.png"><img src="images/7.png" width="500" /></a></br><br />
131
+ <a href="images/8.png"><img src="images/8.png" width="500" /></a></br><br />
132
+
133
+ </div>
134
+ </div>
135
+ </div>
136
+
137
+
138
+
139
+ <script src="../../static/bootstrap/javascript/bootstrap.js"></script>
140
+ <!--<script src="../..//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>-->
141
+ <script>
142
+ $(document).ready(function(){
143
+
144
+ $.getJSON('../../sheep.json')
145
+ .done(function(data) {
146
+ $('span.current-sheep').html(data.sheep);
147
+ $('span.next-update').html(data.update);
148
+ });
149
+
150
+ $("#nextupdate").hover(function(){
151
+ $('#navtooltip').addClass('hover');
152
+ }, function(){
153
+ $('#navtooltip').removeClass('hover');
154
+ });
155
+ });
156
+ </script>
157
+
158
+
159
+
160
+
161
+ </body><script type="module" src="/checkanswer.js"></script>
162
+ </html>