Navvye/Olympiad-Problems-CSV huggingface dataset:
Problem: Define an ordered quadruple of integers $(a, b, c, d)$ as interesting if $1 \le a<b<c<d \le 10$ , and $a+d>b+c$ . How many interesting ordered quadruples are there?

Solution: Think about a,b,c,and d as distinct objects, that we must place in 4 of 10 spaces. However, in only 1 of 24 of these combinations, will the placement of these objects satisfy the condition in the problem. So we know the total number of ordered quadruples is $(10*9*8*7/24)=210$
Next, intuitively, the number of quadruples where $a+d>b+c$ is equal to the number of quadruples where $a+d<b+c$ . So we need to find the number of quadruples where the two quantities are equal. To do this, all we have to do is consider the cases when $a-d$ ranges from 3 to 9. It would seem natural that a range of 3 would produce 1 option, and a range of 4 would produce 2 options. However, since b and c cannot be equal, a range of 3 or 4 produces 1 option each, a range of 5 or 6 produces 2 options each, a range of 7 or 8 produces 3 options each, and a range of 9 will produce 4 options. In addition, a range of n has 10-n options for combinations of a and d. Multiplying the number of combinations of a and d by the corresponding number of options for b and c gives us 50 total quadruplets where $a+d=b+c$
So the answer will be $\frac{210-50}{2} = \boxed{080}.$

Answer:  080
Problem: Define an ordered quadruple of integers $(a, b, c, d)$ as interesting if $1 \le a<b<c<d \le 10$ , and $a+d>b+c$ . How many interesting ordered quadruples are there?

Solution: Let $b = a+x$ and $c = a+x+y$ and $d = a+x+y+z$ for positive integers $x,y,z.$ In order to satisfy the other condition we need $z > x$ so we let $z = x+k.$ Now the only other condition we need to satisfy so $a+2x+y+k \le 10.$ This condition can be transformed into $a+2x+y+k+b  = 11$ for positive $a,x,y,k,b.$ Now we use generating functions to finish. We find the generating function of the whole expression is $(x + x^2 + \cdots)^4 \cdot (x^2+x^4 + \cdots)$ and we are looking for the $x^{11}$ coefficient. This simplifies to finding the $x^5$ coefficient of $(1+x+\cdots)^4 \cdot (1+x^2+\cdots) =\frac{1}{(1-x)^4} \cdot\frac{1}{1+x}.$ Now this expression simplifies to \[\left(\binom{4}{4}+\binom{5}{4} + \cdots +\binom{4+k}{4}x^k\right)(1-x+x^2-x^3 \cdots).\] The $x^5$ coefficient ends up to be $\binom{9}{4} -\binom{8}{4} +\binom{7}{4} -\binom{6}{4} +\binom{5}{4} -\binom{4}{4} = 126 - 70 + 35 - 15 + 5 - 1 = \boxed{080}.$

Answer:  080
Problem: Define an ordered quadruple of integers $(a, b, c, d)$ as interesting if $1 \le a<b<c<d \le 10$ , and $a+d>b+c$ . How many interesting ordered quadruples are there?

Solution: First, let $a=1$ and $d=10$ . If $b=2$ , then $c$ can be from $3$ to $8$ . If $b=3$ , then $4$ to $7$ . If $b=4$ , then $c$ is between $5$ and $6$ . We find a pattern that whenever $b$ increases by $1$ , when $a$ and $d$ are stationary, then the possible values of $c$ decrease by 2, unless it gets to zero or negative, in which case that case ends. Counting up, we have $6+4+2=12$ different possibilities when $a=1$ and $d=10$ . For $a=1$ and $d=9$ $b=2$ , then $c$ can be from $3$ to $7$ . If $b=3$ , then $c$ can be from $4$ to $6$ , and so on. Notice that the possible values for each case of $b$ gets one less than if $d$ were one greater, unless that number is zero, in which it stays zero. We then use this pattern to find all the values: $12+9+6+4+2+1+9+6+4+2+1+6+4+2+1+4+2+1+2+1+1 \Rightarrow  \\ 12\cdot1+9\cdot2+6\cdot3+4\cdot4+2\cdot5+1\cdot6= \\ 12+18+18+16+10+6=\boxed{080}.$

Answer:  080
Problem: Define an ordered quadruple of integers $(a, b, c, d)$ as interesting if $1 \le a<b<c<d \le 10$ , and $a+d>b+c$ . How many interesting ordered quadruples are there?

Solution: Rearranging the equation obtains $b-a<d-c$ . Let $a-0=e_0$ $b-a=e_3+e_1$ $c-b=e_2$ $d-c=e_3$ $11-d=e_4$ . Add up all of these newly defined equations to obtain $e_0+e_1+e_2+2e_3+e_4=11$ . Note that since all $e_n$ were defined to be $e_n\ge1$ , to form our stars and bars argument we can let $d_n+1=e_n$ for all $n$ . Then we obtain $d_0+d_1+d_2+2d_3+d_4=5$ where $d_n$ is nonnegative. Now, we can move the $2d_3$ term to the other side and perform casework.
If $2d_3=0$ : 5 objects for 4 variables -> $\binom{8}{3}$
If $2d_3=2$ : 3 objects for 4 variables -> $\binom{6}{3}$
If $2d_3=4$ : 1 object for 4 variables -> $\binom{4}{3}$
Adding all of these cases up, we get $56+20+4=\boxed{080}$ as our requested answer.

Answer:  080
Problem: Ed has five identical green marbles, and a large supply of identical red marbles. He arranges the green marbles and some of the red ones in a row and finds that the number of marbles whose right hand neighbor is the same color as themselves is equal to the number of marbles whose right hand neighbor is the other color. An example of such an arrangement is GGRRRGGRG. Let $m$ be the maximum number of red marbles for which such an arrangement is possible, and let $N$ be the number of ways he can arrange the $m+5$ marbles to satisfy the requirement. Find the remainder when $N$ is divided by $1000$

Solution: We are limited by the number of marbles whose right hand neighbor is not the same color as the marble.  By surrounding every green marble with red marbles - RGRGRGRGRGR.  That's 10 "not the same colors" and 0 "same colors."  Now, for every red marble we add, we will add one "same color" pair and keep all 10 "not the same color" pairs.  It follows that we can add 10 more red marbles for a total of $m = 16$ .  We can place those ten marbles  in any of 6 "boxes": To the left of the first green marble, to the right of the first but left of the second, etc. up until to the right of the last.  This is a stars-and-bars problem, the solution of which can be found as $\binom{n+k}{k}$ where n is the number of stars and k is the number of bars.  There are 10 stars (The unassigned Rs, since each "box" must contain at least one, are not counted here) and 5 "bars," the green marbles.  So the answer is $\binom{15}{5} = 3003$ , take the remainder when divided by 1000 to get the answer: $\boxed{003}$

Answer:  003
Problem: Ed has five identical green marbles, and a large supply of identical red marbles. He arranges the green marbles and some of the red ones in a row and finds that the number of marbles whose right hand neighbor is the same color as themselves is equal to the number of marbles whose right hand neighbor is the other color. An example of such an arrangement is GGRRRGGRG. Let $m$ be the maximum number of red marbles for which such an arrangement is possible, and let $N$ be the number of ways he can arrange the $m+5$ marbles to satisfy the requirement. Find the remainder when $N$ is divided by $1000$

Solution: Begin with the above solution's reasoning to find that the ideal sequence is RGRGRGRGRGR + 10 Rs. To count the number of arrangements where the Gs are separate, group a G and an R together (GR) which will be rearranged/counted as one. However this also introduces the case of having GRGR.... which results in too few number of marbles whose right-hand neighbor is different, so we fix an R in the beginning of our sequence which also removes it from our counting calculation. Finally we are looking at the arrangement of 5 (GR)s + 10 Rs, all indistinguishable, which is $\frac{15!}{5!10!}=3003\Longrightarrow\boxed{003}$

Answer:  003
Problem: Let $z_1,z_2,z_3,\dots,z_{12}$ be the 12 zeroes of the polynomial $z^{12}-2^{36}$ . For each $j$ , let $w_j$ be one of $z_j$ or $i z_j$ . Then the maximum possible value of the real part of $\sum_{j=1}^{12} w_j$ can be written as $m+\sqrt{n}$ where $m$ and $n$ are positive integers. Find $m+n$

Solution: The twelve dots above represent the $12$ roots of the equation $z^{12}-2^{36}=0$ . If we write $z=a+bi$ , then the real part of $z$ is $a$ and the real part of $iz$ is $-b$ . The blue dots represent those roots $z$ for which the real part of $z$ is greater than the real part of $iz$ , and the red dots represent those roots $z$ for which the real part of $iz$ is greater than the real part of $z$ . Now, the sum of the real parts of the blue dots is easily seen to be $8+16\cos\frac{\pi}{6}=8+8\sqrt{3}$ and the negative of the sum of the imaginary parts of the red dots is easily seen to also be $8+8\sqrt{3}$ . Hence our desired sum is $16+16\sqrt{3}=16+\sqrt{768}$ , giving the answer $\boxed{784}.$

Answer:  784
Problem: Let $z_1,z_2,z_3,\dots,z_{12}$ be the 12 zeroes of the polynomial $z^{12}-2^{36}$ . For each $j$ , let $w_j$ be one of $z_j$ or $i z_j$ . Then the maximum possible value of the real part of $\sum_{j=1}^{12} w_j$ can be written as $m+\sqrt{n}$ where $m$ and $n$ are positive integers. Find $m+n$

Solution: The equation $z^{12}-2^{36}=0$ can be factored as follows: \[(z^6-2^{18})(z^6+2^{18})=0\] \[(z^2-2^6)(z^2+2^6)({(z^2+2^6)}^2-z^2\cdot2^6)({(z^2-2^6)}^2+z^2\cdot2^6)=0\] \[(z^2-2^6)(z^2+2^6)(z^2+2^6-z\cdot2^3)(z^2+2^6+z\cdot2^3) (z^2-2^6-iz\cdot2^3)(z^2-2^6+i z\cdot2^3)=0\]
Since this is a 12th degree equation, there are 12 roots. Also, since each term in the equation is even, the positive or negative value of each root is another root. That would mean there are 6 roots that can be multiplied by $-1$ and since we have 6 factors, that’s 1 root per factor. We just need to solve for $z$ in each factor and pick whether or not to multiply by $i$ and $-1$ for each one depending on the one that yields the highest real value. After that process, we get $8+8+2((4\sqrt{3}+4)+(4\sqrt{3}-4))$ Adding the values up yields $16+16\sqrt{3}$ , or $16+\sqrt{768}$ , and $16+768=\boxed{784}$

Answer:  784
Problem: Let $z_1,z_2,z_3,\dots,z_{12}$ be the 12 zeroes of the polynomial $z^{12}-2^{36}$ . For each $j$ , let $w_j$ be one of $z_j$ or $i z_j$ . Then the maximum possible value of the real part of $\sum_{j=1}^{12} w_j$ can be written as $m+\sqrt{n}$ where $m$ and $n$ are positive integers. Find $m+n$

Solution: Clearly, the roots are: $2^3*(\cos{\frac{k\pi}{12}}+i\sin{\frac{k\pi}{12}}), k\in{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}$
Now, realize for $z=a+bi$ $\operatorname{Re}(iz)=-b$ $\operatorname{Re}(z)=a$ $\operatorname{Re}(z)<\operatorname{Re}(iz)$ is true when $a<-b$
This means:
When $a>0$ $b<-a<0$
When $a<0$ $0<b<-a$
For the 12 roots of the polynomial in the original equation, $8\cos{k\pi/12}=\operatorname{Re}(z), k\in{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}$ $-8\sin{k\pi/12}=\operatorname{Im}(iz), k\in{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}$
So $8\cos{k\pi/12}<-8\sin{k\pi/12}$ $-\cos{k\pi/12}>\sin{k\pi/12}$ . This can be easily true for roots that are in the 3rd quadrant in the complex plane.
This cannot be true for roots in the 1st quadrant because that would yield a negative number bigger than a positive one.
Consider the roots in the 2nd and 4th quadrants. Calculate the roots, choose, and then add the ones up. You will get $\boxed{784}$

Answer:  784
Problem: Let $z_1,z_2,z_3,\dots,z_{12}$ be the 12 zeroes of the polynomial $z^{12}-2^{36}$ . For each $j$ , let $w_j$ be one of $z_j$ or $i z_j$ . Then the maximum possible value of the real part of $\sum_{j=1}^{12} w_j$ can be written as $m+\sqrt{n}$ where $m$ and $n$ are positive integers. Find $m+n$

Solution: Use De Moivre's Theorem to brute force all the roots out. Then choose the greater value of $\operatorname{Re}(z), \operatorname{Re}(iz)$ . After adding everything up, you get $\boxed{784}$

Answer:  784
Problem: circle with center $O$ has radius 25. Chord $\overline{AB}$ of length 30 and chord $\overline{CD}$ of length 14 intersect at point $P$ . The distance between the midpoints of the two chords is 12. The quantity $OP^2$ can be represented as $\frac{m}{n}$ , where $m$ and $n$ are relatively prime positive integers. Find the remainder when $m + n$ is divided by 1000.

Solution: We begin as in the first solution.  Once we see that $\triangle EOF$ has side lengths $12$ $20$ , and $24$ , we can compute its area with Heron's formula:
\[K = \sqrt{s(s-a)(s-b)(s-c)} = \sqrt{28\cdot 16\cdot 8\cdot 4} = 32\sqrt{14}.\]
Thus, the circumradius of triangle $\triangle EOF$ is $R = \frac{abc}{4K} = \frac{45}{\sqrt{14}}$ .  Looking at $EPFO$ , we see that $\angle OEP = \angle OFP = 90^\circ$ , which makes it a cyclic quadrilateral. This means $\triangle EOF$ 's circumcircle and $EPFO$ 's inscribed circle are the same.
Since $EPFO$ is cyclic with diameter $OP$ , we have $OP = 2R = \frac{90}{\sqrt{14}}$ , so $OP^2 = \frac{4050}{7}$ and the answer is $\boxed{057}$

Answer:  057
Problem: circle with center $O$ has radius 25. Chord $\overline{AB}$ of length 30 and chord $\overline{CD}$ of length 14 intersect at point $P$ . The distance between the midpoints of the two chords is 12. The quantity $OP^2$ can be represented as $\frac{m}{n}$ , where $m$ and $n$ are relatively prime positive integers. Find the remainder when $m + n$ is divided by 1000.

Solution: Let $OP=x$
Proceed as the first solution in finding that quadrilateral $EPFO$ has side lengths $OE=20$ $OF=24$ $EP=\sqrt{x^2-20^2}$ , and $PF=\sqrt{x^2-24^2}$ , and diagonals $OP=x$ and $EF=12$
We note that quadrilateral $EPFO$ is cyclic and use Ptolemy's theorem to solve for $x$
\[20\cdot \sqrt{x^2-24^2} + 12\cdot x = 24\cdot \sqrt{x^2-20^2}\]
Solving, we have $x^2=\frac{4050}{7}$ so the answer is $\boxed{057}$

Answer:  057
Problem: circle with center $O$ has radius 25. Chord $\overline{AB}$ of length 30 and chord $\overline{CD}$ of length 14 intersect at point $P$ . The distance between the midpoints of the two chords is 12. The quantity $OP^2$ can be represented as $\frac{m}{n}$ , where $m$ and $n$ are relatively prime positive integers. Find the remainder when $m + n$ is divided by 1000.

Solution: Let $M$ be the midpoint of $AB$ and $N$ of $CD$ . As $\angle OMP = \angle ONP$ , quadrilateral $OMPN$ is cyclic with diameter $OP$ . By Cyclic quadrilaterals note that $\angle MPO = \angle MNO$
The area of $\triangle MNP$ can be computed by Herons as \[[MNO] = \sqrt{s(s-a)(s-b)(s-c)} = \sqrt{28\cdot 16\cdot 8\cdot 4} = 32\sqrt{14}.\] The area is also $\frac{1}{2}ON \cdot MN \sin{\angle MNO}$ . Therefore, \begin{align*} \sin{\angle MNO} &= \frac{2[MNO]}{ON \cdot MN}  \\ &= \frac{2}{9}\sqrt{14} \\ \sin{\angle MNO} &= \frac{OM}{OP} \\ &= \frac{2}{9}\sqrt{14} \\ OP &= \frac{90\sqrt{14}}{14} \\ OP^2 &= \frac{4050}{7} \implies \boxed{057}

Answer:  057
Problem: circle with center $O$ has radius 25. Chord $\overline{AB}$ of length 30 and chord $\overline{CD}$ of length 14 intersect at point $P$ . The distance between the midpoints of the two chords is 12. The quantity $OP^2$ can be represented as $\frac{m}{n}$ , where $m$ and $n$ are relatively prime positive integers. Find the remainder when $m + n$ is divided by 1000.

Solution: Define $M$ and $N$ as the midpoints of $AB$ and $CD$ , respectively. Because $\angle OMP = \angle ONP = 90^{\circ}$ , we have that $ONPM$ is a cyclic quadrilateral. Hence, $\angle PNM = \angle POM.$ Then, let these two angles be denoted as $\alpha$ . 
Now, assume WLOG that $PD = x < 7$ and $PB = y < 15$ (We can do this because one of $PD$ or $PC$ must be less than 7, and similarly for $PB$ and $PA$ ). Then, by Power of a Point on P with respect to the circle with center $O$ , we have that \[(14-x)x = (30-y)y\] \[(7-x)^{2}+176=(15-y)^{2}.\] Then, let $z = (7-x)^{2}$ . From Law of Cosines on $\triangle NMP$ , we have that \[\textrm{cos } \angle MNP = \frac{NP^{2}+MN^{2}-MP^{2}}{2 \cdot NP \cdot MN}\] \[\textrm{cos } \alpha  = \frac{(7-x)^{2} + 12^{2} - (14-x)^{2}}{24 \cdot (7-x)}.\] Plugging in $z$ in gives \[\textrm{cos } \alpha  = \frac{-32}{24 \cdot \sqrt{z}}\] \[\textrm{cos } \alpha  = \frac{-4}{3\sqrt{z}}\] \[\textrm{cos }^{2} \alpha  = \frac{16}{9z}.\] Hence, \[\textrm{tan }^{2} \alpha  = \frac{\frac{9z-16}{9z}}{\frac{16}{9z}} = \frac{9z-16}{16}.\] Then, we also know that \[\textrm{tan } \alpha  = \textrm{tan } \angle MOP  = \frac{MP}{OM} = \frac{14-y}{20}.\] Squaring this, we get \[\textrm{tan }^{2} \alpha  = \frac{z+176}{400}.\] Equating our expressions for $z$ , we get $\frac{z+176}{400} = \frac{9z-16}{16}.$ Solving gives us that $z = \frac{18}{7}$ .
Since $\angle ONP = 90^{\circ}$ , from the Pythagorean Theorem, $OP^{2} = ON^{2}+PN^{2} = 25^{2}-7^{2} + z = 576+z = \frac{4050}{7}$ ,
and thus the answer is $4050+7 = 4057$ , which when divided by a thousand leaves a remainder of $\boxed{57}.$

Answer:  57
Problem: circle with center $O$ has radius 25. Chord $\overline{AB}$ of length 30 and chord $\overline{CD}$ of length 14 intersect at point $P$ . The distance between the midpoints of the two chords is 12. The quantity $OP^2$ can be represented as $\frac{m}{n}$ , where $m$ and $n$ are relatively prime positive integers. Find the remainder when $m + n$ is divided by 1000.

Solution: 2011 AIMEII Problem 10 CASE 2.png
Let $E$ and $F$ be the midpoints of $\overline{AB}$ and $\overline{CD}$ , respectively, such that $\overline{BE}$ intersects $\overline{CF}$
Since $E$ and $F$ are midpoints, $BE = 15$ and $CF = 7$
$B$ and $C$ are located on the circumference of the circle, so $OB = OC = 25$
Since $\overline{OE}\perp \overline{AB}$ and $\overline{OF}\perp \overline{CD}$ $OE = \sqrt{OB^2-BE^2}=20$ and $OF = \sqrt{OC^2-OF^2}=24$
With law of cosines, $\cos \angle EOF = \frac{OE^2+OF^2-EF^2}{2\cdot OE\cdot OF} = \frac{13}{15}$
Since $EF < OF$ $\angle EOF$ is acute angle. $\sin \angle EOF = \sqrt{1-\cos^2 \angle EOF} = \frac{\sqrt{56}}{15}$ and $\tan \angle EOF = \frac{\sqrt{56}}{13}$
Let $\overline{OF}$ line be $x$ axis.
Line $\overline{DC}$ equation is $x = OF$
Since line $\overline{AB}$ passes point $E$ and perpendicular to $\overline{OD}$ , its equation is $y - E_y = -\frac{1}{\tan \angle EOF} (x - E_x)$
where $E_x = OE\cos{\angle EOF}$ $E_y = OE\sin{\angle EOF}$
Since $P$ is the intersection of $\overline{AB}$ and $\overline{CD}$
$P_x = OF = 24$
$P_y = E_y -\frac{1}{\tan \angle EOF} (OF - E_x) = - \frac{3\sqrt{14}}{7}$ (Negative means point $P$ is between point $F$ and $C$
$OP^2 = P_x^2 + P_y^2 = \frac{4050}{7}$ and the answer is $\boxed{057}$

Answer:  057
Problem: Nine delegates, three each from three different countries, randomly select chairs at a round table that seats nine people. Let the probability that each delegate sits next to at least one delegate from another country be $\frac{m}{n}$ , where $m$ and $n$ are relatively prime positive integers. Find $m + n$

Solution: We use complementary counting.
We can order the $9$ people around a circle in $\frac{9!}{9} = 8!$ ways. Now we count when there is at least one delegate surrounded by people from only his/her country.
Let the countries be $A,B,C$ . Suppose that the group $XXX$ (for some country $X$ ) appears. To account for circular over counting we fix this group at the top. There are $6!$ ways to arrange the rest of the delegates and $3!$ ways to arrange inside the group. Since there are three countries this group can belong to, the total is $6!*3!*3$
But notice that when the group $XXX$ AND $YYY$ both appear is over counted. So, fix one group at the top. for the last country, we can insert $0,1,2,3$ people in between the two groups. Since we can choose two countries in $\binom{3}{2} = 3$ ways, the total is $3!*3!*3!*4*3$ ways.
Unfortunately, there is over count in the over count. If each country has their delegates together, this case must be added back. Think of these three groups as a whole, and there are $3!/3 = 2$ ways of arranging. In each group there is $3!$ ways of arrangements. So, $3!*3!*3!*2$ is the total for this case.
We now find the complementary probability total. This is \[\frac{6!*3!*3 - 3!*3!*3!*4*3 + 3!*3!*3!*2}{8!} = \frac{15}{56}\] so the actual probability is $1-\frac{15}{56} = \frac{41}{56}$ for an answer of $\boxed{97}$

Answer:  97
Problem: Nine delegates, three each from three different countries, randomly select chairs at a round table that seats nine people. Let the probability that each delegate sits next to at least one delegate from another country be $\frac{m}{n}$ , where $m$ and $n$ are relatively prime positive integers. Find $m + n$

Solution: $1680= \binom{9}{3} \binom{6}{3}$ is the total.
$540 = 3* 9* \binom{6}{3}$ is the case where one country has three people in a row. (Three is for selection of country and nine is for rotation of the seats.)
$108 = 3* 9* 4$ is the case where two countries has three people in a row. (Three and nine are for the same reasons above and four is for putting three people in a row for the remaining six seats.)
$18$ is the case where three countries has three people in a row.
$\frac{1680-540+108-18}{1680}=\frac{41}{56}$ so the answer is $\boxed{97}$

Answer:  97
Problem: Point $P$ lies on the diagonal $AC$ of square $ABCD$ with $AP > CP$ . Let $O_{1}$ and $O_{2}$ be the circumcenters of triangles $ABP$ and $CDP$ respectively. Given that $AB = 12$ and $\angle O_{1}PO_{2} = 120^{\circ}$ , then $AP = \sqrt{a} + \sqrt{b}$ , where $a$ and $b$ are positive integers. Find $a + b$

Solution: This is a combination of Solutions 1 and 2.
First, draw $O_1P,O_2P,BP,DP$ . Then, observe that $\angle BAP=45$ implies that $\angle BO_1P=90$ . So, $\triangle BO_1P$ is a $45-90-45$ triangle. Similarly, observe that $DO_2P$ is too. So, a rotation of $\angle O_1PO_2$ to $\angle BPO_2$ adds $45$ degrees. Then, moving to $BPD$ subtracts $45$ degrees. Hence, $\angle BPD=120$ . Let the intersection of $BD$ and $AC$ be $Q$ . Then $BQP$ is a $30-90-60$ triangle, hence $QP=\frac{6\sqrt{2}}{\sqrt{3}}$ (We know that $BQ$ is $6\sqrt{2}$ ), or $QP=2\sqrt{6}$ Finally, $AP=QP+AQ=2\sqrt{6}+6\sqrt{2}=\sqrt{24}+\sqrt{72} \Rightarrow \boxed{096}$

Answer:  096
Problem: Point $P$ lies on the diagonal $AC$ of square $ABCD$ with $AP > CP$ . Let $O_{1}$ and $O_{2}$ be the circumcenters of triangles $ABP$ and $CDP$ respectively. Given that $AB = 12$ and $\angle O_{1}PO_{2} = 120^{\circ}$ , then $AP = \sqrt{a} + \sqrt{b}$ , where $a$ and $b$ are positive integers. Find $a + b$

Solution: Use vectors. In an $xy$ plane, let $(-s,0)$ be $A$ $(0,s)$ be $B$ $(s,0)$ be $C$ $(0,-s)$ be $D$ , and $(p,0)$ be P, where $s=|AB|/\sqrt{2}=6\sqrt{2}$ . It remains to find $p$
The line $y=-x$ is the perpendicular bisector of $AB$ and $CD$ , so $O_1$ and $O_2$ lies on the line. Now compute the perpendicular bisector of $AP$ . The center has coordinate $(\frac{p-s}{2},0)$ , and the segment is part of the $x$ -axis, so the perpendicular bisector has equation $x=\frac{p-s}{2}$ . Since $O_1$ is the circumcenter of triangle $ABP$ , it lies on the perpendicular bisector of both $AB$ and $AP$ , so \[O_1=(\frac{p-s}{2},-\frac{p-s}{2})\] Similarly, \[O_2=(\frac{p+s}{2},-\frac{p+s}{2})\] The relation $\angle O_1PO_2=120^\circ$ can now be written using dot product as \[\vec{PO_1}\cdot\vec{PO_2}=|\vec{PO_1}|\cdot|\vec{PO_2}|\cos 120^\circ=-\frac{1}{2}|\vec{PO_1}|\cdot|\vec{PO_2}|\] Computation of both sides yields \[\frac{p^2-s^2}{p^2+s^2}=-\frac{1}{2}\] Solve for $p$ gives $p=s/\sqrt{3}=2\sqrt{6}$ , so $AP=s+p=6\sqrt{2}+2\sqrt{6}=\sqrt{72}+\sqrt{24}$ . The answer is 72+24 $\Rightarrow\boxed{096}$

Answer:  096
Problem: Point $P$ lies on the diagonal $AC$ of square $ABCD$ with $AP > CP$ . Let $O_{1}$ and $O_{2}$ be the circumcenters of triangles $ABP$ and $CDP$ respectively. Given that $AB = 12$ and $\angle O_{1}PO_{2} = 120^{\circ}$ , then $AP = \sqrt{a} + \sqrt{b}$ , where $a$ and $b$ are positive integers. Find $a + b$

Solution: Translate $\triangle{ABP}$ so that the image of $AB$ coincides $DC$ . Let the image of $P$ be $P’$
$\angle{DPC}=\angle{CPB}$ by symmetry, and $\angle{APB}=\angle{DP’C}$ because translation preserves angles. Thus $\angle{DP’C}+\angle{CPD}=\angle{CPB}+\angle{APB}=180^\circ$ . Therefore, quadrilateral $CPDP’$ is cyclic. Thus the image of $O_1$ coincides with $O_2$
$O_1P$ is parallel to $O_2P’$ so $\angle{P’O_2P}=\angle{O_1PO_2}=120^\circ$ , so $\angle{PDP’}=60^\circ$ and $\angle{PDC}=15^\circ$ , thus $\angle{ADP}=75^{\circ}$
Let $M$ be the foot of the perpendicular from $D$ to $AC$ . Then $\triangle{AMD}$ is a 45-45-90 triangle and $\triangle{DMP}$ is a 30-60-90 triangle. Thus
$AM=6\sqrt{2}$ and $MP=\frac{6\sqrt{2}}{\sqrt{3}}$
This gives us $AP=AM+MP=\sqrt{72}+\sqrt{24}$ , and the answer is $72+24=\boxed{096}.$

Answer:  096