NC209142. GeometryChallenge
描述
输入描述
The input contains multiple cases. The first line of the input contains a single integer , the number of cases.For each case, the first line contains a integer , indicating the number of logic forms. The second line contains several capital letters seperated by space, indicating all the points related to this problem. The third line contains several strings of uppercase letters of length 2, indicating all the lines(segments) related to this problem. In the next lines, there is a string in each line, indicating the -th logic form. It is guaranteed that the last logic form starts with "Find".
输出描述
For each case, output an integer indicating the answer. The unknown number shouldn't be involved in.
示例1
输入:
5 11 N M B C T A D MA MB MT MD AB AC BC TC TN CN Equals(MeasureOf(Angle(M, T, N)), 28) PointLiesOnLine(B, Line(A, C)) PointLiesOnLine(D, Line(T, N)) PointLiesOnCircle(N, Circle(M)) PointLiesOnCircle(C, Circle(M)) PointLiesOnCircle(T, Circle(M)) PointLiesOnCircle(A, Circle(M)) Perpendicular(Line(A, B), Line(M, B)) Perpendicular(Line(D, M), Line(T, D)) Equals(LengthOf(Line(B, M)), LengthOf(Line(D, M))) Find(MeasureOf(Angle(C, A, M))) 8 A B C D E AC AD AB AE BC BE CD DE Equals(LengthOf(Line(A, C)), x-3) Equals(LengthOf(Line(A, B)), 16) Equals(LengthOf(Line(C, D)), x+5) Equals(LengthOf(Line(B, E)), 20) PointLiesOnLine(C, Line(A, D)) PointLiesOnLine(B, Line(A, E)) Parallel(Line(B, C), Line(E, D)) Find(x) 12 A B C D F CB CD CA CF BD BA BF DA DF AF Equals(MeasureOf(Angle(F, A, D)), 20) Equals(LengthOf(Line(D, A)), 9) Equals(MeasureOf(Angle(F, A, B)), 32) Equals(LengthOf(Line(B, A)), 6) Equals(MeasureOf(Angle(A, D, B)), 40) PointLiesOnLine(F, Line(C, A)) PointLiesOnLine(F, Line(B, D)) Parallel(Line(A, D), Line(B, C)) Equals(LengthOf(Line(A, D)), LengthOf(Line(B, C))) Parallel(Line(A, B), Line(D, C)) Equals(LengthOf(Line(A, B)), LengthOf(Line(D, C))) Find(MeasureOf(Angle(D, B, A))) 5 A B C AB BC AC Equals(LengthOf(Line(A, B)), 2x-7) Equals(LengthOf(Line(B, C)), 4x-21) Equals(LengthOf(Line(A, C)), x-3) Equals(LengthOf(Line(A, B)), LengthOf(Line(B, C))) Find(LengthOf(Line(A, C))) 5 A B C AB AC BC Equals(LengthOf(Line(A, C)), 3) Equals(LengthOf(Line(A, B)), 5) Equals(LengthOf(Line(B, C)), x) Perpendicular(Line(A, C), Line(B, C)) Find(x)
输出:
28 35 88 4 4
示例2
输入:
5 7 A C B D E AB AC AE AD BE BC DE CD Equals(LengthOf(Line(A, C)), 16) Equals(LengthOf(Line(E, D)), 5) Equals(LengthOf(Line(A, B)), 12) PointLiesOnLine(B, Line(A, C)) Parallel(Line(C, D), Line(B, E)) PointLiesOnLine(E, Line(A, D)) Find(LengthOf(Line(A, E))) 12 A B C D F CB CD CA CF BD BA BF DA DF AF Equals(MeasureOf(Angle(F, A, D)), 20) Equals(LengthOf(Line(D, A)), 9) Equals(MeasureOf(Angle(F, A, B)), 32) Equals(LengthOf(Line(B, A)), 6) Equals(MeasureOf(Angle(D, B, C)), 40) PointLiesOnLine(F, Line(C, A)) PointLiesOnLine(F, Line(B, D)) Parallel(Line(A, D), Line(B, C)) Equals(LengthOf(Line(A, D)), LengthOf(Line(B, C))) Parallel(Line(A, B), Line(D, C)) Equals(LengthOf(Line(A, B)), LengthOf(Line(D, C))) Find(MeasureOf(Angle(A, D, C))) 12 A B C D E F G GC GD GB GF GA GE CE BF BA FA Equals(MeasureOf(Angle(A, G, C)), 60) PointLiesOnLine(F, Line(G, A)) PointLiesOnLine(G, Line(C, E)) PointLiesOnLine(G, Line(B, F)) PointLiesOnLine(G, Line(B, A)) PointLiesOnLine(F, Line(B, A)) PointLiesOnCircle(C, Circle(G)) PointLiesOnCircle(B, Circle(G)) PointLiesOnCircle(A, Circle(G)) PointLiesOnCircle(E, Circle(G)) Perpendicular(Line(G, F), Line(G, D)) Find(MeasureOf(Angle(B, G, E))) 3 A B C AB AC BC Equals(MeasureOf(Angle(A, B, C)), 40) Equals(MeasureOf(Angle(C, A, B)), 25) Find(MeasureOf(Angle(B, C, A))) 6 D A B K G KG GD DA KA AB KB Equals(MeasureOf(Angle(B, A, D)), 3x-70) Equals(MeasureOf(Angle(K, G, D)), 120) Equals(MeasureOf(Angle(G, D, A)), x) Parallel(Line(K, G), Line(A, D)) PointLiesOnLine(A, Line(K, B)) Find(x)
输出:
15 128 60 115 60