Home > other >  Algorithm is equilateral triangle graphics splicing torture from kindergarten teacher.
Algorithm is equilateral triangle graphics splicing torture from kindergarten teacher.

Time:11-16

Triangular card puzzles algorithm for help, this is similar to what algorithm, give a keyword search is fine, thank you for the great god, the title attractive thank you,
Kindergarten teacher sent a stack is triangle puzzle card requirements, there are 41 pieces, there might be a lost card , card edge figure can form two combination 6 kinds of behavior, the teacher did not rest issued after reference graph, so may be a complete quadrilateral or pentagon or hexagon, may also be other abnormity,
My idea is the combination of minimum free boundary is obtained by calculation, thus it is concluded that the optimal spell diagram, but were unsuccessful,

41 card the press: "1 (bottom) graphics card number, edge, edge 2 edge (1 1) clockwise graphics, while 3 graphics @ the next card... "Format to get the string as follows:
 
//the initial value defined
var tStrCard="1,G2过马路_右,D2电梯_右,Q2骑车_下@2,G2过马路_右,D2电梯_右,Q2骑车_下@3,G2过马路_右,D2电梯_右,Q2骑车_下@4,G2过马路_右,D2电梯_右,Q2骑车_下@5,G2过马路_右,D2电梯_右,Q2骑车_下@6,G2过马路_右,D2电梯_右,Q2骑车_下@7,Q1骑车_上,G2过马路_右,D1电梯_左@8,Q1骑车_上,G2过马路_右,D1电梯_左@9,Q1骑车_上,G2过马路_右,D1电梯_左@10,Q1骑车_上,G2过马路_右,D1电梯_左@11,Q1骑车_上,G2过马路_右,D1电梯_左@12,G1过马路_左,C1出口_左,P1爬高_上@13,G1过马路_左,C1出口_左,P1爬高_上@14,G1过马路_左,C1出口_左,P1爬高_上@15,K1开车_上,D2电梯_右,P1爬高_上@16,K1开车_上,D2电梯_右,P1爬高_上@17,K1开车_上,D2电梯_右,P1爬高_上@18,K1开车_上,D2电梯_右,P1爬高_上@19,G1过马路_左,C1出口_左,P1爬高_上@20,G1过马路_左,C1出口_左,P1爬高_上@21,C2出口_右,P2爬高_下,G1过马路_左@22,C2出口_右,P2爬高_下,G1过马路_左@23,C2出口_右,P2爬高_下,G1过马路_左@24,C2出口_右,P2爬高_下,G1过马路_左@25,C2出口_右,P2爬高_下,G1过马路_左@26,D1电梯_左,P2爬高_下,K2开车_下@27,D1电梯_左,P2爬高_下,K2开车_下@28,D1电梯_左,P2爬高_下,K2开车_下@29,D1电梯_左,P2爬高_下,K2开车_下@30,D1电梯_左,P2爬高_下,K2开车_下@31,D1电梯_左,P2爬高_下,K2开车_下@32,Q2骑车_下,K1开车_上,C1出口_左@33,Q2骑车_下,K1开车_上,C1出口_左@34,Q2骑车_下,K1开车_上,C1出口_左@35,Q2骑车_下,K1开车_上,C1出口_左@36,K2开车_下,C2出口_右,Q1骑车_上@37,K2开车_下,C2出口_右,Q1骑车_上@38,K2开车_下,C2出口_右,Q1骑车_上@39,K2开车_下,C2出口_右,Q1骑车_上@40,K2开车_下,C2出口_右,Q1骑车_上@41,K2开车_下,C2出口_右,Q1骑车_上";
//offline test of 6 can be placed on the side of the card, set the free edge after only six, this string is used to verify the program (no. 4, 5, 11 19 20 to 25)
Var tStrCart6="4, G2 _ right crossing the street, D2 elevator _ right, Q2 bike _ @ 5, G2 _ right crossing the street, D2 elevator _ right, Q2 cycling _ @ 11, Q1 bike _, G2 _ right crossing the street, D1 elevator _ left @ 19, G1 _ left to cross the road, C1 export _ left, P1 climb on _ @ 20, G1 _ left to cross the road, C1 export _ left, P1 climb on _ @ 25, C2 exit _ right, P2 climb _, G1 _ left" to cross the road.
/*
Complete card
Card number 1 side (sign number side edge) clockwise 2 3 clockwise while
1 G2 right D2 elevator _ _ the right to cross the road under Q2 bike _
2 G2 right D2 elevator _ _ the right to cross the road under Q2 bike _
3 G2 right D2 elevator _ _ the right to cross the road under Q2 bike _
4 G2 right D2 elevator _ _ the right to cross the road under Q2 bike _
5 G2 right D2 elevator _ _ the right to cross the road under Q2 bike _
6 G2 right D2 elevator _ _ the right to cross the road under Q2 bike _
7 Q1 bike _ G2 D1 elevator _ _ right crossing the street on the left
8 Q1 bike _ G2 D1 elevator _ _ right crossing the street on the left
9 Q1 bike _ G2 D1 elevator _ _ right crossing the street on the left
10 Q1 bike _ G2 D1 elevator _ _ right crossing the street on the left
11 Q1 bike _ G2 D1 elevator _ _ right crossing the street on the left
12 G1 to cross the street the left C1 export left P1 climb _ _ _
13 the G1 to cross the street the left C1 export left P1 climb _ _ _
14 the G1 to cross the street the left C1 export left P1 climb _ _ _
15 K1 D2 elevator _ on _ driving right P1 climb _
16 K1 D2 elevator _ on _ driving right P1 climb _
17 K1 D2 elevator _ on _ driving right P1 climb _
18 K1 D2 elevator _ on _ driving right P1 climb _
19 the G1 to cross the road left C1 export left P1 climb _ _ _
20 G1 to cross the street the left C1 export left P1 climb _ _ _
G1 under 21 C2 export P2 climb _ _ right across the road left _
22 C2 export _ _ right P2 climbed down G1 to cross the road _ left
23 C2 export _ _ right P2 climbed down G1 to cross the road _ left
24 C2 export _ _ right P2 climbed down G1 to cross the road _ left
25 C2 export _ _ right P2 climbed down G1 to cross the road _ left
26 D1 elevator _ left P2 climb K2 under _ _ driving down
27 D1 elevator _ left P2 climb K2 under _ _ driving down
28 D1 elevator _ left P2 climb K2 under _ _ driving down
29 D1 elevator _ left P2 climb K2 under _ _ driving down
30 D1 elevator _ left P2 climb K2 under _ _ driving down
31 D1 elevator _ left P2 climb K2 under _ _ driving down
32 Q2 bike _ down K1 export _ _ on C1 driving left
33 Q2 bike _ down K1 export _ _ on C1 driving left
34 Q2 bike _ down K1 export _ _ on C1 driving left
K1 drive under 35 Q2 bike _ _ on C1 export _ left
36 K2 drive export _ _ the C2 right Q1 bike _
37 K2 drive export _ _ the C2 right Q1 bike _
38 K2 drive export _ _ the C2 right Q1 bike _
39 K2 drive export _ _ the C2 right Q1 bike _
40 K2 drive export _ _ the C2 right Q1 bike _
41 K2 drive export _ _ the C2 right Q1 bike _
*/




  • Related