1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

¡Lo has conseguido!

Elige una versión:


y después clic en ▷

Posible

Imposible

Posible

Imposible

versión = 1
distanciasHueco: {6, 5, 4, 3, 5, 4, 3, 2, 4, 3, 2, 1, 3, 2, 1, 0}
revuelto0 = Shuffle({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16})
inversiones0: Sum[Join[Sequence[Sequence[If[Element[revuelto0, k] < Element[revuelto0, s], 0, 1], s, k + 1, 16], k, 1, 15]]] + Element[distanciasHueco, Element[revuelto0, 16]]
Pos: {(4, 4), (6, 4), (8, 4), (10, 4), (4, 2), (6, 2), (8, 2), (10, 2), (4, 0), (6, 0), (8, 0), (10, 0), (4, -2), (6, -2), (8, -2), (10, -2)}
revuelto = If(Mod[inversiones0, 2] ≟ 1 ∧ versión ≟ 1 ∨ Mod[inversiones0, 2] ≟ 0 ∧ versión ≟ -1, Permutate[revuelto0, 1, 2], revuelto0)
posiciones: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
escala = 1 (slider from 0.4 to 1, step 0.01)
cronoP0 = (-2, 4.1)
t0: {0, 0, 0, 0}
s0: (((Element[t0, 4] * 60) + Element[t0, 3]) * 60) + Element[t0, 2] + Element[t0, 1] / 1000
t1: {0, 0, 0, 0}
s1: (((Element[t1, 4] * 60) + Element[t1, 3]) * 60) + Element[t1, 2] + Element[t1, 1] / 1000
para = 0
t: s1 - s0 - para + If[Element[t1, 4] < Element[t0, 4], (3600 * (24 + Element[t0, 4] - Element[t1, 4])), 0]
t2: {0, 0, 0, 0}
anima = false
cronoP1 = Rotate(cronoP0 + (0, (1.9 * escala)), ((-t) * π / 30), cronoP0)
cronoV1 = Vector(cronoP0, cronoP1)
t3: {0, 0, 0, 0}
horas: floor(t / 3600)
uno = 1
s2: (((Element[t2, 4] * 60) + Element[t2, 3]) * 60) + Element[t2, 2] + Element[t2, 1] / 1000
s3: (((Element[t3, 4] * 60) + Element[t3, 3]) * 60) + Element[t3, 2] + Element[t3, 1] / 1000
minutos: floor((t - (3600 * horas)) / 60)
segundos: floor(t - (3600 * horas) - (60 * minutos))
milisegundos: (1000 * (t - (3600 * horas) - (60 * minutos) - segundos))
crono: "" + (If[horas < 1, "00", If[horas < 10, ("0" * horas), ("" * horas)]]) + ":" + (If[minutos < 1, "00", If[minutos < 10, ("0" * minutos), ("" * minutos)]]) + ":" + (If[segundos < 1, "00", If[segundos < 10, ("0" * segundos), ("" * segundos)]]) + "." + milisegundos + ""
cronoCir1 = Circle(cronoP0, (2 * escala))
cronoP2: cronoP0 - (0, escala)
cronoP3 = Rotate(cronoP2 + (0, (0.5 * escala)), ((-t) * π / 1800), cronoP2)
cronoV2 = Segment(cronoP2, cronoP3)
cronoCir2a = Circle(cronoP2, (0.6 * escala))
cronoCir2b = Circle(cronoP2, (0.6 * escala))
B1 = Element(Pos, Element[posiciones, 1])
B2 = Element(Pos, Element[posiciones, 2])
B3 = Element(Pos, Element[posiciones, 3])
B4 = Element(Pos, Element[posiciones, 4])
B5 = Element(Pos, Element[posiciones, 5])
B6 = Element(Pos, Element[posiciones, 6])
B7 = Element(Pos, Element[posiciones, 7])
B8 = Element(Pos, Element[posiciones, 8])
B9 = Element(Pos, Element[posiciones, 9])
B10 = Element(Pos, Element[posiciones, 10])
B11 = Element(Pos, Element[posiciones, 11])
B12 = Element(Pos, Element[posiciones, 12])
B13 = Element(Pos, Element[posiciones, 13])
B14 = Element(Pos, Element[posiciones, 14])
B15 = Element(Pos, Element[posiciones, 15])
O = (3, -3)
caja: {Polygon[O - (0.2, 0.2), O + (8.2, -0.2), O + (8.2, 8.2), O + (-0.2, 8.2)]}
orden: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
hueco = Element(posiciones, 16)
cambia = 0
cambioCasos: {{2, 5}, {1, 3, 6}, {2, 4, 7}, {3, 8}, {1, 6, 9}, {2, 5, 7, 10}, {3, 6, 8, 11}, {4, 7, 12}, {5, 10, 13}, {6, 9, 11, 14}, {7, 10, 12, 15}, {8, 11, 16}, {9, 14}, {10, 13, 15}, {11, 14, 16}, {12, 15}}
cambioHueco = Element(cambioCasos, hueco)
cambioHuecoTF = Sequence(k ∈ cambioHueco, k, 1, 16)
C1 = Polygon(B1 - (1, 1), B1 - (-1, 1), 4)
C2 = Polygon(B2 - (1, 1), B2 - (-1, 1), 4)
C3 = Polygon(B3 - (1, 1), B3 - (-1, 1), 4)
C4 = Polygon(B4 - (1, 1), B4 - (-1, 1), 4)
C5 = Polygon(B5 - (1, 1), B5 - (-1, 1), 4)
C6 = Polygon(B6 - (1, 1), B6 - (-1, 1), 4)
C7 = Polygon(B7 - (1, 1), B7 - (-1, 1), 4)
C8 = Polygon(B8 - (1, 1), B8 - (-1, 1), 4)
C9 = Polygon(B9 - (1, 1), B9 - (-1, 1), 4)
C10 = Polygon(B10 - (1, 1), B10 - (-1, 1), 4)
C11 = Polygon(B11 - (1, 1), B11 - (-1, 1), 4)
C12 = Polygon(B12 - (1, 1), B12 - (-1, 1), 4)
C13 = Polygon(B13 - (1, 1), B13 - (-1, 1), 4)
C14 = Polygon(B14 - (1, 1), B14 - (-1, 1), 4)
C15 = Polygon(B15 - (1, 1), B15 - (-1, 1), 4)
tiempo = 0.64 (slider from 0 to 1, step 0.01)
cronoMarcas: {Sequence[Segment[cronoP0 + ((2 * escala); s°), cronoP0 + ((1.9 * escala); s°)], s, 0, 360, 6], Sequence[Segment[cronoP0 + ((2 * escala); s°), cronoP0 + ((1.75 * escala); s°)], s, 0, 360, 30], Sequence[Segment[cronoP2 + ((0.6 * escala); s°), cronoP2 + ((0.55 * escala); s°)], s, 0, 360, 6], Sequence[Segment[cronoP2 + ((0.6 * escala); s°), cronoP2 + ((0.5 * escala); s°)], s, 0, 360, 30]}
inversiones: Sum[Join[Sequence[Sequence[If[Element[revuelto, k] < Element[revuelto, s], 0, 1], s, k + 1, 16], k, 1, 15]]] + Element[distanciasHueco, Element[revuelto, 16]]
fin = false
A = (-3.26, -1.08)
polEscoger: {Polygon[A, A + (0, (0.6 * versión)), A + (2, (0.6 * versión)), A + (2, 0)]}
B = (10.54, 5.74)
progreso1 = Circle(B, 0.3)
C: B + (0, 0.3)
inversionesAhora: Sum[Join[Sequence[Sequence[If[Element[posiciones, k] < Element[posiciones, s], 0, 1], s, k + 1, 16], k, 1, 15]]] + Element[distanciasHueco, Element[posiciones, 16]]
C'' = Rotate(C, (((-inversionesAhora)) / 126 * π), B)
C' = Rotate(C, (((-inversionesAhora)) / 53 * π), B)
progreso2 = CircumcircleSector(C, C'', C')
cuenta = 0
contador: "" + cuenta + ""
l1 = Sequence(Segment[O + ((2 * k), 0), O + ((2 * k), 8)], k, 1, 3)
l2 = Sequence(Segment[O + (0, (2 * k)), O + (8, (2 * k))], k, 1, 3)

Tool: Permutate
List, index, index
Input: L, a, b
Output: LP

L: {12, 14, 13, 5, 9, 10, 16, 4, 1, 2, 3, 6, 7, 11, 8, 15}
n = Length(L)
c = Min(a, b)
L1 = First(L, c - 1)
d = Max(a, b)
L2 = If(c < d - 1, Take[L, c + 1, d - 1], {})
L3 = Last(L, n - d)
aa = If(c ≟ a, a, b)
bb = If(c ≟ a, b, a)
L4 = Join({L1, {Element[L, bb]}, L2, {Element[L, aa]}, L3})
LP = If(a ≟ b, L, L4)