Difference between revisions of "2022 AIME I Problems/Problem 14"

Line 31: Line 31:
  
 
- MarkBcc168
 
- MarkBcc168
 +
 +
==Solution (Geometry + Number Theory)
 +
 +
Denote <math>BC = a</math>, <math>CA = b</math>, <math>AB = c</math>.
 +
 +
Let the splitting line of <math>\triangle ABC</math> through <math>M</math> (resp. <math>N</math>) crosses <math>\triangle ABC</math> at another point <math>X</math> (resp. <math>Y</math>).
 +
 +
WLOG, we assume <math>c \leq b</math>.
 +
 +
<math>\textbf{Case 1}</math>: <math>a \leq c \leq b</math>.
 +
 +
We extend segment <math>AB</math> to <math>D</math>, such that <math>BD = a</math>.
 +
We extend segment <math>AC</math> to <math>E</math>, such that <math>CE = a</math>.
 +
 +
In this case, <math>X</math> is the midpoint of <math>AE</math>, and <math>Y</math> is the midpoint of <math>AD</math>.
 +
 +
Because <math>M</math> and <math>X</math> are the midpoints of <math>AB</math> and <math>AE</math>, respectively, <math>MX \parallel BE</math>.
 +
Because <math>N</math> and <math>Y</math> are the midpoints of <math>AC</math> and <math>AD</math>, respectively, <math>NY \parallel CD</math>.
 +
 +
Because <math>CB = CE</math>, <math>\angle CBE =\angle CEB = \frac{\angle ACB}{2}</math>.
 +
Because <math>BC = BD</math>, <math>\angle BCD = \angle BDC = \frac{\angle ABC}{2}</math>.
 +
 +
Let <math>BE</math> and <math>CD</math> intersect at <math>O</math>.
 +
Because <math>MX \parallel BE</math> and <math>NY \parallel CD</math>, the angle formed between lines <math>MX</math> and <math>NY</math> is congruent to <math>\angle BOD</math>. Hence, <math>\angle BOD = 30^\circ</math> or <math>150^\circ</math>.
 +
 +
We have
 +
<cmath>
 +
\begin{align*}
 +
\angle BOD & = \angle CBE + \angle BCD \\
 +
& = \frac{\angle ACB}{2} + \frac{\angle ABC}{2} \\
 +
& = 90^\circ - \frac{\angle A}{2} .
 +
\end{align*}
 +
</cmath>
 +
 +
Hence, we must have <math>\angle BOD = 30^\circ</math>, not <math>150^\circ</math>.
 +
Hence, <math>\angle A = 120^\circ</math>.
 +
 +
This implies <math>a > b</math> and <math>a >c</math>. This contradicts the condition specified for this case.
 +
 +
Therefore, this case is infeasible.
 +
 +
<math>\textbf{Case 2}</math>: <math>c \leq a \leq b</math>.
 +
 +
We extend segment <math>CB</math> to <math>D</math>, such that <math>BD = c</math>.
 +
We extend segment <math>AC</math> to <math>E</math>, such that <math>CE = a</math>.
 +
 +
In this case, <math>X</math> is the midpoint of <math>AE</math>, and <math>Y</math> is the midpoint of <math>CD</math>.
 +
 +
Because <math>M</math> and <math>X</math> are the midpoints of <math>AB</math> and <math>AE</math>, respectively, <math>MX \parallel BE</math>.
 +
Because <math>N</math> and <math>Y</math> are the midpoints of <math>AC</math> and <math>CD</math>, respectively, <math>NY \parallel AD</math>.
 +
 +
Because <math>CB = CE</math>, <math>\angle CBE =\angle CEB = \frac{\angle ACB}{2}</math>.
 +
Because <math>BA = BD</math>, <math>\angle BAD = \angle BDA = \frac{\angle ABC}{2}</math>.
 +
 +
Let <math>O</math> be a point of <math>AC</math>, such that <math>BO \parallel AD</math>.
 +
Hence, <math>\angle OBC = \angle BDA = \frac{B}{2}</math>.
 +
 +
Because <math>MX \parallel BE</math> and <math>NY \parallel AD</math> and <math>AD \parallel BO</math>, the angle formed between lines <math>MX</math> and <math>NY</math> is congruent to <math>\angle OBE</math>. Hence, <math>\angle OBE = 30^\circ</math> or <math>150^\circ</math>.
 +
 +
We have
 +
<cmath>
 +
\begin{align*}
 +
\angle OBE & = \angle OBC + \angle CBE \\
 +
& = \frac{\angle ABC}{2} + \frac{\angle ACB}{2} \\
 +
& = 90^\circ - \frac{\angle A}{2} .
 +
\end{align*}
 +
</cmath>
 +
 +
Hence, we must have <math>\angle OBE = 30^\circ</math>, not <math>150^\circ</math>.
 +
Hence, <math>\angle A = 120^\circ</math>.
 +
 +
This implies <math>a > b</math> and <math>a >c</math>. This contradicts the condition specified for this case.
 +
 +
Therefore, this case is infeasible.
 +
 +
<math>\textbf{Case 3}</math>: <math>c \leq b \leq a</math>.
 +
 +
We extend segment <math>CB</math> to <math>D</math>, such that <math>BD = c</math>.
 +
We extend segment <math>BC</math> to <math>E</math>, such that <math>CE = b</math>.
 +
 +
In this case, <math>X</math> is the midpoint of <math>BE</math>, and <math>Y</math> is the midpoint of <math>CD</math>.
 +
 +
Because <math>M</math> and <math>X</math> are the midpoints of <math>AB</math> and <math>BE</math>, respectively, <math>MX \parallel AE</math>.
 +
Because <math>N</math> and <math>Y</math> are the midpoints of <math>AC</math> and <math>CD</math>, respectively, <math>NY \parallel AD</math>.
 +
 +
Because <math>CA = CE</math>, <math>\angle CAE =\angle CEB = \frac{\angle ACB}{2}</math>.
 +
Because <math>BA = BD</math>, <math>\angle BAD = \angle BDA = \frac{\angle ABC}{2}</math>.
 +
 +
Because <math>MX \parallel AE</math> and <math>NY \parallel AD</math>, the angle formed between lines <math>MX</math> and <math>NY</math> is congruent to <math>\angle DAE</math>. Hence, <math>\angle DAE = 30^\circ</math> or <math>150^\circ</math>.
 +
 +
We have
 +
<cmath>
 +
\begin{align*}
 +
\angle DAE & = \angle BAD + \angle CAE + \angle BAC \\
 +
& = \frac{\angle ABC}{2} + \frac{\angle ACB}{2} + \angle BAC \\
 +
& = 90^\circ + \frac{\angle BAC}{2} .
 +
\end{align*}
 +
</cmath>
 +
 +
Hence, we must have <math>\angle OBE = 150^\circ</math>, not <math>30^\circ</math>.
 +
Hence, <math>\angle BAC = 120^\circ</math>.
 +
 +
In <math>\triangle ABC</math>, by applying the law of cosines, we have
 +
<cmath>
 +
\begin{align*}
 +
a^2 & = b^2 + c^2 - 2bc \cos \angle BAC\\
 +
& =  b^2 + c^2 - 2bc \cos 120^\circ \\
 +
& = b^2 + c^2 + bc .
 +
\end{align*}
 +
</cmath>
 +
 +
Because <math>a = 219</math>, we have
 +
<cmath>
 +
\[
 +
b^2 + c^2 + bc  = 219^2 .
 +
\]
 +
</cmath>
 +
 +
Now, we find integer solution(s) of this equation with <math>c \leq b</math>.
 +
 +
Multiplying this equation by 4, we get
 +
<cmath>
 +
\[
 +
\left( 2 c + b \right)^2 + 3 b^2 = 438^2 . \hspace{1cm} (1)
 +
\]
 +
</cmath>
 +
 +
Denote <math>d = 2 c + b</math>. Because <math>c \leq b</math>, <math>b < d \leq 3 b</math>.
 +
 +
Because <math>438^2 - 3 b^2 \equiv 0 \pmod{3}</math>, <math>d^2 \equiv 0 \pmod{3}</math>.
 +
Thus, <math>d \equiv 0 \pmod{3}</math>.
 +
This implies <math>d^2 \equiv 0 \pmod{9}</math>.
 +
 +
We also have <math>438^2 \equiv 0 \pmod{9}</math>.
 +
Hence, <math>3 b^2 \equiv 0 \pmod{9}</math>.
 +
This implies <math>b \equiv 0 \pmod{3}</math>.
 +
 +
Denote <math>b = 3 p</math> and <math>d = 3 q</math>. Hence, <math>p < q \leq 3 p</math>.
 +
Hence, Equation (1) can be written as
 +
<cmath>
 +
\[
 +
q^2 + 3 p^2 = 146^2 . \hspace{1cm} (2)
 +
\]
 +
</cmath>
 +
 +
Now, we solve this equation.
 +
 +
First, we find an upper bound of <math>q</math>.
 +
 +
We have <math>q^2 + 3 p^2 \geq q^2 + 3 \left( \frac{q}{3} \right)^2 = \frac{4 q^2}{3}</math>.
 +
Hence, <math>\frac{4 q^2}{3} \leq 146^2</math>.
 +
Hence, <math>q \leq 73 \sqrt{3} < 73 \cdot 1.8 = 131.4</math>.
 +
Because <math>q</math> is an integer, we must have <math>q \leq 131</math>.
 +
 +
Second, we find a lower bound of <math>q</math>.
 +
 +
We have <math>q^2 + 3 p^2 < q^2 + 3 q^2 = 4 q^2</math>.
 +
Hence, <math>4 q^2 > 146^2</math>.
 +
Hence, <math>q > 73</math>.
 +
Because <math>q</math> is an integer, we must have <math>q \geq 74</math>.
 +
 +
Now, we find the integer solutions of <math>p</math> and <math>q</math> that satisfy Equation (2) with <math>74 \leq q \leq 131</math>.
 +
 +
First, modulo 9,
 +
<cmath>
 +
\begin{align*}
 +
q^2 & \equiv 146^2 - 3 p^2 \\
 +
& \equiv 4 - 3 \cdot ( 0 \mbox{ or } 1 ) \\
 +
& \equiv 4 \mbox{ or } 1 .
 +
\end{align*}
 +
</cmath>
 +
 +
Hence <math>q \equiv \pm 1, \pm 2 \pmod{9}</math>.
 +
 +
Second, modulo 5,
 +
<cmath>
 +
\begin{align*}
 +
q^2 & \equiv 146^2 - 3 p^2 \\
 +
& \equiv 1 + 2 p^2 \\
 +
& \equiv 1 + 2 \cdot ( 0 \mbox{ or } 1 \mbox{ or } -1 ) \\
 +
& \equiv 1 \mbox{ or } 3 \mbox{ or } - 1 .
 +
\end{align*}
 +
</cmath>
 +
 +
Because <math>q^2 \equiv 0 \mbox{ or } 1 \mbox{ or } - 1</math>, we must have <math>q^2 \equiv 1 \mbox{ or } - 1</math>.
 +
Hence, <math>5 \nmid q</math>.
 +
 +
Third, modulo 7,
 +
<cmath>
 +
\begin{align*}
 +
q^2 & \equiv 146^2 - 3 p^2 \\
 +
& \equiv 1 - 3 \cdot ( 0 \mbox{ or } 1 \mbox{ or } 5 \mbox{ or } 2 ) \\
 +
& \equiv 1 \mbox{ or } 2 \mbox{ or } 3 \mbox{ or } 5 .
 +
\end{align*}
 +
</cmath>
 +
 +
Because <math>q^2 \equiv 0 \mbox{ or } 1 \mbox{ or } 2 \mbox{ or } 4 \pmod{ 7 }</math>, we must have <math>q^2 \equiv 1 \mbox{ or } 2 \pmod{7}</math>.
 +
Hence, <math>q \equiv 1, 3, 4, 6 \pmod{7}</math>.
 +
 +
Given all conditions above, the possible <math>q</math> are 74, 83, 88, 92, 97, 101, 106, 109, 116, 118, 127.
 +
 +
By testing all these numbers, we find that the only solution is <math>q = 97</math>.
 +
This implies <math>p = 63</math>.
 +
 +
Hence, <math>b = 3p = 189</math> and <math>d = 3q = 291</math>.
 +
Hence, <math>c = \frac{d - b}{2} = 51</math>.
 +
 +
Therefore, the perimeter of <math>\triangle ABC</math> is <math>b + c + a = 189 + 51 + 219 = \boxed{\textbf{(459) }}</math>.
 +
 +
~Steven Chen (wwww.professorchenedu.com)
 +
 +
==Video Solution==
 +
 +
https://www.youtube.com/watch?v=kkous52vPps&t=3023s
 +
 +
~Steven Chen (wwww.professorchenedu.com)

Revision as of 00:06, 18 February 2022

Problem

Given $\triangle ABC$ and a point $P$ on one of its sides, call line $\ell$ the splitting line of $\triangle ABC$ through $P$ if $\ell$ passes through $P$ and divides $\triangle ABC$ into two polygons of equal perimeter. Let $\triangle ABC$ be a triangle where $BC = 219$ and $AB$ and $AC$ are positive integers. Let $M$ and $N$ be the midpoints of $\overline{AB}$ and $\overline{AC}$, respectively, and suppose that the splitting lines of $\triangle ABC$ through $M$ and $N$ intersect at $30^{\circ}$. Find the perimeter of $\triangle ABC$.

The Geometry Part - Solution 1

Consider the splitting line through $M$. Extend $D$ on ray $BC$ such that $CD=CA$. Then the splitting line bisects segment $BD$, so in particular it is the midline of triangle $ABD$ and thus it is parallel to $AD$. But since triangle $ACD$ is isosceles, we can easily see $AD$ is parallel to the angle bisector of $C$, so the splitting line is also parallel to this bisector, and similar for the splitting line through $N$. Some simple angle chasing reveals the condition is now equivalent to $\angle A=120^\circ$.

- MortemEtInteritum

The Geometry Part - Solution 2

Let $PM$ and $QN$ be the splitting lines. Reflect $B$ across $Q$ to be $B'$ and $C$ across $P$ to be $C'$. Take $S_B$ and $S_C$, which are spiral similarity centers on the other side of $BC$ as $A$ such that $\triangle S_BB'C \sim \triangle S_BBA$ and $\triangle S_CC'B \sim \triangle S_CCA$. This gets that because $\angle S_BCB = \angle S_BCB' = \angle S_BAB$ and $\angle S_CBC = \angle S_CBC' = \angle S_CAC$, then $S_B$ and $S_C$ are on $\triangle ABC$'s circumcircle. Now, we know that $\triangle S_BBB' \sim \triangle S_BAC$ and $\triangle S_CCC' \sim \triangle S_CAB$ so because $BA=B'C$ and $CA=C'B$, then $S_BB=SBB'$ and $S_CC=S_CC'$ and $S_BQ \perp BC$ and $S_CP \perp BC$.

We also notice that because $Q$ and $N$ correspond on $\triangle S_BBB'$ and $\triangle S_BAC$, and because $P$ and $M$ correspond on $\triangle S_CCC'$ and $\triangle S_CAB$, then the angle formed by $NQ$ and $BA$ is equal to the angle formed by $B'C$ and $NQ$ which is equal to $\angle BS_BQ = \angle QS_BB'$. Thus, $\angle CBA=2\angle CQN$. Similarly, $\angle BCA = 2\angle QPM$ and so $\angle CBA + \angle BCA = 2\angle PQN + 2\angle QPM = 60^{\circ}$ and $\angle A = 120^{\circ}$.

- kevinmathz

The NT Part

We now need to solve $a^2+ab+b^2 = 3^2\cdot 73^2$. A quick $(\bmod 9)$ check gives that $3\mid a$ and $3\mid b$. Thus, it's equivalent to solve $x^2+xy+y^2 = 73^2$.

Let $\omega$ be one root of $\omega^2+\omega+1=0$. Then, recall that $\mathbb Z[\omega]$ is the ring of integers of $\mathbb Q[\sqrt{-3}]$ and is a unique factorization domain. Notice that $N(x-y\omega) = (x-y\omega)(x-y\omega^2) = x^2-xy+y^2$. Therefore, it suffices to find an element of $\mathbb Z[\omega]$ with the norm $73^2$.

To do so, we factor $73$ in $\mathbb Z[\omega]$. Since it's $1\pmod 3$, it must split. A quick inspection gives $73 = (8-\omega)(8-\omega^2)$. Thus, $N(8-\omega) = 73$, so \begin{align*} 73^2 &= N((8-\omega)^2) \\ &= N(64 - 16\omega + \omega^2) \\ &= N(64 - 16\omega + (-1-\omega)) \\ &= N(63 - 17\omega), \end{align*}giving the solution $x=63$ and $y=17$, yielding $a=189$ and $b=51$, so the sum is $\boxed{459}$. Since $8-\omega$ and $8-\omega^2$ are primes in $\mathbb Z[\omega]$, the solution must divide $73^2$. One can then easily check that this is the unique solution.

- MarkBcc168

==Solution (Geometry + Number Theory)

Denote $BC = a$, $CA = b$, $AB = c$.

Let the splitting line of $\triangle ABC$ through $M$ (resp. $N$) crosses $\triangle ABC$ at another point $X$ (resp. $Y$).

WLOG, we assume $c \leq b$.

$\textbf{Case 1}$: $a \leq c \leq b$.

We extend segment $AB$ to $D$, such that $BD = a$. We extend segment $AC$ to $E$, such that $CE = a$.

In this case, $X$ is the midpoint of $AE$, and $Y$ is the midpoint of $AD$.

Because $M$ and $X$ are the midpoints of $AB$ and $AE$, respectively, $MX \parallel BE$. Because $N$ and $Y$ are the midpoints of $AC$ and $AD$, respectively, $NY \parallel CD$.

Because $CB = CE$, $\angle CBE =\angle CEB = \frac{\angle ACB}{2}$. Because $BC = BD$, $\angle BCD = \angle BDC = \frac{\angle ABC}{2}$.

Let $BE$ and $CD$ intersect at $O$. Because $MX \parallel BE$ and $NY \parallel CD$, the angle formed between lines $MX$ and $NY$ is congruent to $\angle BOD$. Hence, $\angle BOD = 30^\circ$ or $150^\circ$.

We have \begin{align*} \angle BOD & = \angle CBE + \angle BCD \\ & = \frac{\angle ACB}{2} + \frac{\angle ABC}{2} \\ & = 90^\circ - \frac{\angle A}{2} . \end{align*}

Hence, we must have $\angle BOD = 30^\circ$, not $150^\circ$. Hence, $\angle A = 120^\circ$.

This implies $a > b$ and $a >c$. This contradicts the condition specified for this case.

Therefore, this case is infeasible.

$\textbf{Case 2}$: $c \leq a \leq b$.

We extend segment $CB$ to $D$, such that $BD = c$. We extend segment $AC$ to $E$, such that $CE = a$.

In this case, $X$ is the midpoint of $AE$, and $Y$ is the midpoint of $CD$.

Because $M$ and $X$ are the midpoints of $AB$ and $AE$, respectively, $MX \parallel BE$. Because $N$ and $Y$ are the midpoints of $AC$ and $CD$, respectively, $NY \parallel AD$.

Because $CB = CE$, $\angle CBE =\angle CEB = \frac{\angle ACB}{2}$. Because $BA = BD$, $\angle BAD = \angle BDA = \frac{\angle ABC}{2}$.

Let $O$ be a point of $AC$, such that $BO \parallel AD$. Hence, $\angle OBC = \angle BDA = \frac{B}{2}$.

Because $MX \parallel BE$ and $NY \parallel AD$ and $AD \parallel BO$, the angle formed between lines $MX$ and $NY$ is congruent to $\angle OBE$. Hence, $\angle OBE = 30^\circ$ or $150^\circ$.

We have \begin{align*} \angle OBE & = \angle OBC + \angle CBE \\ & = \frac{\angle ABC}{2} + \frac{\angle ACB}{2} \\ & = 90^\circ - \frac{\angle A}{2} . \end{align*}

Hence, we must have $\angle OBE = 30^\circ$, not $150^\circ$. Hence, $\angle A = 120^\circ$.

This implies $a > b$ and $a >c$. This contradicts the condition specified for this case.

Therefore, this case is infeasible.

$\textbf{Case 3}$: $c \leq b \leq a$.

We extend segment $CB$ to $D$, such that $BD = c$. We extend segment $BC$ to $E$, such that $CE = b$.

In this case, $X$ is the midpoint of $BE$, and $Y$ is the midpoint of $CD$.

Because $M$ and $X$ are the midpoints of $AB$ and $BE$, respectively, $MX \parallel AE$. Because $N$ and $Y$ are the midpoints of $AC$ and $CD$, respectively, $NY \parallel AD$.

Because $CA = CE$, $\angle CAE =\angle CEB = \frac{\angle ACB}{2}$. Because $BA = BD$, $\angle BAD = \angle BDA = \frac{\angle ABC}{2}$.

Because $MX \parallel AE$ and $NY \parallel AD$, the angle formed between lines $MX$ and $NY$ is congruent to $\angle DAE$. Hence, $\angle DAE = 30^\circ$ or $150^\circ$.

We have \begin{align*} \angle DAE & = \angle BAD + \angle CAE + \angle BAC \\ & = \frac{\angle ABC}{2} + \frac{\angle ACB}{2} + \angle BAC \\ & = 90^\circ + \frac{\angle BAC}{2} . \end{align*}

Hence, we must have $\angle OBE = 150^\circ$, not $30^\circ$. Hence, $\angle BAC = 120^\circ$.

In $\triangle ABC$, by applying the law of cosines, we have \begin{align*} a^2 & = b^2 + c^2 - 2bc \cos \angle BAC\\ & =  b^2 + c^2 - 2bc \cos 120^\circ \\ & = b^2 + c^2 + bc . \end{align*}

Because $a = 219$, we have \[ b^2 + c^2 + bc  = 219^2 . \]

Now, we find integer solution(s) of this equation with $c \leq b$.

Multiplying this equation by 4, we get \[ \left( 2 c + b \right)^2 + 3 b^2 = 438^2 . \hspace{1cm} (1) \]

Denote $d = 2 c + b$. Because $c \leq b$, $b < d \leq 3 b$.

Because $438^2 - 3 b^2 \equiv 0 \pmod{3}$, $d^2 \equiv 0 \pmod{3}$. Thus, $d \equiv 0 \pmod{3}$. This implies $d^2 \equiv 0 \pmod{9}$.

We also have $438^2 \equiv 0 \pmod{9}$. Hence, $3 b^2 \equiv 0 \pmod{9}$. This implies $b \equiv 0 \pmod{3}$.

Denote $b = 3 p$ and $d = 3 q$. Hence, $p < q \leq 3 p$. Hence, Equation (1) can be written as \[ q^2 + 3 p^2 = 146^2 . \hspace{1cm} (2) \]

Now, we solve this equation.

First, we find an upper bound of $q$.

We have $q^2 + 3 p^2 \geq q^2 + 3 \left( \frac{q}{3} \right)^2 = \frac{4 q^2}{3}$. Hence, $\frac{4 q^2}{3} \leq 146^2$. Hence, $q \leq 73 \sqrt{3} < 73 \cdot 1.8 = 131.4$. Because $q$ is an integer, we must have $q \leq 131$.

Second, we find a lower bound of $q$.

We have $q^2 + 3 p^2 < q^2 + 3 q^2 = 4 q^2$. Hence, $4 q^2 > 146^2$. Hence, $q > 73$. Because $q$ is an integer, we must have $q \geq 74$.

Now, we find the integer solutions of $p$ and $q$ that satisfy Equation (2) with $74 \leq q \leq 131$.

First, modulo 9, \begin{align*} q^2 & \equiv 146^2 - 3 p^2 \\ & \equiv 4 - 3 \cdot ( 0 \mbox{ or } 1 ) \\ & \equiv 4 \mbox{ or } 1 . \end{align*}

Hence $q \equiv \pm 1, \pm 2 \pmod{9}$.

Second, modulo 5, \begin{align*} q^2 & \equiv 146^2 - 3 p^2 \\ & \equiv 1 + 2 p^2 \\ & \equiv 1 + 2 \cdot ( 0 \mbox{ or } 1 \mbox{ or } -1 ) \\ & \equiv 1 \mbox{ or } 3 \mbox{ or } - 1 . \end{align*}

Because $q^2 \equiv 0 \mbox{ or } 1 \mbox{ or } - 1$, we must have $q^2 \equiv 1 \mbox{ or } - 1$. Hence, $5 \nmid q$.

Third, modulo 7, \begin{align*} q^2 & \equiv 146^2 - 3 p^2 \\ & \equiv 1 - 3 \cdot ( 0 \mbox{ or } 1 \mbox{ or } 5 \mbox{ or } 2 ) \\ & \equiv 1 \mbox{ or } 2 \mbox{ or } 3 \mbox{ or } 5 . \end{align*}

Because $q^2 \equiv 0 \mbox{ or } 1 \mbox{ or } 2 \mbox{ or } 4 \pmod{ 7 }$, we must have $q^2 \equiv 1 \mbox{ or } 2 \pmod{7}$. Hence, $q \equiv 1, 3, 4, 6 \pmod{7}$.

Given all conditions above, the possible $q$ are 74, 83, 88, 92, 97, 101, 106, 109, 116, 118, 127.

By testing all these numbers, we find that the only solution is $q = 97$. This implies $p = 63$.

Hence, $b = 3p = 189$ and $d = 3q = 291$. Hence, $c = \frac{d - b}{2} = 51$.

Therefore, the perimeter of $\triangle ABC$ is $b + c + a = 189 + 51 + 219 = \boxed{\textbf{(459) }}$.

~Steven Chen (wwww.professorchenedu.com)

Video Solution

https://www.youtube.com/watch?v=kkous52vPps&t=3023s

~Steven Chen (wwww.professorchenedu.com)