重新开始

\textcolor{yellow}{规则：}\
\hspace{2.5em}鼠标点击任何一盏灯，\
\hspace{2.5em}这盏灯及其相邻的灯\
\hspace{2.5em}都会同时亮或暗。\\\
\textcolor{yellow}{过关条件：}\
\hspace{4.5em}点亮所有灯。

开\textcolor{#624900}{关}灯游戏

关掉所有灯

l1 = Flatten(Sequence[Sequence[Circle[(i, j), 1], i, 1, 9, 2], j, 1, 5, 2])
A1 = true
A2 = false
A3 = true
A4 = true
A5 = true
A6 = true
A7 = false
A8 = true
A9 = false
A10 = true
A11 = true
A12 = false
A13 = false
A14 = false
A15 = false
B1: 1
B2: 2
B3 = 3
B4 = 4
B5 = 5
B6 = 6
B7 = 7
B8 = 8
B9 = 9
B10 = 10
B11 = 11
B12 = 12
B13 = 13
B14 = 14
B15 = 15
C1 = Element(l1, B1)
C2 = Element(l1, B2)
C3 = Element(l1, B3)
C4 = Element(l1, B4)
C5 = Element(l1, B5)
C6 = Element(l1, B6)
C7 = Element(l1, B7)
C8 = Element(l1, B8)
C9 = Element(l1, B9)
C10 = Element(l1, B10)
C11 = Element(l1, B11)
C12 = Element(l1, B12)
C13 = Element(l1, B13)
C14 = Element(l1, B14)
C15 = Element(l1, B15)
l2: {A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15}
text1 = If(Product[l2] ≠ 0, "恭喜你过关！")
A = (13.279227024034176, 5.41911390510647)
B = (16.215580637473966, 5.41911390510647)

Tool: 坐标系
x最小、最大，y最小、最大，0.23
Input: m, n, q, p, a
Output: A, B, O, l1, l2, list3, list4, list5, list6, u, v

$\huge\textcolor{}{x}$

$\huge\textcolor{}{y}$

$\Large{O}$

u = Vector((m - 1, 0), (n + 1, 0))
l1 = Sequence(Segment[(k, 0), (k, a)], k, m, n)
A: (n + 1, 0)
list4 = Sequence(Text[k, Element[Sequence[(t - 0.15, 0), t, 1, n], k], true, true], k, 1, n)
list3 = Sequence(Text[k, Element[Sequence[(t - 0.5, 0), t, m, -1], k + abs(m) + 1], true, true], k, m, -1)
l2 = Sequence(Segment[(0, k), (a, k)], k, q, p)
list5 = Sequence(Text[k, Element[Sequence[(-0.9, t + 0.2), t, q, -1], k + abs(q) + 1], true, true], k, q, -1)
v = Vector((0, q - 1), (0, p + 1))
B: (0, p + 1)
list6 = Sequence(Text[k, Element[Sequence[(-0.6, t + 0.2), t, 1, p], k], true, true], k, 1, p)
O: B - (0, p + 1)