13 #pragma mark Efficient Hexagon Search Code
16 constexpr uint64_t
bits(uint64_t a, uint64_t b, uint64_t c)
19 return ((((uint64_t)1)<<a)|(((uint64_t)1)<<b)|(((uint64_t)1)<<c));
22 constexpr uint64_t
bits(uint64_t a, uint64_t b, uint64_t c, uint64_t
d, uint64_t e, uint64_t f)
28 {5,6,14,15,25,26,37,3,4,12,13,23,24,35,36,46,1,2,10,11,21,22,33,34,44,45,53,0,8,9,19,20,31,32,42,43,51,52,7,17,18,29,30,40,41,49,50,16,27,28,38,39,47,48};
31 {47,48,49,50,51,52,53,38,39,40,41,42,43,44,45,46,27,28,29,30,31,32,33,34,35,36,37,16,17,18,19,20,21,22,23,24,25,26,7,8,9,10,11,12,13,14,15,0,1,2,3,4,5,6};
66 bits(0, 1, 2, 8, 9, 10),
bits(2, 3, 4, 10, 11, 12),
bits(9, 10, 11, 19, 20, 21),
bits(20, 21, 22, 31, 32, 33),
67 bits(7, 8, 9, 17, 18, 19),
bits(11, 12, 13, 21, 22, 23),
bits(13, 14, 15, 23, 24, 25),
bits(4, 5, 6, 12, 13, 14),
68 bits(16, 17, 18, 27, 28, 29),
bits(18, 19, 20, 29, 30, 31),
bits(22, 23, 24, 33, 34, 35),
bits(24, 25, 26, 35, 36, 37),
69 bits(28, 29, 30, 38, 39, 40),
bits(30, 31, 32, 40, 41, 42),
bits(32, 33, 34, 42, 43, 44),
bits(34, 35, 36, 44, 45, 46),
70 bits(39, 40, 41, 47, 48, 49),
bits(41, 42, 43, 49, 50, 51),
bits(43, 44, 45, 51, 52, 53)
82 bits(1, 2, 3, 9, 10, 11),
bits(3, 4, 5, 11, 12, 13),
83 bits(8, 9, 10, 18, 19, 20),
bits(10, 11, 12, 20, 21, 22),
bits(12, 13, 14, 22, 23, 24),
84 bits(17, 18, 19, 28, 29, 30),
bits(19, 20, 21, 30, 31, 32),
bits(21, 22, 23, 32, 33, 34),
bits(23, 24, 25, 34, 35, 36),
85 bits(29, 30, 31, 39, 40, 41),
bits(31, 32, 33, 41, 42, 43),
bits(33, 34, 35, 43, 44, 45),
86 bits(40, 41, 42, 48, 49, 50),
bits(42, 43, 44, 50, 51, 52),
88 bits(6, 14, 15, 12, 13, 23),
bits(15, 25, 26, 23, 24, 35),
89 bits(4, 12, 13, 10, 11, 21),
bits(13, 23, 24, 21, 22, 33),
bits(24, 35, 36, 33, 34, 44),
90 bits(2, 10, 11, 8, 9, 19),
bits(11, 21, 22, 19, 20, 31),
bits(22, 33, 34, 31, 32, 42),
bits(34, 44, 45, 42, 43, 51),
91 bits(9, 19, 20, 17, 18, 29),
bits(20, 31, 32, 29, 30, 40),
bits(32, 42, 43, 40, 41, 49),
92 bits(18, 29, 30, 27, 28, 38),
bits(30, 40, 41, 38, 39, 47),
94 bits(16, 17, 7, 29, 18, 19),
bits(7, 8, 0, 19, 9, 10),
95 bits(28, 29, 18, 40, 30, 31),
bits(18, 19, 9, 31, 20, 21),
bits(9, 10, 2, 21, 11, 12),
96 bits(39, 40, 30, 49, 41, 42),
bits(30, 31, 20, 42, 32, 33),
bits(20, 21, 11, 33, 22, 23),
bits(11, 12, 4, 23, 13, 14),
97 bits(41, 42, 32, 51, 43, 44),
bits(32, 33, 22, 44, 34, 35),
bits(22, 23, 13, 35, 24, 25),
98 bits(43, 44, 34, 53, 45, 46),
bits(34, 35, 24, 46, 36, 37)
103 bits(0, 1, 2, 3, 7, 8),
bits(2, 3, 4, 5, 9, 10),
104 bits(7, 8, 9, 10, 16, 17),
bits(9, 10, 11, 12, 18, 19),
bits(11, 12, 13, 14, 20, 21),
105 bits(18, 19, 20, 21, 28, 29),
bits(20, 21, 22, 23, 30, 31),
bits(22, 23, 24, 25, 32, 33),
106 bits(30, 31, 32, 33, 39, 40),
bits(32, 33, 34, 35, 41, 42),
bits(34, 35, 36, 37, 43, 44),
107 bits(41, 42, 43, 44, 48, 49),
109 bits(1, 2, 3, 4, 12, 13),
bits(3, 4, 5, 6, 14, 15),
110 bits(8, 9, 10, 11, 21, 22),
bits(10, 11, 12, 13, 23, 24),
bits(12, 13, 14, 15, 25, 26),
111 bits(17, 18, 19, 20, 31, 32),
bits(19, 20, 21, 22, 33, 34),
bits(21, 22, 23, 24, 35, 36),
112 bits(27, 28, 29, 30, 40, 41),
bits(29, 30, 31, 32, 42, 43),
bits(31, 32, 33, 34, 44, 45),
113 bits(40, 41, 42, 43, 51, 52),
115 bits(15, 25, 26, 37, 36, 46),
bits(24, 35, 36, 46, 45, 53),
116 bits(6, 14, 15, 25, 24, 35),
bits(13, 23, 24, 35, 34, 44),
bits(22, 33, 34, 44, 43, 51),
117 bits(4, 12, 13, 23, 22, 33),
bits(11, 21, 22, 33, 32, 42),
bits(20, 31, 32, 42, 41, 49),
118 bits(2, 10, 11, 21, 20, 31),
bits(9, 19, 20, 31, 30, 40),
bits(18, 29, 30, 40, 39, 47),
119 bits(0, 8, 9, 19, 18, 29),
121 bits(48, 49, 50, 51, 43, 44),
bits(50, 51, 52, 53, 45, 46),
122 bits(43, 44, 45, 46, 36, 37),
bits(41, 42, 43, 44, 34, 35),
bits(39, 40, 41, 42, 32, 33),
123 bits(32, 33, 34, 35, 24, 25),
bits(30, 31, 32, 33, 22, 23),
bits(28, 29, 30, 31, 20, 21),
124 bits(20, 21, 22, 23, 13, 14),
bits(18, 19, 20, 21, 11, 12),
bits(16, 17, 18, 19, 9, 10),
125 bits(9, 10, 11, 12, 4, 5),
127 bits(47, 48, 49, 50, 38, 39),
bits(49, 50, 51, 52, 40, 41),
128 bits(38, 39, 40, 41, 27, 28),
bits(40, 41, 42, 43, 29, 30),
bits(42, 43, 44, 45, 31, 32),
129 bits(29, 30, 31, 32, 17, 18),
bits(31, 32, 33, 34, 19, 20),
bits(33, 34, 35, 36, 21, 22),
130 bits(19, 20, 21, 22, 8, 9),
bits(21, 22, 23, 24, 10, 11),
bits(23, 24, 25, 26, 12, 13),
131 bits(10, 11, 12, 13, 1, 2),
133 bits(7, 17, 16, 27, 28, 38),
bits(0, 8, 7, 17, 18, 29),
134 bits(18, 29, 28, 38, 39, 47),
bits(9, 19, 18, 29, 30, 40),
bits(2, 10, 9, 19, 20, 31),
135 bits(20, 31, 30, 40, 41, 49),
bits(11, 21, 20, 31, 32, 42),
bits(4, 12, 11, 21, 22, 33),
136 bits(22, 33, 32, 42, 43, 51),
bits(13, 23, 22, 33, 34, 44),
bits(6, 14, 13, 23, 24, 35),
137 bits(24, 35, 34, 44, 45, 53)
142 bits(0, 1, 2, 3, 4, 5),
143 bits(7, 8, 9, 10, 11, 12),
bits(9, 10, 11, 12, 13, 14),
144 bits(16, 17, 18, 19, 20, 21),
bits(18, 19, 20, 21, 22, 23),
bits(20, 21, 22, 23, 24, 25),
145 bits(28, 29, 30, 31, 32, 33),
bits(30, 31, 32, 33, 34, 35),
bits(32, 33, 34, 35, 36, 37),
146 bits(39, 40, 41, 42, 43, 44),
bits(41, 42, 43, 44, 45, 46),
147 bits(48, 49, 50, 51, 52, 53),
149 bits(5, 6, 14, 15, 25, 26),
150 bits(3, 4, 12, 13, 23, 24),
bits(12, 13, 23, 24, 35, 36),
151 bits(1, 2, 10, 11, 21, 22),
bits(10, 11, 21, 22, 33, 34),
bits(21, 22, 33, 34, 44, 45),
152 bits(8, 9, 19, 20, 31, 32),
bits(19, 20, 31, 32, 42, 43),
bits(31, 32, 42, 43, 51, 52),
153 bits(17, 18, 29, 30, 40, 41),
bits(29, 30, 40, 41, 49, 50),
154 bits(27, 28, 38, 39, 47, 48),
156 bits(27, 16, 17, 7, 8, 0),
157 bits(38, 28, 29, 18, 19, 9),
bits(29, 18, 19, 9, 10, 2),
158 bits(47, 39, 40, 30, 31, 20),
bits(40, 30, 31, 20, 21, 11),
bits(31, 20, 21, 11, 12, 4),
159 bits(49, 41, 42, 32, 33, 22),
bits(42, 32, 33, 22, 23, 13),
bits(33, 22, 23, 13, 14, 6),
160 bits(51, 43, 44, 34, 35, 24),
bits(44, 34, 35, 24, 25, 15),
161 bits(53, 45, 46, 36, 37, 26),
163 bits(1, 2, 3, 4, 5, 6),
164 bits(8, 9, 10, 11, 12, 13),
bits(10, 11, 12, 13, 14, 15),
165 bits(17, 18, 19, 20, 21, 22),
bits(19, 20, 21, 22, 23, 24),
bits(21, 22, 23, 24, 25, 26),
166 bits(27, 28, 29, 30, 31, 32),
bits(29, 30, 31, 32, 33, 34),
bits(31, 32, 33, 34, 35, 36),
167 bits(38, 39, 40, 41, 42, 43),
bits(40, 41, 42, 43, 44, 45),
168 bits(47, 48, 49, 50, 51, 52),
170 bits(6, 14, 15, 25, 26, 37),
171 bits(4, 12, 13, 23, 24, 35),
bits(13, 23, 24, 35, 36, 46),
172 bits(2, 10, 11, 21, 22, 33),
bits(11, 21, 22, 33, 34, 44),
bits(22, 33, 34, 44, 45, 53),
173 bits(0, 8, 9, 19, 20, 31),
bits(9, 19, 20, 31, 32, 42),
bits(20, 31, 32, 42, 43, 51),
174 bits(7, 17, 18, 29, 30, 40),
bits(18, 29, 30, 40, 41, 49),
175 bits(16, 27, 28, 38, 39, 47),
177 bits(16, 17, 7, 8, 0, 1),
178 bits(28, 29, 18, 19, 9, 10),
bits(18, 19, 9, 10, 2, 3),
179 bits(39, 40, 30, 31, 20, 21),
bits(30, 31, 20, 21, 11, 12),
bits(20, 21, 11, 12, 4, 5),
180 bits(48, 49, 41, 42, 32, 33),
bits(41, 42, 32, 33, 22, 23),
bits(32, 33, 22, 23, 13, 14),
181 bits(50, 51, 43, 44, 34, 35),
bits(43, 44, 34, 35, 24, 25),
182 bits(52, 53, 45, 46, 36, 37), },
186 bits(0, 1, 2, 7, 8, 9),
bits(2, 3, 4, 9, 10, 11),
bits(4, 5, 6, 11, 12, 13),
187 bits(7, 8, 9, 16, 17, 18),
bits(9, 10, 11, 18, 19, 20),
bits(11, 12, 13, 20, 21, 22),
bits(13, 14, 15, 22, 23, 24),
188 bits(18, 19, 20, 28, 29, 30),
bits(20, 21, 22, 30, 31, 32),
bits(22, 23, 24, 32, 33, 34),
189 bits(30, 31, 32, 39, 40, 41),
bits(32, 33, 34, 41, 42, 43),
190 bits(41, 42, 43, 48, 49, 50),
192 bits(3, 4, 5, 10, 11, 12),
193 bits(10, 11, 12, 19, 20, 21),
bits(12, 13, 14, 21, 22, 23),
194 bits(19, 20, 21, 29, 30, 31),
bits(21, 22, 23, 31, 32, 33),
bits(23, 24, 25, 33, 34, 35),
195 bits(29, 30, 31, 38, 39, 40),
bits(31, 32, 33, 40, 41, 42),
bits(33, 34, 35, 42, 43, 44),
bits(35, 36, 37, 44, 45, 46),
196 bits(40, 41, 42, 47, 48, 49),
bits(42, 43, 44, 49, 50, 51),
bits(44, 45, 46, 51, 52, 53),
199 bits(5, 6, 14, 3, 4, 12),
bits(14, 15, 25, 12, 13, 23),
bits(25, 26, 37, 23, 24, 35),
200 bits(3, 4, 12, 1, 2, 10),
bits(12, 13, 23, 10, 11, 21),
bits(23, 24, 35, 21, 22, 33),
bits(35, 36, 46, 33, 34, 44),
201 bits(10, 11, 21, 8, 9, 19),
bits(21, 22, 33, 19, 20, 31),
bits(33, 34, 44, 31, 32, 42),
202 bits(19, 20, 31, 17, 18, 29),
bits(31, 32, 42, 29, 30, 40),
203 bits(29, 30, 40, 27, 28, 38),
205 bits(15, 25, 26, 13, 23, 24),
206 bits(13, 23, 24, 11, 21, 22),
bits(24, 35, 36, 22, 33, 34),
207 bits(11, 21, 22, 9, 19, 20),
bits(22, 33, 34, 20, 31, 32),
bits(34, 44, 45, 32, 42, 43),
208 bits(9, 19, 20, 7, 17, 18),
bits(20, 31, 32, 18, 29, 30),
bits(32, 42, 43, 30, 40, 41),
bits(43, 51, 52, 41, 49, 50),
209 bits(18, 29, 30, 16, 27, 28),
bits(30, 40, 41, 28, 38, 39),
bits(41, 49, 50, 39, 47, 48),
212 bits(27, 16, 17, 38, 28, 29),
bits(17, 7, 8, 29, 18, 19),
bits(8, 0, 1, 19, 9, 10),
213 bits(38, 28, 29, 47, 39, 40),
bits(29, 18, 19, 40, 30, 31),
bits(19, 9, 10, 31, 20, 21),
bits(10, 2, 3, 21, 11, 12),
214 bits(40, 30, 31, 49, 41, 42),
bits(31, 20, 21, 42, 32, 33),
bits(21, 11, 12, 33, 22, 23),
215 bits(42, 32, 33, 51, 43, 44),
bits(33, 22, 23, 44, 34, 35),
216 bits(44, 34, 35, 53, 45, 46),
218 bits(7, 8, 0, 18, 19, 9),
219 bits(18, 19, 9, 30, 31, 20),
bits(9, 10, 2, 20, 21, 11),
220 bits(30, 31, 20, 41, 42, 32),
bits(20, 21, 11, 32, 33, 22),
bits(11, 12, 4, 22, 23, 13),
221 bits(41, 42, 32, 50, 51, 43),
bits(32, 33, 22, 43, 44, 34),
bits(22, 23, 13, 34, 35, 24),
bits(13, 14, 6, 24, 25, 15),
222 bits(43, 44, 34, 52, 53, 45),
bits(34, 35, 24, 45, 46, 36),
bits(24, 25, 15, 36, 37, 26),
225 bits(1, 2, 3, 10, 11, 12),
226 bits(8, 9, 10, 19, 20, 21),
bits(10, 11, 12, 21, 22, 23),
227 bits(17, 18, 19, 29, 30, 31),
bits(19, 20, 21, 31, 32, 33),
bits(21, 22, 23, 33, 34, 35),
228 bits(27, 28, 29, 38, 39, 40),
bits(29, 30, 31, 40, 41, 42),
bits(31, 32, 33, 42, 43, 44),
bits(33, 34, 35, 44, 45, 46),
229 bits(38, 39, 40, 47, 48, 49),
bits(40, 41, 42, 49, 50, 51),
bits(42, 43, 44, 51, 52, 53),
231 bits(0, 1, 2, 9, 10, 11),
bits(2, 3, 4, 11, 12, 13),
bits(4, 5, 6, 13, 14, 15),
232 bits(7, 8, 9, 18, 19, 20),
bits(9, 10, 11, 20, 21, 22),
bits(11, 12, 13, 22, 23, 24),
bits(13, 14, 15, 24, 25, 26),
233 bits(18, 19, 20, 30, 31, 32),
bits(20, 21, 22, 32, 33, 34),
bits(22, 23, 24, 34, 35, 36),
234 bits(30, 31, 32, 41, 42, 43),
bits(32, 33, 34, 43, 44, 45),
235 bits(41, 42, 43, 50, 51, 52),
238 bits(6, 14, 15, 13, 23, 24),
239 bits(4, 12, 13, 11, 21, 22),
bits(13, 23, 24, 22, 33, 34),
240 bits(2, 10, 11, 9, 19, 20),
bits(11, 21, 22, 20, 31, 32),
bits(22, 33, 34, 32, 42, 43),
241 bits(0, 8, 9, 7, 17, 18),
bits(9, 19, 20, 18, 29, 30),
bits(20, 31, 32, 30, 40, 41),
bits(32, 42, 43, 41, 49, 50),
242 bits(7, 17, 18, 16, 27, 28),
bits(18, 29, 30, 28, 38, 39),
bits(30, 40, 41, 39, 47, 48),
244 bits(5, 6, 14, 12, 13, 23),
bits(14, 15, 25, 23, 24, 35),
bits(25, 26, 37, 35, 36, 46),
245 bits(3, 4, 12, 10, 11, 21),
bits(12, 13, 23, 21, 22, 33),
bits(23, 24, 35, 33, 34, 44),
bits(35, 36, 46, 44, 45, 53),
246 bits(10, 11, 21, 19, 20, 31),
bits(21, 22, 33, 31, 32, 42),
bits(33, 34, 44, 42, 43, 51),
247 bits(19, 20, 31, 29, 30, 40),
bits(31, 32, 42, 40, 41, 49),
248 bits(29, 30, 40, 38, 39, 47),
251 bits(16, 17, 7, 18, 19, 9),
252 bits(28, 29, 18, 30, 31, 20),
bits(18, 19, 9, 20, 21, 11),
253 bits(39, 40, 30, 41, 42, 32),
bits(30, 31, 20, 32, 33, 22),
bits(20, 21, 11, 22, 23, 13),
254 bits(48, 49, 41, 50, 51, 43),
bits(41, 42, 32, 43, 44, 34),
bits(32, 33, 22, 34, 35, 24),
bits(22, 23, 13, 24, 25, 15),
255 bits(50, 51, 43, 52, 53, 45),
bits(43, 44, 34, 45, 46, 36),
bits(34, 35, 24, 36, 37, 26),
257 bits(27, 16, 17, 29, 18, 19),
bits(17, 7, 8, 19, 9, 10),
bits(8, 0, 1, 10, 2, 3),
258 bits(38, 28, 29, 40, 30, 31),
bits(29, 18, 19, 31, 20, 21),
bits(19, 9, 10, 21, 11, 12),
bits(10, 2, 3, 12, 4, 5),
259 bits(40, 30, 31, 42, 32, 33),
bits(31, 20, 21, 33, 22, 23),
bits(21, 11, 12, 23, 13, 14),
260 bits(42, 32, 33, 44, 34, 35),
bits(33, 22, 23, 35, 24, 25),
261 bits(44, 34, 35, 46, 36, 37),
267 bits(0, 1, 2, 3, 4, 8),
bits(2, 3, 4, 5, 6, 10),
268 bits(7, 8, 9, 10, 11, 17),
bits(9, 10, 11, 12, 13, 19),
bits(11, 12, 13, 14, 15, 21),
269 bits(16, 17, 18, 19, 20, 27),
bits(18, 19, 20, 21, 22, 29),
bits(20, 21, 22, 23, 24, 31),
bits(22, 23, 24, 25, 26, 33),
270 bits(28, 29, 30, 31, 32, 38),
bits(30, 31, 32, 33, 34, 40),
bits(32, 33, 34, 35, 36, 42),
271 bits(39, 40, 41, 42, 43, 47),
273 bits(4, 5, 6, 14, 15, 25),
bits(13, 14, 15, 25, 26, 37),
274 bits(2, 3, 4, 12, 13, 23),
bits(11, 12, 13, 23, 24, 35),
bits(22, 23, 24, 35, 36, 46),
275 bits(0, 1, 2, 10, 11, 21),
bits(9, 10, 11, 21, 22, 33),
bits(20, 21, 22, 33, 34, 44),
bits(32, 33, 34, 44, 45, 53),
276 bits(7, 8, 9, 19, 20, 31),
bits(18, 19, 20, 31, 32, 42),
bits(30, 31, 32, 42, 43, 51),
277 bits(16, 17, 18, 29, 30, 40),
279 bits(25, 26, 36, 37, 45, 46),
bits(35, 36, 45, 46, 52, 53),
280 bits(14, 15, 24, 25, 34, 35),
bits(23, 24, 34, 35, 43, 44),
bits(33, 34, 43, 44, 50, 51),
281 bits(5, 6, 13, 14, 22, 23),
bits(12, 13, 22, 23, 32, 33),
bits(21, 22, 32, 33, 41, 42),
bits(31, 32, 41, 42, 48, 49),
282 bits(3, 4, 11, 12, 20, 21),
bits(10, 11, 20, 21, 30, 31),
bits(19, 20, 30, 31, 39, 40),
283 bits(1, 2, 9, 10, 18, 19),
285 bits(47, 48, 49, 50, 51, 43),
bits(49, 50, 51, 52, 53, 45),
286 bits(38, 39, 40, 41, 42, 32),
bits(40, 41, 42, 43, 44, 34),
bits(42, 43, 44, 45, 46, 36),
287 bits(27, 28, 29, 30, 31, 20),
bits(29, 30, 31, 32, 33, 22),
bits(31, 32, 33, 34, 35, 24),
bits(33, 34, 35, 36, 37, 26),
288 bits(17, 18, 19, 20, 21, 11),
bits(19, 20, 21, 22, 23, 13),
bits(21, 22, 23, 24, 25, 15),
289 bits(10, 11, 12, 13, 14, 6),
291 bits(28, 38, 39, 47, 48, 49),
bits(16, 27, 28, 38, 39, 40),
292 bits(30, 40, 41, 49, 50, 51),
bits(18, 29, 30, 40, 41, 42),
bits(7, 17, 18, 29, 30, 31),
293 bits(32, 42, 43, 51, 52, 53),
bits(20, 31, 32, 42, 43, 44),
bits(9, 19, 20, 31, 32, 33),
bits(0, 8, 9, 19, 20, 21),
294 bits(22, 33, 34, 44, 45, 46),
bits(11, 21, 22, 33, 34, 35),
bits(2, 10, 11, 21, 22, 23),
295 bits(13, 23, 24, 35, 36, 37),
297 bits(0, 1, 7, 8, 17, 18),
bits(7, 8, 16, 17, 27, 28),
298 bits(2, 3, 9, 10, 19, 20),
bits(9, 10, 18, 19, 29, 30),
bits(18, 19, 28, 29, 38, 39),
299 bits(4, 5, 11, 12, 21, 22),
bits(11, 12, 20, 21, 31, 32),
bits(20, 21, 30, 31, 40, 41),
bits(30, 31, 39, 40, 47, 48),
300 bits(13, 14, 22, 23, 33, 34),
bits(22, 23, 32, 33, 42, 43),
bits(32, 33, 41, 42, 49, 50),
301 bits(34, 35, 43, 44, 51, 52),
303 bits(0, 1, 2, 3, 4, 12),
bits(2, 3, 4, 5, 6, 14),
304 bits(7, 8, 9, 10, 11, 21),
bits(9, 10, 11, 12, 13, 23),
bits(11, 12, 13, 14, 15, 25),
305 bits(16, 17, 18, 19, 20, 31),
bits(18, 19, 20, 21, 22, 33),
bits(20, 21, 22, 23, 24, 35),
bits(22, 23, 24, 25, 26, 37),
306 bits(28, 29, 30, 31, 32, 42),
bits(30, 31, 32, 33, 34, 44),
bits(32, 33, 34, 35, 36, 46),
307 bits(41, 42, 43, 44, 45, 53),
309 bits(24, 5, 6, 14, 15, 25),
bits(36, 14, 15, 25, 26, 37),
310 bits(22, 3, 4, 12, 13, 23),
bits(34, 12, 13, 23, 24, 35),
bits(45, 23, 24, 35, 36, 46),
311 bits(20, 1, 2, 10, 11, 21),
bits(32, 10, 11, 21, 22, 33),
bits(43, 21, 22, 33, 34, 44),
bits(52, 33, 34, 44, 45, 53),
312 bits(30, 8, 9, 19, 20, 31),
bits(41, 19, 20, 31, 32, 42),
bits(50, 31, 32, 42, 43, 51),
313 bits(48, 29, 30, 40, 41, 49),
315 bits(44, 26, 36, 37, 45, 46),
bits(51, 36, 45, 46, 52, 53),
316 bits(33, 15, 24, 25, 34, 35),
bits(42, 24, 34, 35, 43, 44),
bits(49, 34, 43, 44, 50, 51),
317 bits(21, 6, 13, 14, 22, 23),
bits(31, 13, 22, 23, 32, 33),
bits(40, 22, 32, 33, 41, 42),
bits(47, 32, 41, 42, 48, 49),
318 bits(19, 4, 11, 12, 20, 21),
bits(29, 11, 20, 21, 30, 31),
bits(38, 20, 30, 31, 39, 40),
319 bits(27, 9, 19, 18, 28, 29),
321 bits(47, 48, 49, 50, 51, 39),
bits(49, 50, 51, 52, 53, 41),
322 bits(38, 39, 40, 41, 42, 28),
bits(40, 41, 42, 43, 44, 30),
bits(42, 43, 44, 45, 46, 32),
323 bits(27, 28, 29, 30, 31, 16),
bits(29, 30, 31, 32, 33, 18),
bits(31, 32, 33, 34, 35, 20),
bits(33, 34, 35, 36, 37, 22),
324 bits(17, 18, 19, 20, 21, 7),
bits(19, 20, 21, 22, 23, 9),
bits(21, 22, 23, 24, 25, 11),
325 bits(8, 9, 10, 11, 12, 0),
327 bits(28, 38, 39, 47, 48, 29),
bits(16, 27, 28, 38, 39, 17),
328 bits(30, 40, 41, 49, 50, 31),
bits(18, 29, 30, 40, 41, 19),
bits(7, 17, 18, 29, 30, 8),
329 bits(32, 42, 43, 51, 52, 33),
bits(20, 31, 32, 42, 43, 21),
bits(9, 19, 20, 31, 32, 10),
bits(0, 8, 9, 19, 20, 1),
330 bits(22, 33, 34, 44, 45, 23),
bits(11, 21, 22, 33, 34, 12),
bits(2, 10, 11, 21, 22, 3),
331 bits(4, 12, 13, 23, 24, 5),
333 bits(0, 1, 7, 8, 17, 2),
bits(7, 8, 16, 17, 27, 9),
334 bits(2, 3, 9, 10, 19, 4),
bits(9, 10, 18, 19, 29, 11),
bits(18, 19, 28, 29, 38, 20),
335 bits(4, 5, 11, 12, 21, 6),
bits(11, 12, 20, 21, 31, 13),
bits(20, 21, 30, 31, 40, 22),
bits(30, 31, 39, 40, 47, 32),
336 bits(13, 14, 22, 23, 33, 15),
bits(22, 23, 32, 33, 42, 24),
bits(32, 33, 41, 42, 49, 34),
337 bits(24, 25, 34, 35, 44, 26),
342 bits(1, 2, 3, 4, 5, 10),
343 bits(8, 9, 10, 11, 12, 19),
bits(10, 11, 12, 13, 14, 21),
344 bits(17, 18, 19, 20, 21, 29),
bits(19, 20, 21, 22, 23, 31),
bits(21, 22, 23, 24, 25, 33),
345 bits(27, 28, 29, 30, 31, 38),
bits(29, 30, 31, 32, 33, 40),
bits(31, 32, 33, 34, 35, 42),
bits(33, 34, 35, 36, 37, 44),
346 bits(38, 39, 40, 41, 42, 47),
bits(40, 41, 42, 43, 44, 49),
348 bits(6, 13, 14, 15, 25, 26),
349 bits(4, 11, 12, 13, 23, 24),
bits(13, 22, 23, 24, 35, 36),
350 bits(2, 9, 10, 11, 21, 22),
bits(11, 20, 21, 22, 33, 34),
bits(22, 32, 33, 34, 44, 45),
351 bits(0, 7, 8, 9, 19, 20),
bits(9, 18, 19, 20, 31, 32),
bits(20, 30, 31, 32, 42, 43),
bits(32, 41, 42, 43, 51, 52),
352 bits(7, 16, 17, 18, 29, 30),
bits(18, 28, 29, 30, 40, 41),
354 bits(35, 36, 37, 45, 46, 53),
355 bits(23, 24, 25, 34, 35, 44),
bits(33, 34, 35, 43, 44, 51),
356 bits(12, 13, 14, 22, 23, 33),
bits(21, 22, 23, 32, 33, 42),
bits(31, 32, 33, 41, 42, 49),
357 bits(3, 4, 5, 11, 12, 21),
bits(10, 11, 12, 20, 21, 31),
bits(19, 20, 21, 30, 31, 40),
bits(29, 30, 31, 39, 40, 47),
358 bits(1, 2, 3, 9, 10, 19),
bits(8, 9, 10, 18, 19, 29),
360 bits(48, 49, 50, 51, 52, 43),
361 bits(41, 42, 43, 44, 45, 34),
bits(39, 40, 41, 42, 43, 32),
362 bits(32, 33, 34, 35, 36, 24),
bits(30, 31, 32, 33, 34, 22),
bits(28, 29, 30, 31, 32, 20),
363 bits(22, 23, 24, 25, 26, 15),
bits(20, 21, 22, 23, 24, 13),
bits(18, 19, 20, 21, 22, 11),
bits(16, 17, 18, 19, 20, 9),
364 bits(6, 11, 12, 13, 14, 15),
bits(9, 10, 11, 12, 13, 4),
366 bits(27, 28, 38, 39, 40, 47),
367 bits(29, 30, 40, 41, 42, 49),
bits(17, 18, 29, 30, 31, 40),
368 bits(31, 32, 42, 43, 44, 51),
bits(19, 20, 31, 32, 33, 42),
bits(8, 9, 19, 20, 21, 31),
369 bits(33, 34, 44, 45, 46, 53),
bits(21, 22, 33, 34, 35, 44),
bits(10, 11, 21, 22, 23, 33),
bits(1, 2, 10, 11, 12, 21),
370 bits(23, 24, 35, 36, 37, 46),
bits(12, 13, 23, 24, 25, 35),
372 bits(0, 7, 8, 16, 17, 18),
373 bits(9, 18, 19, 28, 29, 30),
bits(2, 9, 10, 18, 19, 20),
374 bits(20, 30, 31, 39, 40, 41),
bits(11, 20, 21, 30, 31, 32),
bits(4, 11, 12, 20, 21, 22),
375 bits(32, 41, 42, 48, 49, 50),
bits(22, 32, 33, 41, 42, 43),
bits(13, 22, 23, 32, 33, 34),
bits(6, 13, 14, 22, 23, 24),
376 bits(34, 43, 44, 50, 51, 52),
bits(24, 34, 35, 43, 44, 45),
378 bits(0, 7, 8, 9, 10, 11),
bits(2, 9, 10, 11, 12, 13),
379 bits(7, 16, 17, 18, 19, 20),
bits(9, 18, 19, 20, 21, 22),
bits(11, 20, 21, 22, 23, 24),
bits(13, 22, 23, 24, 25, 26),
380 bits(18, 28, 29, 30, 31, 32),
bits(20, 30, 31, 32, 33, 34),
bits(22, 32, 33, 34, 35, 36),
381 bits(30, 39, 40, 41, 42, 43),
bits(32, 41, 42, 43, 44, 45),
382 bits(41, 48, 49, 50, 51, 52),
384 bits(3, 4, 5, 12, 13, 23),
bits(12, 13, 14, 23, 24, 35),
385 bits(1, 2, 3, 10, 11, 21),
bits(10, 11, 12, 21, 22, 33),
bits(21, 22, 23, 33, 34, 44),
bits(33, 34, 35, 44, 45, 53),
386 bits(8, 9, 10, 19, 20, 31),
bits(19, 20, 21, 31, 32, 42),
bits(31, 32, 33, 42, 43, 51),
387 bits(17, 18, 19, 29, 30, 40),
bits(29, 30, 31, 40, 41, 49),
388 bits(27, 28, 29, 38, 39, 47),
390 bits(15, 24, 25, 26, 34, 35),
bits(24, 34, 35, 36, 43, 44),
391 bits(6, 13, 14, 15, 22, 23),
bits(13, 22, 23, 24, 32, 33),
bits(22, 32, 33, 34, 41, 42),
bits(32, 41, 42, 43, 48, 49),
392 bits(4, 11, 12, 13, 20, 21),
bits(11, 20, 21, 22, 30, 31),
bits(20, 30, 31, 32, 39, 40),
393 bits(2, 9, 10, 11, 18, 19),
bits(9, 18, 19, 20, 28, 29),
394 bits(0, 7, 8, 9, 16, 17),
396 bits(42, 43, 44, 45, 46, 53),
bits(40, 41, 42, 43, 44, 51),
397 bits(33, 34, 35, 36, 37, 46),
bits(31, 32, 33, 34, 35, 44),
bits(29, 30, 31, 32, 33, 42),
bits(27, 28, 29, 30, 31, 40),
398 bits(21, 22, 23, 24, 25, 35),
bits(19, 20, 21, 22, 23, 33),
bits(17, 18, 19, 20, 21, 31),
399 bits(10, 11, 12, 13, 14, 23),
bits(8, 9, 10, 11, 12, 21),
400 bits(1, 2, 3, 4, 5, 12),
402 bits(30, 40, 41, 48, 49, 50),
bits(18, 29, 30, 39, 40, 41),
403 bits(32, 42, 43, 50, 51, 52),
bits(20, 31, 32, 41, 42, 43),
bits(9, 19, 20, 30, 31, 32),
bits(0, 8, 9, 18, 19, 20),
404 bits(22, 33, 34, 43, 44, 45),
bits(11, 21, 22, 32, 33, 34),
bits(2, 10, 11, 20, 21, 22),
405 bits(13, 23, 24, 34, 35, 36),
bits(4, 12, 13, 22, 23, 24),
406 bits(6, 14, 15, 24, 25, 26),
408 bits(18, 19, 27, 28, 29, 38),
bits(9, 10, 17, 18, 19, 29),
409 bits(30, 31, 38, 39, 40, 47),
bits(20, 21, 29, 30, 31, 40),
bits(11, 12, 19, 20, 21, 31),
bits(4, 5, 10, 11, 12, 21),
410 bits(32, 33, 40, 41, 42, 49),
bits(22, 23, 31, 32, 33, 42),
bits(13, 14, 21, 22, 23, 33),
411 bits(34, 35, 42, 43, 44, 51),
bits(24, 25, 33, 34, 35, 44),
412 bits(36, 37, 44, 45, 46, 53),
418 bits(0, 1, 8, 9, 10, 11),
bits(2, 3, 10, 11, 12, 13),
419 bits(7, 8, 17, 18, 19, 20),
bits(9, 10, 19, 20, 21, 22),
bits(11, 12, 21, 22, 23, 24),
420 bits(16, 17, 27, 28, 29, 30),
bits(18, 19, 29, 30, 31, 32),
bits(20, 21, 31, 32, 33, 34),
bits(22, 23, 33, 34, 35, 36),
421 bits(28, 29, 38, 39, 40, 41),
bits(30, 31, 40, 41, 42, 43),
bits(32, 33, 42, 43, 44, 45),
422 bits(39, 40, 47, 48, 49, 50),
bits(41, 42, 49, 50, 51, 52),
424 bits(4, 5, 6, 12, 13, 23),
bits(13, 14, 15, 23, 24, 35),
425 bits(2, 3, 4, 10, 11, 21),
bits(11, 12, 13, 21, 22, 33),
bits(22, 23, 24, 33, 34, 44),
426 bits(0, 1, 2, 8, 9, 19),
bits(9, 10, 11, 19, 20, 31),
bits(20, 21, 22, 31, 32, 42),
bits(32, 33, 34, 42, 43, 51),
427 bits(7, 8, 9, 17, 18, 29),
bits(18, 19, 20, 29, 30, 40),
bits(30, 31, 32, 40, 41, 49),
428 bits(16, 17, 18, 27, 28, 38),
bits(28, 29, 30, 38, 39, 47),
430 bits(24, 25, 26, 34, 35, 37),
bits(13, 14, 15, 22, 23, 25),
bits(4, 5, 6, 11, 12, 14),
431 bits(34, 35, 36, 43, 44, 46),
bits(22, 23, 24, 32, 33, 35),
bits(11, 12, 13, 20, 21, 23),
bits(2, 3, 4, 9, 10, 12),
432 bits(32, 33, 34, 41, 42, 44),
bits(20, 21, 22, 30, 31, 33),
bits(9, 10, 11, 18, 19, 21),
bits(0, 1, 2, 7, 8, 10),
433 bits(30, 31, 32, 39, 40, 42),
bits(18, 19, 20, 28, 29, 31),
bits(7, 8, 9, 16, 17, 19),
435 bits(42, 43, 44, 45, 52, 53),
bits(40, 41, 42, 43, 50, 51),
436 bits(33, 34, 35, 36, 45, 46),
bits(31, 32, 33, 34, 43, 44),
bits(29, 30, 31, 32, 41, 42),
437 bits(23, 24, 25, 26, 36, 37),
bits(21, 22, 23, 24, 34, 35),
bits(19, 20, 21, 22, 32, 33),
bits(17, 18, 19, 20, 30, 31),
438 bits(12, 13, 14, 15, 24, 25),
bits(10, 11, 12, 13, 22, 23),
bits(8, 9, 10, 11, 20, 21),
439 bits(3, 4, 5, 6, 13, 14),
bits(1, 2, 3, 4,11, 12),
441 bits(30, 40, 41, 47, 48, 49),
bits(32, 42, 43, 49, 50, 51),
bits(34, 44, 45, 51, 52, 53),
442 bits(18, 29, 30, 38, 39, 40),
bits(20, 31, 32, 40, 41, 42),
bits(22, 33, 34, 42, 43, 44),
bits(24, 35, 36, 44, 45, 46),
443 bits(9, 19, 20, 29, 30, 31),
bits(11, 21, 22, 31, 32, 33),
bits(13, 23, 24, 33, 34, 35),
bits(15, 25, 26, 35, 36, 37),
444 bits(2, 10, 11, 19, 20, 21),
bits(4, 12, 13, 21, 22, 23),
bits(6, 14, 15, 23, 24, 25),
446 bits(16, 18, 19, 27, 28, 29),
bits(7, 9, 10, 17, 18, 19),
447 bits(28, 30, 31, 38, 39, 40),
bits(18, 20, 21, 29, 30, 31),
bits(9, 11, 12, 19, 20, 21),
448 bits(39, 41, 42, 47, 48, 49),
bits(30, 32, 33, 40, 41, 42),
bits(20, 22, 23, 31, 32, 33),
bits(11, 13, 14, 21, 22, 23),
449 bits(41, 43, 44, 49, 50, 51),
bits(32, 34, 35, 42, 43, 44),
bits(22, 24, 25, 33, 34, 35),
450 bits(43, 45, 46, 51, 52, 53),
bits(34, 36, 37, 44, 45, 46),
452 bits(0, 1, 2, 3, 8, 9),
bits(2, 3, 4, 5, 10, 11),
453 bits(7, 8, 9, 10, 17, 18),
bits(9, 10, 11, 12, 19, 20),
bits(11, 12, 13, 14, 21, 22),
454 bits(16, 17, 18, 19, 27, 28),
bits(18, 19, 20, 21, 29, 30),
bits(20, 21, 22, 23, 31, 32),
bits(22, 23, 24, 25, 33, 34),
455 bits(28, 29, 30, 31, 38, 39),
bits(30, 31, 32, 33, 40, 41),
bits(32, 33, 34, 35, 42, 43),
456 bits(39, 40, 41, 42, 47, 48),
bits(41, 42, 43, 44, 49, 50),
458 bits(4, 5, 6, 12, 14, 15),
bits(13, 14, 15, 23, 25, 26),
459 bits(2, 3, 4, 10, 12, 13),
bits(11, 12, 13, 21, 23, 24),
bits(22, 23, 24, 33, 35, 36),
460 bits(0, 1, 2, 8, 10, 11),
bits(9, 10, 11, 19, 21, 22),
bits(20, 21, 22, 31, 33, 34),
bits(32, 33, 34, 42, 44, 45),
461 bits(7, 8, 9, 17, 19, 20),
bits(18, 19, 20, 29, 31, 32),
bits(30, 31, 32, 40, 42, 43),
462 bits(16, 17, 18, 27, 29, 30),
bits(28, 29, 30, 38, 40, 41),
464 bits(24, 25, 26, 36, 37, 46),
bits(13, 14, 15, 24, 25, 35),
bits(4, 5, 6, 13, 14, 23),
465 bits(34, 35, 36, 45, 46, 53),
bits(22, 23, 24, 34, 35, 44),
bits(11, 12, 13, 22, 23, 33),
bits(2, 3, 4, 11, 12, 21),
466 bits(32, 33, 34, 43, 44, 51),
bits(20, 21, 22, 32, 33, 42),
bits(9, 10, 11, 20, 21, 31),
bits(0, 1, 2, 9, 10, 19),
467 bits(30, 31, 32, 41, 42, 49),
bits(18, 19, 20, 30, 31, 40),
bits(7, 8, 9, 18, 19, 29),
469 bits(44, 45, 50, 51, 52, 53),
bits(42, 43, 48, 49, 50, 51),
470 bits(35, 36, 43, 44, 45, 46),
bits(33, 34, 41, 42, 43, 44),
bits(31, 32, 39, 40, 41, 42),
471 bits(25, 26, 34, 35, 36, 37),
bits(23, 24, 32, 33, 34, 35),
bits(21, 22, 30, 31, 32, 33),
bits(19, 20, 28, 29, 30, 31),
472 bits(14, 15, 22, 23, 24, 25),
bits(12, 13, 20, 21, 22, 23),
bits(10, 11, 18, 19, 20, 21),
473 bits(5, 6, 11, 12, 13, 14),
bits(3, 4, 9, 10, 11, 12),
475 bits(38, 39, 41, 47, 48, 49),
bits(40, 41, 43, 49, 50, 51),
bits(42, 43, 45, 51, 52, 53),
476 bits(27, 28, 30, 38, 39, 40),
bits(29, 30, 32, 40, 41, 42),
bits(31, 32, 34, 42, 43, 44),
bits(33, 34, 36, 44, 45, 46),
477 bits(17, 18, 20, 29, 30, 31),
bits(19, 20, 22, 31, 32, 33),
bits(21, 22, 24, 33, 34, 35),
bits(23, 24, 26, 35, 36, 37),
478 bits(8, 9, 11, 19, 20, 21),
bits(10, 11, 13, 21, 22, 23),
bits(12, 13, 15, 23, 24, 25),
480 bits(7, 16, 17, 27, 28, 29),
bits(0, 7, 8, 17, 18, 19),
481 bits(18, 28, 29, 38, 39, 40),
bits(9, 18, 19, 29, 30, 31),
bits(2, 9, 10, 19, 20, 21),
482 bits(30, 39, 40, 47, 48, 49),
bits(20, 30, 31, 40, 41, 42),
bits(11, 20, 21, 31, 32, 33),
bits(4, 11, 12, 21, 22, 23),
483 bits(32, 41, 42, 49, 50, 51),
bits(22, 32, 33, 42, 43, 44),
bits(13, 22, 23, 33, 34, 35),
484 bits(34, 43, 44, 51, 52, 53),
bits(24, 34, 35, 44, 45, 46),
490 bits(7, 8, 9),
bits(9, 10, 11),
bits(11, 12, 13),
bits(13, 14, 15),
491 bits(16, 17, 18),
bits(18, 19, 20),
bits(20, 21, 22),
bits(22, 23, 24),
bits(24, 25, 26),
492 bits(28, 29, 30),
bits(30, 31, 32),
bits(32, 33, 34),
bits(34, 35, 36),
498 bits(17, 18, 19),
bits(19, 20, 21),
bits(21, 22, 23),
bits(23, 24, 25),
499 bits(27, 28, 29),
bits(29, 30, 31),
bits(31, 32, 33),
bits(33, 34, 35),
bits(35, 36, 37),
500 bits(38, 39, 40),
bits(40, 41, 42),
bits(42, 43, 44),
bits(44, 45, 46),
504 bits(3, 4, 12),
bits(12, 13, 23),
bits(23, 24, 35),
bits(35, 36, 46),
505 bits(1, 2, 10),
bits(10, 11, 21),
bits(21, 22, 33),
bits(33, 34, 44),
bits(44, 45, 53),
506 bits(8, 9, 19),
bits(19, 20, 31),
bits(31, 32, 42),
bits(42, 43, 51),
512 bits(2, 10, 11),
bits(11, 21, 22),
bits(22, 33, 34),
bits(34, 44, 45),
513 bits(0, 8, 9),
bits(9, 19, 20),
bits(20, 31, 32),
bits(32, 42, 43),
bits(43, 51, 52),
514 bits(7, 17, 18),
bits(18, 29, 30),
bits(30, 40, 41),
bits(41, 49, 50),
518 bits(38, 28, 29),
bits(29, 18, 19),
bits(19, 9, 10),
bits(10, 2, 3),
519 bits(47, 39, 40),
bits(40, 30, 31),
bits(31, 20, 21),
bits(21, 11, 12),
bits(12, 4, 5),
520 bits(49, 41, 42),
bits(42, 32, 33),
bits(33, 22, 23),
bits(23, 13, 14),
526 bits(39, 40, 30),
bits(30, 31, 20),
bits(20, 21, 11),
bits(11, 12, 4),
527 bits(48, 49, 41),
bits(41, 42, 32),
bits(32, 33, 22),
bits(22, 23, 13),
bits(13, 14, 6),
528 bits(50, 51, 43),
bits(43, 44, 34),
bits(34, 35, 24),
bits(24, 25, 15),
533 bits(0, 1, 2, 10, 11, 12),
534 bits(7, 8, 9, 19, 20, 21),
bits(9, 10, 11, 21, 22, 23),
bits(11, 12, 13, 23, 24, 25),
535 bits(16, 17, 18, 29, 30, 31),
bits(18, 19, 20, 31, 32, 33),
bits(20, 21, 22, 33, 34, 35),
bits(22, 23, 24, 35, 36, 37),
536 bits(28, 29, 30, 40, 41, 42),
bits(30, 31, 32, 42, 43, 44),
bits(32, 33, 34, 44, 45, 46),
537 bits(41, 42, 43, 51, 52, 53),
539 bits(5, 6, 13, 14, 23, 24),
540 bits(3, 4, 11, 12, 21, 22),
bits(12, 13, 22, 23, 33, 34),
bits(23, 24, 34, 35, 44, 45),
541 bits(1, 2, 9, 10, 19, 20),
bits(10, 11, 20, 21, 31, 32),
bits(21, 22, 32, 33, 42, 43),
bits(33, 34, 43, 44, 51, 52),
542 bits(8, 9, 18, 19, 29, 30),
bits(19, 20, 30, 31, 40, 41),
bits(31, 32, 41, 42, 49, 50),
543 bits(29, 30, 39, 40, 47, 48),
545 bits(26, 34, 35, 36, 37, 44),
546 bits(15, 22, 23, 24, 25, 33),
bits(24, 32, 33, 34, 35, 42),
bits(34, 41, 42, 43, 44, 49),
547 bits(6, 11, 12, 13, 14, 21),
bits(13, 20, 21, 22, 23, 31),
bits(22, 30, 31, 32, 33, 40),
bits(32, 39, 40, 41, 42, 47),
548 bits(4, 9, 10, 11, 12, 19),
bits(11, 18, 19, 20, 21, 29),
bits(20, 28, 29, 30, 31, 38),
549 bits(9, 16, 17, 18, 19, 27),
551 bits(4, 5, 6, 10, 11, 12),
bits(9, 10, 11, 17, 18, 19),
bits(11, 12, 13, 19, 20, 21),
bits(13, 14, 15, 21, 22, 23),
552 bits(18, 19, 20, 27, 28, 29),
bits(20, 21, 22, 29, 30, 31),
bits(22, 23, 24, 31, 32, 33),
bits(24, 25, 26, 33, 34, 35),
553 bits(30, 31, 32, 38, 39, 40),
bits(32, 33, 34, 40, 41, 42),
bits(34, 35, 36, 42, 43, 44),
554 bits(41, 42, 43, 47, 48, 49),
556 bits(13, 23, 24, 25, 26, 37),
557 bits(2, 10, 11, 12, 13, 23),
bits(11, 21, 22, 23, 24, 35),
bits(22, 33, 34, 35, 36, 46),
558 bits(0, 8, 9, 10, 11, 21),
bits(9, 19, 20, 21, 22, 33),
bits(20, 31, 32, 33, 34, 44),
bits(32, 42, 43, 44, 45, 53),
559 bits(7, 17, 18, 19, 20, 31),
bits(18, 29, 30, 31, 32, 42),
bits(30, 40, 41, 42, 43, 51),
560 bits(16, 27, 28, 29, 30, 40),
562 bits(34, 35, 44, 45, 52, 53),
563 bits(13, 14, 23, 24, 34, 35),
bits(22, 23, 33, 34, 43, 44),
bits(32, 33, 42, 43, 50, 51),
564 bits(4, 5, 12, 13, 22, 23),
bits(11, 12, 21, 22, 32, 33),
bits(20, 21, 31, 32, 41, 42),
bits(30, 31, 40, 41, 48, 49),
565 bits(2, 3, 10, 11, 20, 21),
bits(9, 10, 19, 20, 30, 31),
bits(18, 19, 29, 30, 39, 40),
566 bits(0, 1, 8, 9, 18, 19)
586 this->pieces.resize(0);
587 for (
int x = 0; x <
pieces.size(); x++)
588 this->pieces.push_back((
int)
pieces[x]);
610 if (total == 4) total = 19;
613 for (
int y = 1; y <= total; y++)
617 uint64_t rot_loc = 0;
618 for (
int x = 0; x < 64; x++)
626 bool success =
false;
627 for (
int z = 1; z <= total; z++)
636 assert(success ==
true);
649 if (total == 4) total = 19;
652 for (
int y = 1; y <= total; y++)
656 uint64_t flip_loc = 0;
657 for (
int x = 0; x < 64; x++)
665 bool success =
false;
666 for (
int z = 1; z <= total; z++)
675 assert(success ==
true);
683 for (
int x = 0; x < s.
cnt; x++)
699 for (
int x = 0; x < s.
cnt; x++)
714 static std::vector<HexagonAction> actions;
717 for (
auto i : actions)
721 neighbors.push_back(next);
739 for (
unsigned int x = 1; x <=
locations[piece][0]; x++)
742 actions.push_back({piece, x});
749 actions.push_back({piece, x});
756 actions.push_back({piece, x});
803 return node.bits == (((1ull)<<54)-1);
823 std::vector<tPieceName> v;
828 std::vector<HexagonSearchState> succ;
837 uint64_t state = s.
bits;
842 for (
int t = 0; t < 54; t++)
844 if (((state>>t)&1) == 1)
849 std::cout << count <<
"\n";
851 for (
int t = 0; t < 54; t++)
853 if (((state>>t)&1) == 1)
860 std::cout.precision(20);
861 std::cout << std::fixed;
863 std::cout <<
" " << p1 <<
" " << p2 <<
" " << p3 <<
"\t";
875 std::cout <<
"Board\t";
878 std::cout << count <<
"\n";
880 for (
int t = 0; t < 54; t++)
887 std::cout.precision(20);
888 std::cout << std::fixed;
890 std::cout <<
" " << p1 <<
" " << p2 <<
" " << p3 <<
"\t";
909 for (
int t = 0; t < 54; t++)
919 for (
int i = 0; i < s.
cnt; i++)
923 uint64_t state = tmp.
bits;
926 for (
int t = 0; t < 54; t++)
928 if (((state>>t)&1) == 1)
944 case 0: x = 2; y = 0;
return;
945 case 1: x = 3; y = 0;
return;
946 case 2: x = 4; y = 0;
return;
947 case 3: x = 5; y = 0;
return;
948 case 4: x = 6; y = 0;
return;
949 case 5: x = 7; y = 0;
return;
950 case 6: x = 8; y = 0;
return;
952 case 7: x = 1; y = 1;
return;
953 case 8: x = 2; y = 1;
return;
954 case 9: x = 3; y = 1;
return;
955 case 10: x = 4; y = 1;
return;
956 case 11: x = 5; y = 1;
return;
957 case 12: x = 6; y = 1;
return;
958 case 13: x = 7; y = 1;
return;
959 case 14: x = 8; y = 1;
return;
960 case 15: x = 9; y = 1;
return;
962 case 16: x = 0; y = 2;
return;
963 case 17: x = 1; y = 2;
return;
964 case 18: x = 2; y = 2;
return;
965 case 19: x = 3; y = 2;
return;
966 case 20: x = 4; y = 2;
return;
967 case 21: x = 5; y = 2;
return;
968 case 22: x = 6; y = 2;
return;
969 case 23: x = 7; y = 2;
return;
970 case 24: x = 8; y = 2;
return;
971 case 25: x = 9; y = 2;
return;
972 case 26: x = 10; y = 2;
return;
974 case 27: x = 0; y = 3;
return;
975 case 28: x = 1; y = 3;
return;
976 case 29: x = 2; y = 3;
return;
977 case 30: x = 3; y = 3;
return;
978 case 31: x = 4; y = 3;
return;
979 case 32: x = 5; y = 3;
return;
980 case 33: x = 6; y = 3;
return;
981 case 34: x = 7; y = 3;
return;
982 case 35: x = 8; y = 3;
return;
983 case 36: x = 9; y = 3;
return;
984 case 37: x = 10; y = 3;
return;
986 case 38: x = 1; y = 4;
return;
987 case 39: x = 2; y = 4;
return;
988 case 40: x = 3; y = 4;
return;
989 case 41: x = 4; y = 4;
return;
990 case 42: x = 5; y = 4;
return;
991 case 43: x = 6; y = 4;
return;
992 case 44: x = 7; y = 4;
return;
993 case 45: x = 8; y = 4;
return;
994 case 46: x = 9; y = 4;
return;
996 case 47: x = 2; y = 5;
return;
997 case 48: x = 3; y = 5;
return;
998 case 49: x = 4; y = 5;
return;
999 case 50: x = 5; y = 5;
return;
1000 case 51: x = 6; y = 5;
return;
1001 case 52: x = 7; y = 5;
return;
1002 case 53: x = 8; y = 5;
return;
1026 #pragma mark Hexagon Display Code
1041 Load(file, s,
true);
1046 Load(file, s,
false);
1052 this->solution.state.FillMax();
1053 FILE *f = fopen(file,
"r");
1056 printf(
"Error opening file for read\n");
1060 fscanf(f,
"type triangle\n");
1061 int cnt = fscanf(f,
"height %d\nwidth %d\nmap\n", &h, &w);
1064 printf(
"Error reading height/width from file\n");
1067 if (h != 6 || w != 11)
1069 printf(
"Invalid height/width from file. Requires 6/11.\n");
1074 fgets(buffer, 255, f);
1075 if (strncmp(
"Constraint:", buffer, 11) != 0)
1077 printf(
"Error: expected 'Constraint:'\n");
1083 tmp = strcasestr(buffer,
"Diag");
1090 tmp = strcasestr(buffer,
"NoFlip");
1098 tmp = strcasestr(buffer,
"NotTouch");
1106 tmp = strcasestr(buffer,
" Touch");
1114 for (
int x = 0; x < 66; x++)
1122 this->solution.state.Set(x, -1);
1124 else if (isalpha(c))
1126 this->solution.state.Set(x, tolower(c)-
'a');
1135 else if (isdigit(c))
1137 this->solution.state.Set(x, tolower(c)-
'0');
1145 for (
int y = 0; y < 6; y++)
1147 for (
int x = 0; x < 11; x++)
1151 int piece = this->solution.state.Get(y*11+x);
1223 const float triangleWidth = 2.0/7;
1224 const float triangleHeight = triangleWidth/1.154700538379252;
1225 const float xMargin = triangleWidth/2;
1226 const float yMargin = (2.0-triangleHeight*6)/2;
1240 -1+xMargin+(x+2)*triangleWidth/2,
1241 -1+yMargin+(y+1)*triangleHeight
1244 -1+xMargin+(x+1)*triangleWidth/2,
1245 -1+yMargin+(y)*triangleHeight
1251 -1+xMargin+x*triangleWidth/2,
1252 -1+yMargin+(y+1)*triangleHeight
1255 -1+xMargin+(x+1)*triangleWidth/2,
1256 -1+yMargin+(y)*triangleHeight
1262 -1+xMargin+x*triangleWidth/2,
1263 -1+yMargin+(y+1)*triangleHeight
1266 -1+xMargin+(x+2)*triangleWidth/2,
1267 -1+yMargin+(y+1)*triangleHeight
1281 -1+xMargin+(x+2)*triangleWidth/2,
1282 -1+yMargin+(y)*triangleHeight
1286 -1+xMargin+(x+1)*triangleWidth/2,
1287 -1+yMargin+(y+1)*triangleHeight
1294 -1+xMargin+(x)*triangleWidth/2,
1295 -1+yMargin+(y)*triangleHeight
1299 -1+xMargin+(x+1)*triangleWidth/2,
1300 -1+yMargin+(y+1)*triangleHeight
1307 -1+xMargin+(x+2)*triangleWidth/2,
1308 -1+yMargin+(y)*triangleHeight
1312 -1+xMargin+(x)*triangleWidth/2,
1313 -1+yMargin+(y)*triangleHeight
1338 const float triangleWidth = 2.0/7;
1339 const float triangleHeight = triangleWidth/1.154700538379252;
1340 const float xMargin = triangleWidth/2;
1341 const float yMargin = (2.0-triangleHeight*6)/2;
1346 -1+xMargin+x*triangleWidth/2,
1347 -1+yMargin+(y+1)*triangleHeight
1350 -1+xMargin+(x+2)*triangleWidth/2,
1351 -1+yMargin+(y+1)*triangleHeight
1354 -1+xMargin+(x+1)*triangleWidth/2,
1355 -1+yMargin+(y)*triangleHeight
1360 -1+xMargin+(x+2)*triangleWidth/2,
1361 -1+yMargin+(y)*triangleHeight
1364 -1+xMargin+(x)*triangleWidth/2,
1365 -1+yMargin+(y)*triangleHeight
1368 -1+xMargin+(x+1)*triangleWidth/2,
1369 -1+yMargin+(y+1)*triangleHeight
1376 static bool valid[6][11] =
1378 {
false,
false,
true,
true,
true,
true,
true,
true,
true,
false,
false},
1379 {
false,
true,
true,
true,
true,
true,
true,
true,
true,
true,
false},
1380 {
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true},
1381 {
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true},
1382 {
false,
true,
true,
true,
true,
true,
true,
true,
true,
true,
false},
1383 {
false,
false,
true,
true,
true,
true,
true,
true,
true,
false,
false}
1392 for (
int y = 0; y < 6; y++)
1394 for (
int x = 0; x < 11; x++)
1405 float xLoc = -1, yLoc = -1;
1441 for (
int piece = 0; piece < 10; piece++)
1446 for (
int y = 0; y < 6; y++)
1448 for (
int x = 0; x < 11; x++)
1475 float newWidth = 0.45f;
1476 float newHeight = 0.45f;
1477 float border = 0.01;
1479 float baseX = -0.9f+(piece%4)*(newWidth+border);
1480 float baseY = -0.7f+(piece>>2)*(newHeight+border);
1483 for (
int y = 0; y < 6; y++)
1485 for (
int x = 0; x < 11; x++)
1494 p1.
x = baseX+(p1.
x-bounds.
left)*scale;
1495 p1.
y = baseY+(p1.
y-bounds.
top)*scale;
1496 p2.
x = baseX+(p2.
x-bounds.
left)*scale;
1497 p2.
y = baseY+(p2.
y-bounds.
top)*scale;
1498 p3.
x = baseX+(p3.
x-bounds.
left)*scale;
1499 p3.
y = baseY+(p3.
y-bounds.
top)*scale;
1508 float xLoc = -1, yLoc = -1;
1541 for (
int y = 0; y < 6; y++)
1543 for (
int x = 0; x < 11; x++)
1557 for (
int y = 0; y < 6; y++)
1559 for (
int x = 0; x < 11; x++)
1568 if ((x == 10) || (piece != s.
state.
Get(y*11+x+1)))
1575 if ((x == 0) || (x > 0 && piece != s.
state.
Get(y*11+x-1)))
1582 if ((y == 5) || (y < 5 && piece != s.
state.
Get((y+1)*11+x)))
1589 if ((y == 0) || (y > 0 && piece != s.
state.
Get((y-1)*11+x)))