LxYxvv commited on
Commit
06f23b9
·
verified ·
1 Parent(s): 60a457b

Add data for Balkan shortlist (#11)

Browse files

- add balkan shortlist 2016-2019/2021 pdf file (acea8e092776204a892527271e9ddb7f03cf9151)
- add segmented Balkan shortlist 2016-2021 problems and solutions (b348f51ca30614a8fd3fda5a1d5a53b59e3aeac3)

Balkan_Shortlist/download_script/download.py ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -----------------------------------------------------------------------------
2
+ # Author: Jiawei Liu
3
+ # Date: 2024-12-7
4
+ # -----------------------------------------------------------------------------
5
+ '''
6
+ Download script for APMO
7
+ To run:
8
+ `python Balkan_Shortlist/download_script/download.py`
9
+ '''
10
+
11
+ import requests
12
+ from bs4 import BeautifulSoup
13
+ from tqdm import tqdm
14
+ from pathlib import Path
15
+ from requests.adapters import HTTPAdapter
16
+ from urllib3.util.retry import Retry
17
+ from urllib.parse import urljoin
18
+
19
+
20
+ def build_session(
21
+ max_retries: int = 3,
22
+ backoff_factor: int = 2,
23
+ session: requests.Session = None
24
+ ) -> requests.Session:
25
+ """
26
+ Build a requests session with retries
27
+
28
+ Args:
29
+ max_retries (int, optional): Number of retries. Defaults to 3.
30
+ backoff_factor (int, optional): Backoff factor. Defaults to 2.
31
+ session (requests.Session, optional): Session object. Defaults to None.
32
+ """
33
+ session = session or requests.Session()
34
+ adapter = HTTPAdapter(max_retries=Retry(total=max_retries, backoff_factor=backoff_factor))
35
+ session.mount("http://", adapter)
36
+ session.mount("https://", adapter)
37
+ session.headers.update({
38
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"
39
+ })
40
+
41
+ return session
42
+
43
+
44
+ def d1(output_dir: Path, req_session: requests.Session):
45
+ base_url = "https://imomath.com/srb/index.cgi?page=zadaciSaTakmichenja"
46
+
47
+ resp = req_session.get(base_url)
48
+ soup = BeautifulSoup(resp.text, 'html.parser')
49
+
50
+ pdf_link_eles = soup.find_all('a', href=lambda h: h and h.endswith('bmo_shortlist.pdf'))
51
+
52
+ for pdf_link_ele in tqdm(pdf_link_eles, desc="Downloading(2016-2019)"):
53
+ pdf_link = pdf_link_ele['href']
54
+
55
+ output_file = output_dir / f"en-{Path(pdf_link).name}"
56
+ if output_file.exists():
57
+ continue
58
+
59
+ pdf_resp = req_session.get(urljoin(base_url, pdf_link))
60
+ if pdf_resp.status_code != 200:
61
+ print(f"Failed to download {pdf_link}")
62
+ continue
63
+
64
+ output_file.write_bytes(pdf_resp.content)
65
+
66
+
67
+ def d2(output_dir: Path, req_session: requests.Session):
68
+ links = {
69
+ "en-2021_bmo_shortlist.pdf": "https://www.matematickitalent.mk/uploads/books/i9plahMgjUuYmBYY2FHfxg.pdf"
70
+ }
71
+
72
+ for output_file, link in tqdm(links.items(), desc="Downloading(Extra)"):
73
+ output_file = output_dir / output_file
74
+ if output_file.exists():
75
+ continue
76
+
77
+ resp = req_session.get(link)
78
+ if resp.status_code != 200:
79
+ print(f"Failed to download {link}")
80
+ continue
81
+
82
+ output_file.write_bytes(resp.content)
83
+
84
+
85
+ def main():
86
+ req_session = build_session()
87
+
88
+ output_dir = Path(__file__).parent.parent / "raw"
89
+ output_dir.mkdir(parents=True, exist_ok=True)
90
+
91
+ d1(output_dir, req_session)
92
+ d2(output_dir, req_session)
93
+
94
+
95
+ if __name__ == "__main__":
96
+ main()
Balkan_Shortlist/md/en-2016_bmo_shortlist.md ADDED
@@ -0,0 +1,683 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## $33^{\text {rd }}$ Balkan Mathematical Olympiad 05-10 May 2016 Tirana, Albania
2
+
3
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-01.jpg?height=874&width=1575&top_left_y=791&top_left_x=248)
4
+
5
+ 05-10 May 2016 Tirana, Albania
6
+
7
+ # Shortlisted problems and solutions
8
+
9
+ # $33^{\text {rd }}$ Balkan Mathematical Olympiad <br> 05-10 May 2016 <br> Tirana, Albania
10
+
11
+ Shortlisted problems and solutions
12
+
13
+ ## Note of confidentiality
14
+
15
+ The shortlisted problems should be kept strictly confidential until BMO 2017.
16
+
17
+ ## Contributing countries
18
+
19
+ The Organizing Committee and Problem Selection Committee of BMO 2016 wish to thank the following countries for contributing with problem proposals:
20
+
21
+ Bulgaria
22
+ Cyprus
23
+ Former Yugoslav Republic of Macedonia
24
+ Greece
25
+ Moldova
26
+ Romania
27
+ Serbia
28
+ Turkey
29
+
30
+ ## Problem Selection Committee
31
+
32
+ Chairman: Fatmir Hoxha<br>Vice Chairman: Enkel Hysnelaj<br>Members: Llukan Puka<br>Artur Baxhaku<br>Elton Bojaxhiu
33
+
34
+ ## Contents
35
+
36
+ 1 Algebra ..... 5
37
+ A1. ..... 5
38
+ A2. ..... 6
39
+ A3. ..... 7
40
+ A4. ..... 8
41
+ A5. ..... 9
42
+ A6. ..... 10
43
+ A7. ..... 11
44
+ A8. ..... 12
45
+ Combinatorics ..... 13
46
+ C1. ..... 13
47
+ C2. ..... 14
48
+ C3. ..... 15
49
+ Geometry ..... 17
50
+ G1. ..... 17
51
+ G2. ..... 19
52
+ G3. ..... 21
53
+ Number theory ..... 23
54
+ N1. ..... 23
55
+ N2. ..... 24
56
+ N3. ..... 25
57
+ N4. ..... 26
58
+ N5. ..... 27
59
+
60
+ ## 1 Algebra
61
+
62
+ A1.
63
+ Let $a, b, c$ be positive real numbers. Prove that
64
+
65
+ $$
66
+ \sqrt{a^{3} b+a^{3} c}+\sqrt{b^{3} c+b^{3} a}+\sqrt{c^{3} a+c^{3} b} \geq \frac{4}{3}(a b+b c+c a)
67
+ $$
68
+
69
+ Solution. W.L.O.G. $a \geq b \geq c$.
70
+
71
+ $$
72
+ \begin{gathered}
73
+ a \geq b \geq c \Rightarrow a b \geq a c \geq b c \Rightarrow a b+a c \geq a b+b c \geq a c+b c \Rightarrow \sqrt{a b+a c} \geq \sqrt{b c+b a} \geq \sqrt{a c+b c} \\
74
+ \sqrt{a^{3} b+a^{3} c}+\sqrt{b^{3} c+b^{3} a}+\sqrt{c^{3} a+c^{3} b}=a \sqrt{a b+a c}+b \sqrt{b c+b a}+c \sqrt{c a+c b} \geq \\
75
+ \frac{(a+b+c)}{3}(\sqrt{a b+a c}+\sqrt{b c+b a}+\sqrt{c a+c b})=\frac{(a+b+c)}{3}(\sqrt{a(b+c)}+\sqrt{b(c+a)}+\sqrt{c(a+b)}) \geq \\
76
+ \frac{(a+b+c)}{3}\left(\frac{2 a(b+c)}{a+b+c}+\frac{2 b(c+a)}{b+c+a}+\frac{c(a+b)}{c+a+b}\right)=\frac{(a+b+c)}{3} \frac{4(a b+b c+c a)}{a+b+c}=\frac{4}{3}(a b+b c+c a)
77
+ \end{gathered}
78
+ $$
79
+
80
+ (1) Chebyshev's inequality
81
+ (2) $\mathrm{GM} \geq \mathrm{HM}$
82
+
83
+ A2.
84
+ For all $x, y, z>0$ satisfying $\frac{x}{y z}+\frac{y}{z x}+\frac{z}{x y} \leq x+y+z$, prove that
85
+
86
+ $$
87
+ \frac{1}{x^{2}+y+z}+\frac{1}{y^{2}+z+x}+\frac{1}{z^{2}+x+y} \leq 1
88
+ $$
89
+
90
+ ## Solution.
91
+
92
+ By Cauchy-Schwarz inequality, we have
93
+
94
+ $$
95
+ \left(x^{2}+y+z\right)\left(y^{2}+y z^{2}+z x^{2}\right) \geq(x y+y z+z x)^{2}
96
+ $$
97
+
98
+ and hence we obtain that
99
+
100
+ $$
101
+ \frac{1}{x^{2}+y+z}+\frac{1}{y^{2}+z+x}+\frac{1}{z^{2}+x+y} \leq \frac{2\left(x y^{2}+y z^{2}+z x^{2}\right)+x^{2}+y^{2}+z^{2}}{(x y+y z+z x)^{2}}
102
+ $$
103
+
104
+ Using the condition $\frac{x}{y z}+\frac{y}{z x}+\frac{z}{x y} \leq x+y+z$, we also have
105
+
106
+ $$
107
+ x^{2}+y^{2}+z^{2} \leq x y z(x+y+z)
108
+ $$
109
+
110
+ and hence
111
+
112
+ $$
113
+ 2\left(x^{2}+y^{2}+z^{2}\right)+x^{2} y^{2}+y^{2} z^{2}+z^{2} x^{2} \leq(x y+y z+z x)^{2} .
114
+ $$
115
+
116
+ Finally, by AM-GM
117
+
118
+ $$
119
+ x^{2}+z^{2} x^{2} \geq 2 z x^{2}
120
+ $$
121
+
122
+ which yields that
123
+
124
+ $$
125
+ 2\left(x^{2}+y^{2}+z^{2}\right)+x^{2} y^{2}+y^{2} z^{2}+z^{2} x^{2} \geq 2\left(x y^{2}+y z^{2}+z x^{2}\right)+x^{2}+y^{2}+z^{2}
126
+ $$
127
+
128
+ Using (1), (2) and (3), we are done.
129
+
130
+ ## A3.
131
+
132
+ Find all monotonic functions $f: \mathbb{R} \rightarrow \mathbb{R}$ satisfying the condition: for every real number $x$ and every natural number $n$
133
+
134
+ $$
135
+ \left|\sum_{i=1}^{n} i\left(f(x+i+1)-f^{2}(x+i)\right)\right|<C
136
+ $$
137
+
138
+ where $C>0$ is independent of $x$ and $f^{2}(x)=f(f(x))$.
139
+ Solution. From the condition of the problem we get $\left|\sum_{i=1}^{n-1} i\left(f(x+i+1)-f^{2}(x+i)\right)\right|<C$. Then $\left|n\left(f(x+n+1)-f^{2}(x+n)\right)\right|=\left|\sum_{i=1}^{n} i\left(f(x+i+1)-f^{2}(x+i)\right)-\sum_{i=1}^{n-1} i\left(f(x+i+1)-f^{2}(x+i)\right)\right|<2 C$ implying $\left|f(x+n+1)-f^{2}(x+n)\right|<\frac{2 C}{n}$ for every real number $x$ and every natural number $n$. Let $y \in \mathbb{R}$ be arbitrary. Then there exists $x$ such that $y=x+n$. We obtain $\left|f(y+1)-f^{2}(y)\right|<\frac{2 C}{n}$ for every real number $y$ and every natural number $n$. The last inequality holds for every natural number $n$ from where $f(y+1)=f^{2}(y)$ for every $y \in \mathbb{R}$. The function $f$ is monotonic which implies that it is an injection and the latter implies $f(y)=y+1$.
140
+
141
+ ## A4.
142
+
143
+ The positive real numbers $a, b, c$ satisfy the equality $a+b+c=1$. For every natural number $n$ find the minimal possible value of the expression
144
+
145
+ $$
146
+ E=\frac{a^{-n}+b}{1-a}+\frac{b^{-n}+c}{1-b}+\frac{c^{-n}+a}{1-c}
147
+ $$
148
+
149
+ Solution. We transform the first term of the expression $E$ in the following way:
150
+
151
+ $$
152
+ \begin{aligned}
153
+ \frac{a^{-n}+b}{1-a}=\frac{1+a^{n} b}{a^{n}(b+c)}=\frac{a^{n+1}+a^{n} b+1-a^{n+1}}{a^{n}(b+c)} & =\frac{a^{n}(a+b)+(1-a)\left(1+a+a^{2}+\ldots+a^{n}\right)}{a^{n}(b+c)} \\
154
+ \frac{a^{n}(a+b)}{a^{n}(b+c)}+\frac{(b+c)\left(1+a+a^{2}+\ldots+a^{n}\right)}{a^{n}(b+c)} & =\frac{a+b}{b+c}+1+\frac{1}{a}+\frac{1}{a^{2}}+\ldots+\frac{1}{a^{n}}
155
+ \end{aligned}
156
+ $$
157
+
158
+ Analogously, we obtain
159
+
160
+ $$
161
+ \begin{aligned}
162
+ & \frac{b^{-n}+c}{1-b}=\frac{b+c}{c+a}+1+\frac{1}{b}+\frac{1}{b^{2}}+\ldots+\frac{1}{b^{n}} \\
163
+ & \frac{c^{-n}+a}{1-c}=\frac{c+a}{a+b}+1+\frac{1}{c}+\frac{1}{c^{2}}+\ldots+\frac{1}{c^{n}}
164
+ \end{aligned}
165
+ $$
166
+
167
+ The expression $E$ can be written in the form
168
+
169
+ $$
170
+ E=\frac{a+b}{b+c}+\frac{b+c}{c+a}+\frac{c+a}{a+b}+3+\left(\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\right)+\left(\frac{1}{a^{2}}+\frac{1}{b^{2}}+\frac{1}{c^{2}}\right)+\ldots+\left(\frac{1}{a^{n}}+\frac{1}{b^{n}}+\frac{1}{c^{n}}\right)
171
+ $$
172
+
173
+ By virtue of the inequalities $\quad \frac{a+b}{b+c}+\frac{b+c}{c+a}+\frac{c+a}{a+b} \geq 3 \sqrt{\frac{a+b}{b+c} \cdot \frac{b+c}{c+a} \cdot \frac{c+a}{a+b}}=3$
174
+ and $\quad m_{k}=\left(\frac{a^{k}+b^{k}+c^{k}}{3}\right)^{\frac{1}{k}} \leq m_{1}=\frac{a+b+c}{3}=\frac{1}{3}$ for every $k=-1,-2,-3, \ldots,-n$, we have $\quad \frac{1}{a^{m}}+\frac{1}{b^{m}}+\frac{1}{c^{m}} \geq 3^{m+1}$ for every $m=1,2, \ldots, m$ and
175
+
176
+ $$
177
+ E=3+3+3^{2}+\ldots+3^{n+1}=2+\frac{3^{n+2}-1}{2}=\frac{3^{n+2}+3}{3}
178
+ $$
179
+
180
+ For $a=b=c=\frac{1}{3}$ we obtain $E=\frac{3^{n+2}+3}{3}$. So, $\min E=\frac{3^{n+2}+3}{3}$.
181
+ Remark(PSC): The original solution received from the PSC contained some typos, the correct result is $\min E=\frac{3^{n+2}+3}{2}$.
182
+
183
+ ## A5.
184
+
185
+ Let $a, b, c$ and $d$ be real numbers such that $a+b+c+d=2$ and $a b+b c+c d+d a+a c+b d=0$.
186
+ Find the minimum value and the maximum value of the product $a b c d$.
187
+ Solution. Let's find the minimum first.
188
+
189
+ $$
190
+ a^{2}+b^{2}+c^{2}+d^{2}=(a+b+c+d)^{2}-2(a b+b c+c d+d a+a c+b d)=4
191
+ $$
192
+
193
+ By AM-GM, $4=a^{2}+b^{2}+c^{2}+d^{2} \geq 4 \sqrt{|a b c d|} \Rightarrow 1 \geq|a b c d| \Rightarrow a b c d \geq-1$.
194
+ Note that if $a=b=c=1$ and $d=-1$, then $a b c d=-1$.
195
+ We'll find the maximum. We search for $a b c d>0$.
196
+ Obviously, the numbers $a, b, c$ and $d$ can not be all positive or all negative.
197
+ WLOG $a, b>0$ and $c, d<0$. Denote $-c=x,-d=y$.
198
+ We have $a, b, x, y>0, a+b-x-y=2$ and $a^{2}+b^{2}+x^{2}+y^{2}=4$. We need to find $\max (a b x y)$. We get: $x+y=a+b-2$ and $x^{2}+y^{2}=4-\left(a^{2}+b^{2}\right)$. Since $(x+y)^{2} \leq 2\left(x^{2}+y^{2}\right)$, then $2\left(a^{2}+b^{2}\right)+(a+b-2)^{2} \leq 8 ;$ on the other hand, $(a+b)^{2} \leq 2\left(a^{2}+b^{2}\right) \Rightarrow(a+b)^{2}+(a+b-2)^{2} \leq 8$.
199
+ Let $a+b=2 s \Rightarrow 2 s^{2}-2 s-1 \leq 0 \Rightarrow s \leq \frac{\sqrt{3}+1}{2}=k$.
200
+ But $a b \leq s^{2} \Rightarrow a b \leq k^{2}$.
201
+ Now $a+b=x+y+2$ and $a^{2}+b^{2}=4-\left(x^{2}+y^{2}\right)$. Since $(a+b)^{2} \leq 2\left(a^{2}+b^{2}\right)$, then $2\left(x^{2}+y^{2}\right)+(x+y+2)^{2} \leq 8$; on the other hand, $(x+y)^{2} \leq 2\left(x^{2}+y^{2}\right) \Rightarrow$
202
+ $\Rightarrow(x+y)^{2}+(x+y+2)^{2} \leq 8$. Let $x+y=2 q \Rightarrow 2 q^{2}+2 q-1 \leq 0 \Rightarrow q \leq \frac{\sqrt{3}-1}{2}=\frac{1}{2 k}$.
203
+ But $x y \leq q^{2} \Rightarrow x y \leq \frac{1}{4 k^{2}}$.
204
+ In conclusion, $a b x y \leq k^{2} \cdot \frac{1}{4 k^{2}}=\frac{1}{4} \Rightarrow a b c d \leq \frac{1}{4}$.
205
+ Note that if $a=b=k$ and $c=d=-\frac{1}{2 k}$, then $a b c d=\frac{1}{4}$
206
+ In conclusion, $\min (a b c d)=-1$ and $\max (a b c d)=\frac{1}{4}$.
207
+
208
+ ## A6.
209
+
210
+ Prove that there is no function from positive real numbers to itself, $f:(0,+\infty) \rightarrow(0,+\infty)$ such that:
211
+
212
+ $$
213
+ f(f(x)+y)=f(x)+3 x+y f(y) \quad \text {,for every } \quad x, y \in(0,+\infty)
214
+ $$
215
+
216
+ Solution. First we prove that $f(x) \geq x$ for all $x>0$.
217
+ Indeed, if there is an $a>0$ with $f(a)<a$ then from the initial for $x=a$ and $y=a-f(a)>0$ we get that $3 a+(a-f(a)) f(a-f(a))=0$. This is absurd since $3 a+(a-f(a)) f(a-f(a))>0$.
218
+ So we have that
219
+
220
+ $$
221
+ f(x) \geq x \quad \text {,for all } \quad x>0
222
+ $$
223
+
224
+ Then using (1) we have that $f(x)+3 x+y f(x)=f(f(x)+y) \geq f(x)+y$, so
225
+
226
+ $$
227
+ 3 x+y f(y) \geq y \quad, \text { all } \quad x, y>0
228
+ $$
229
+
230
+ Suppose that $y f(y)<y$ for a $y>0$ and let $-y f(y)=b>0$ then for $x=\frac{b}{4}$ we get $\frac{3 b}{4}-b \geq 0$ so $b \leq 0$, absurd. So we have that $y f(y) \geq y$, for all $y>0$, and so
231
+
232
+ $$
233
+ f(y) \geq 1 \quad \text {,for all } \quad y>0
234
+ $$
235
+
236
+ Substituting $y$ with $f(y)$ at the initial we have that
237
+
238
+ $$
239
+ f(x)+3 x+f(y) f(f(y))=f(f(x)+f(y))
240
+ $$
241
+
242
+ and changing the roles of $x, y$ we have that:
243
+
244
+ $$
245
+ f(y)+3 y+f(x) f(f(x))=f(f(x)+f(x))
246
+ $$
247
+
248
+ So we have $f(x) f(f(x))-f(x)-3 x=f(y) f(f(y))-f(y)-3 y$, which means that the function $f(x) f(f(x))-$ $f(x)-3 x$ is constant. That means that there exist a constant $c$ such that
249
+
250
+ $$
251
+ f(x) f(f(x))=f(x)+3 x+c \quad \text {,for all } \quad x>0
252
+ $$
253
+
254
+ So we can write (6) in the form $f(x)(f(f(x))-1)=3 x+c$ and since $f(f(x))>1$ we have that $3 x+c \geq 0$, for all $x>0$. if $c<0$ then for $x=-\frac{c}{4}>0$ we get that $c>0$ which is absurd. So $c \geq 0$.
255
+ We write (6) in the form
256
+
257
+ $$
258
+ f(f(x))=1+\frac{3 x}{f(x)}+\frac{c}{f(x)}
259
+ $$
260
+
261
+ Since $c \geq 0$ then from (7) with the help of (1) and (3) we have that $f(f(x)) \leq 4+c$.
262
+ But from (1) we have that $f(f(x)) \geq f(x) \geq x$, for all $x \geq 0$, and so
263
+
264
+ $$
265
+ 4+c \geq f(f(x)) \geq x \quad \text {,for all } \quad x>0
266
+ $$
267
+
268
+ Taking $x=5+c$ we get that the last one cannot hold. So there is no such a function.
269
+
270
+ A7.
271
+ Find all integers $n \geq 2$ for which there exist the real numbers $a_{k}, 1 \leq k \leq n$, which are satisfying the following conditions:
272
+
273
+ $$
274
+ \sum_{k=1}^{n} a_{k}=0, \sum_{k=1}^{n} a_{k}^{2}=1 \text { and } \sqrt{n} \cdot\left(\sum_{k=1}^{n} a_{k}^{3}\right)=2(b \sqrt{n}-1), \text { where } b=\max _{1 \leq k \leq n}\left\{a_{k}\right\}
275
+ $$
276
+
277
+ Solution. We have: $\left(a_{k}+\frac{1}{\sqrt{n}}\right)^{2}\left(a_{k}-b\right) \leq 0 \Rightarrow\left(a_{k}^{2}+\frac{2}{\sqrt{n}} \cdot a_{k}+\frac{1}{n}\right)\left(a_{k}-b\right) \leq 0 \Rightarrow$
278
+
279
+ $$
280
+ a_{k}^{3} \leq\left(b-\frac{2}{\sqrt{n}}\right) \cdot a_{k}^{2}+\left(\frac{2 b}{\sqrt{n}}-\frac{1}{n}\right) \cdot a_{k}+\frac{b}{n} \forall \in\{1,2, \cdot, n\} \cdot(k)
281
+ $$
282
+
283
+ Adding up the inequalities ( $k$ ) we get
284
+
285
+ $$
286
+ \begin{gathered}
287
+ \sum_{k=1}^{n} a_{k}^{3} \leq\left(b-\frac{2}{\sqrt{n}}\right) \cdot\left(\sum_{k=1}^{n} a_{k}^{2}\right)+\left(\frac{2 b}{\sqrt{n}}-\frac{1}{n}\right) \cdot\left(\sum_{k=1}^{n} a_{k}\right)+b \leftrightarrow \\
288
+ \sum_{k=1}^{n} a_{k}^{3} \leq b-\frac{2}{\sqrt{n}}+b \leftrightarrow \sqrt{n} \cdot\left(\sum_{k=1}^{n} a_{k}^{3}\right) \leq 2(b \sqrt{n}-1) .
289
+ \end{gathered}
290
+ $$
291
+
292
+ But according to hypothesis,
293
+
294
+ $$
295
+ \sqrt{n} \cdot\left(\sum_{k=1}^{n} a_{k}^{3}\right)=2(b \sqrt{n}-1) .
296
+ $$
297
+
298
+ Hence is necessarily that
299
+
300
+ $$
301
+ \begin{gathered}
302
+ a_{k}^{3}=\left(b-\frac{2}{\sqrt{n}}\right) \cdot a_{k}^{2}+\left(\frac{2 b}{\sqrt{n}}-\frac{1}{n}\right) \cdot a_{k}+\frac{b}{n} \forall k \in\{1,2, \cdots, n\} \leftrightarrow \\
303
+ \left(a_{k}+\frac{1}{\sqrt{n}}\right)^{2}\left(a_{k}-b\right)=0 \forall k \in\{1,2, \cdots, n\} \leftrightarrow a_{k} \in\left\{-\frac{1}{\sqrt{n}}, b\right\} \forall k \in\{1,2, \cdots, n\}
304
+ \end{gathered}
305
+ $$
306
+
307
+ We'll prove that $b>0$. Indeed, if $b<0$ then $0=\sum_{k=1}^{n} a_{k} \leq n b<0$, which is absurd. If $b=0$, since $\sum_{k=1}^{n} a_{k}=0$, then $a_{k}=0 \forall k \in\{1,2, \cdots, n\} \Rightarrow 1=\sum_{k=1}^{n} a_{k}^{2}=0$, which is absurd.
308
+ In conclusion $b>0$.
309
+ If $a_{k}=-\frac{1}{\sqrt{n}} \forall k \in\{1,2, \cdots, n\}$ then $\sum_{k=1}^{n} a_{k}=-\sqrt{n}<0$, which is absurd and similarly if
310
+ $a_{k}=b \forall k \in\{1,2, \cdots, n\}$ then $\sum_{k=1}^{n} a_{k}=n b>0$, which is absurd. Hence $\exists m \in\{1,2, \cdots, n-1\}$
311
+ such that among the numbers $a_{k}$ we have $n-m$ equal to $-\frac{1}{\sqrt{n}}$ and $m$ equal to $b$. We get $\left\{\begin{array}{l}-\frac{n-m}{\sqrt{n}}+m b=0 \\ \frac{n-m}{n}+m b^{2}=1\end{array}\right.$.
312
+ From here, $b=\frac{n-m}{m \sqrt{n}} \Rightarrow \frac{n-m}{n}+\frac{(n-m)^{2}}{m n}=1 \Rightarrow$
313
+ $\Rightarrow n-m=m \Rightarrow m=\frac{n}{2}$. Hence $n$ is even.
314
+ Conversely, for any even integer $n \geq 2$ we get that there exist the real numbers $a_{k}, 1 \leq k \leq n$, such that
315
+
316
+ $$
317
+ \sum_{k=1}^{n} a_{k}=0, \sum_{k=1}^{n} a_{k}^{2}=1 \text { and } \sqrt{n} \cdot\left(\sum_{k=1}^{n} a_{k}^{3}\right)=2(b \sqrt{n}-1), \text { where } b=\max _{1 \leq k \leq n}\left\{a_{k}\right\}
318
+ $$
319
+
320
+ (We may choose for example $a_{1}=\cdots=a_{\frac{n}{2}}=-\frac{1}{\sqrt{n}}$ and $a_{\frac{n}{2}+1}=\cdots=a_{n}=\frac{1}{\sqrt{n}}$ ).
321
+
322
+ ## A8.
323
+
324
+ Find all functions $f: \mathbb{Z} \rightarrow \mathbb{Z}$ for which $f(g(n))-g(f(n))$ is independent on $n$ for any $g: \mathbb{Z} \rightarrow \mathbb{Z}$.
325
+ Solution. First observe that if $f(n)=n$, then $f(g(n))-g(f(n))=0$. Therefore the identity function satisfies the problem condition.
326
+
327
+ If there is $n_{0}$ with $f\left(n_{0}\right) \neq n_{0}$, consider the characteristic function $g$ that is defined as $g\left(f\left(n_{0}\right)\right)=1$ and $g(n)=0$ for $n \neq f\left(n_{0}\right)$. In this case, let $n \neq f\left(n_{0}\right)$ be arbirtrary. One has $f(g(n))-g(f(n))=$ $f\left(g\left(n_{0}\right)\right)-g\left(f\left(n_{0}\right)\right) \Rightarrow f(0)-g(f(n))=f(0)-g\left(f\left(n_{0}\right)\right) \Rightarrow g(f(n))=1 \Rightarrow f(n)=f\left(n_{0}\right)$.
328
+
329
+ Now, consider the very similar function $g$ that is defined as $g\left(f\left(n_{0}\right)\right)=a$ and $g(n)=b$ for $n \neq f\left(n_{0}\right)$, where $a, b$ are integers with $a \neq b \neq f\left(n_{0}\right)$. We have chosen $a, b$ so as to ensure that $f(a)=f\left(n_{0}\right)=f(b)$. Now, we find that $f\left(g\left(f\left(n_{0}\right)\right)\right)-g\left(f\left(f\left(n_{0}\right)\right)\right)=f\left(g\left(n_{0}\right)\right)-g\left(f\left(n_{0}\right)\right) \Rightarrow f(a)-g\left(f\left(f\left(n_{0}\right)\right)\right)=f(b)-$ $g\left(f\left(n_{0}\right)\right) \Rightarrow g\left(f\left(f\left(n_{0}\right)\right)\right)=g\left(f\left(n_{0}\right)\right)=a \Rightarrow f\left(f\left(n_{0}\right)\right)=f\left(n_{0}\right)$.
330
+
331
+ In summary, $f(n)=f\left(n_{0}\right)$ for any $n \neq f\left(n_{0}\right)$ and $f\left(f\left(n_{0}\right)\right)=f\left(n_{0}\right)$. Therefore $f$ is a constant function. Let us now see that a constant function indeed satisfies the problem condition: If $f(n)=c$ for all $n, f(g(n))-g(f(n))=c-g(c)$ is independent of $n$.
332
+
333
+ The answers are the identity function $f(n)=n$ and the constant functions $f(n)=c$.
334
+
335
+ ## Combinatorics
336
+
337
+ ## C1.
338
+
339
+ Let positive integers $K$ and $d$ be given. Prove that there exists a positive integer $n$ and a sequence of $K$ positive integers $b_{1}, b_{2}, \ldots, b_{K}$ such that the number $n$ is a $d$-digit palindrome in all number bases $b_{1}, b_{2}, \ldots, b_{K}$.
340
+
341
+ Solution. Let a positive integer $d$ be given. We shall prove that, for each large enough $n$, the number $(n!)^{d-1}$ is a $d$-digit palindrome in all number bases $\frac{n!}{i}-1$ for $1 \leqslant i \leqslant n$. In particular, we shall prove that the digit expansion of $(n!)^{d-1}$ in the base $\frac{n!}{i}-1$ is
342
+
343
+ $$
344
+ \left\langle i^{d-1}\binom{d-1}{d-1}, i^{d-1}\binom{d-1}{d-2}, i^{d-1}\binom{d-1}{d-3}, \ldots, i^{d-1}\binom{d-1}{1}, i^{d-1}\binom{d-1}{0}\right\rangle_{\frac{n!}{i}-1}
345
+ $$
346
+
347
+ We first show that, for each large enough $n$, all these digits are smaller than the considered base, that is, they are indeed digits in that base. It is enough to check this assertion for $i=n$, that is, to show the inequality $n^{d-1}\binom{d-1}{j}<(n-1)$ ! -1 . However, since for a fixed $d$ the right-hand side clearly grows faster than the left-hand side, this is indeed true for all large enough $n$.
348
+
349
+ Everything that is left is to evaluate:
350
+
351
+ $$
352
+ \begin{aligned}
353
+ \sum_{j=0}^{d-1} i^{d-1}\binom{d-1}{j}\left(\frac{n!}{i}-1\right)^{j} & =i^{d-1} \sum_{j=0}^{d-1}\binom{d-1}{j}\left(\frac{n!}{i}-1\right)^{j}=i^{d-1} \sum_{j=0}^{d-1}\binom{d-1}{j}\left(\frac{n!}{i}-1\right)^{j} \\
354
+ & =i^{d-1}\left(\frac{n!}{i}-1+1\right)^{d-1}=(n!)^{d-1}
355
+ \end{aligned}
356
+ $$
357
+
358
+ which completes the proof.
359
+
360
+ ## C2.
361
+
362
+ There are 2016 costumers who entered a shop on a particular day. Every customer entered the shop exactly once. (i.e. the customer entered the shop, stayed there for some time and then left the shop without returning back.)
363
+ Find the maximal $k$ such that the following holds:
364
+ There are $k$ customers such that either all of them were in the shop at a specific time instance or no two of them were both in the shop at any time instance.
365
+
366
+ Solution. We show that the maximal $k$ is 45 .
367
+ First we show that no larger $k$ can be achieved: We break the day at 45 disjoint time intervals and assume that at each time interval there were exactly 45 costumers who stayed in the shop only during that time interval (except in the last interval in which there were only 36 customers). We observe that there are no 46 people with the required property.
368
+ Now we show that $k=45$ can be achieved: Suppose that customers $C_{1}, C_{2}, \ldots, C_{2016}$ visited the shop in this order. (If two or more customers entered the shop at exactly the same time then we break ties arbitrarily.)
369
+ We define groups $A_{1}, A_{2}, \ldots$ of customers as follows: Starting with $C_{1}$ and proceeding in order, we place customer $C_{j}$ into the group $A_{i}$ where $i$ is the smallest index such that $A_{i}$ contains no customer $C_{j^{\prime}}$ with $j^{\prime}<j$ and such that $C_{j^{\prime}}$ was inside the shop once $C_{j}$ entered it.
370
+ Clearly no two customers who are in the same group were inside the shop at the exact same time. So we may assume that every $A_{i}$ has at most 45 customers. Since $44 \cdot 45<2016$, by the pigeonhole principle there must be at least 45 (non-empty) groups.
371
+ Let $C_{j}$ be a person in group $A_{45}$ and suppose that $C_{j}$ entered the shop at time $t_{j}$. Since we placed $C_{j}$ in group $A_{45}$ this means that for each $i<45$, there is a $j_{i}<j$ such that $C_{j_{i}} \in A_{i}$ and $C_{j_{i}}$ is still inside the shop at time $t_{j}$.
372
+
373
+ Thus we have found a specific time instance, namely $t_{j}$, during which at least 45 customers were all inside the shop.
374
+ Note: Instead of asking for the maximal $k$, an easier version is the following:
375
+ Show that there are 45 customers such that either all of them were in the shop at a specific time instance or no two of them were both in the shop at any time instance.
376
+
377
+ ## C3.
378
+
379
+ The plane is divided into unit squares by means of two sets of parallel lines. The unit squares are coloured in 1201 colours so that no rectangle of perimeter 100 contains two squares of the same colour. Show that no rectangle of size $1 \times 1201$ contains two squares of the same colour.
380
+
381
+ Solution. Let the centers of the unit squares be the integer points in the plane, and denote each unit square by the coordinates of its center.
382
+
383
+ Consider the set $D$ of all unit squares $(x, y)$ such that $|x|+|y| \leq 24$. Any translate of $D$ is called a diamond.
384
+
385
+ Since any two unit squares that belong to the same diamond also belong to some rectangle of perimeter 100, a diamond cannot contain two unit squares of the same colour. Since a diamond contains exactly $24^{2}+25^{2}=1201$ unit squares, a diamond must contain every colour exactly once.
386
+ Choose one colour, say, green, and let $a_{1}, a_{2}, \ldots$ be all green unit squares. Let $P_{i}$ be the diamond of center $a_{i}$. We will show that no unit square is covered by two $P$ 's and that every unit square is covered by some $P_{i}$.
387
+
388
+ Indeed, suppose first that $P_{i}$ and $P_{j}$ contain the same unit square $b$. Then their centers lie within the same rectangle of perimeter 100, a contradiction.
389
+
390
+ Let, on the other hand, $b$ be an arbitrary unit square. The diamond of center $b$ must contain some green unit square $a_{i}$. The diamond $P_{i}$ of center $a_{i}$ will then contain $b$.
391
+
392
+ Therefore, $P_{1}, P_{2}, \ldots$ form a covering of the plane in exactly one layer. It is easy to see, though, that, up to translation and reflection, there exists a unique such covering. (Indeed, consider two neighbouring diamonds. Unless they fit neatly, uncoverable spaces of two unit squares are created near the corners: see Fig. 1.)
393
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-15.jpg?height=681&width=551&top_left_y=1508&top_left_x=787)
394
+
395
+ Figure 1:
396
+ Without loss of generality, then, this covering is given by the diamonds of centers $(x, y)$ such that $24 x+25 y$ is divisible by 1201. (See Fig. 2 for an analogous covering with smaller diamonds.) It follows from this that no rectangle of size $1 \times 1201$ can contain two green unit squares, and analogous reasoning works for the remaining colours.
397
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-16.jpg?height=752&width=991&top_left_y=182&top_left_x=567)
398
+
399
+ Figure 2:
400
+
401
+ Remark(PSC): The number of the unit squares in a diamond can be evaluated alternatively with the formula
402
+
403
+ $$
404
+ 2 \times(1+3+5+\ldots+47)+49=2 \times 24^{2}+49=1201
405
+ $$
406
+
407
+ ## Geometry
408
+
409
+ ## G1.
410
+
411
+ The point $M$ lies on the side $A B$ of the circumscribed quadrilateral $A B C D$. The points $I_{1}, I_{2}$, and $I_{3}$ are the incenters of $\triangle M B C, \triangle M C D$, and $\triangle M D A$. Show that the points $M, I_{1}, I_{2}$, and $I_{3}$ lie on a circle.
412
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-17.jpg?height=643&width=874&top_left_y=508&top_left_x=620)
413
+
414
+ Solution. Lemma. Let $I$ be the incenter of $\triangle A B C$ and let the points $P$ and $Q$ lie on the lines $A B$ and $A C$. Then the points $A, I, P$, and $Q$ lie on a circle if and only if
415
+
416
+ $$
417
+ \overline{B P}+\overline{C Q}=B C
418
+ $$
419
+
420
+ where $\overline{B P}$ equals $|B P|$ if $P$ lies in the ray $B A \rightarrow$ and $-|B P|$ if it does not, and similarly for $\overline{C Q}$.
421
+ Proof of the lemma. We shall only consider the case when $P$ and $Q$ lie in the segments $A B$ and $A C$. All other cases are treated analogously.
422
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-17.jpg?height=789&width=887&top_left_y=1519&top_left_x=619)
423
+
424
+ Suppose that $A, I, P$, and $Q$ lie on a circle. Let $D$ and $E$ be the contact points of the incircle of $\triangle A B C$ with $A B$ and $A C$. We have that $\angle P I Q=180^{\circ}-\alpha$, so $\angle D I P=\angle E I Q$ and, therefore, $\triangle D I P \simeq \triangle E I Q$. This gives us $D P=E Q$ and $B P+C Q=B D+C E=B C$, as needed.
425
+
426
+ The converse is established by following the foregoing chain of inequalities in reverse.
427
+
428
+ Let the circumcircle of $\triangle M I_{1} I_{3}$ meet the lines $A B, C M$, and $D M$ for the second time at $P, Q$, and $R$. By the lemma, $\overline{B P}+\overline{C Q}=B C$ and $\overline{D R}+\overline{A P}=D A$. Therefore, $\overline{C Q}+\overline{D R}=B C+D A-\overline{B P}-\overline{A P}=$ $B C+D A-A B$. Since $A B C D$ is circumscribed, this is equal to $C D$, and, by the lemma, the proof is complete.
429
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-18.jpg?height=475&width=874&top_left_y=413&top_left_x=623)
430
+
431
+ Second solution. Let $\omega_{1}, \omega_{2}$, and $\omega_{3}$ be the incircles of $\triangle M B C, \triangle M C D$, and $\triangle M D A$.
432
+ The common internal tangent $t_{1}$ of $\omega_{1}$ and $\omega_{2}$ equals
433
+ $\left[\right.$ tangent from $M$ to $\left.\omega_{2}\right]-\left[\right.$ tangent from $M$ to $\left.\omega_{1}\right]=\frac{1}{2}(M C+M D-C D-M B-M C+B C)$.
434
+ Analogously, the common internal tangent $t_{2}$ of $\omega_{2}$ and $\omega_{3}$ equals
435
+ $\left[\right.$ tangent from $M$ to $\left.\omega_{2}\right]-\left[\right.$ tangent from $M$ to $\left.\omega_{3}\right]=\frac{1}{2}(M C+M D-C D-M D-M A+D A)$.
436
+ Finally, the common external tangent $t_{3}$ of $\omega_{1}$ and $\omega_{3}$ equals
437
+ $\left[\right.$ tangent from $M$ to $\left.\omega_{1}\right]-\left[\right.$ tangent from $M$ to $\left.\omega_{3}\right]=\frac{1}{2}(M B+M C-B C+M D+M A-D A)$.
438
+ Since $A B C D$ is circumscribed, we have $A B+C D=B C+D A$, and, therefore, $t_{1}+t_{2}=t_{3}$. It follows from this that $\omega_{1}, \omega_{2}$, and $\omega_{3}$ have a common tangent $s$ (which separates $\omega_{2}$ from $\omega_{1}$ and $\omega_{3}$ ).
439
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-18.jpg?height=651&width=876&top_left_y=1409&top_left_x=622)
440
+
441
+ Let $\triangle M K L$ be the triangle formed by the lines $M C, M D$, and $s$. Then, since $I_{1} I_{2}$ and $I_{2} I_{3}$ are external angle bisectors in it, we have $\angle I_{1} I_{2} I_{3}=90^{\circ}-\frac{1}{2} \angle K M L=180^{\circ}-\angle I_{1} M I_{3}$ and, therefore, $M I_{1} I_{2} I_{3}$ is cyclic.
442
+ $\operatorname{Remark}(\mathbf{P S C}):$ In the first solution, the angle $\alpha$ refers to the angle $\angle B A C$.
443
+ $\operatorname{Remark}(\mathbf{P S C})$ : Referring to solution 1 , the inequality $t_{3} \leq t_{1}+t_{2}$ holds, the equality is possible if and only if the circles $\omega_{1}, \omega_{2}$, and $\omega_{3}$ have a common tangent.
444
+
445
+ Remark(PSC): This problem was selected as G1 relative to the other Geometry problems proposed. PSC thinks the difficulty level of this problem is medium.
446
+
447
+ G2.
448
+ Let $A B C D$ be a cyclic quadrilateral, with $A B<C D$, whose diagonals intersect at the point $F$ and $A D, B C$ intersect at the point $E$. Let also $K, L$ be the projections of $F$ onto the sides $A D, B C$ respectively, and $M, S, T$ be the midpoints of $E F, C F, D F$. Prove that the second intersection point of the circumcircles of the triangles $M K T, M L S$ lies on the side $C D$.
449
+
450
+ Solution. Let $N$ be the midpoint of $C D$. We will prove that the circumcircles of the triangles $M K T, M L S$ pass through $N$.
451
+ We will prove first that the circumcircle of $M L S$ passes through $N$.
452
+ Let $Q$ be the midpoint of $E C$. Note that the circumcircle of $M L S$ is the Euler circle of the triangle $E F C$, so it passes also through $Q .\left(^{*}\right)$
453
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-19.jpg?height=1001&width=1007&top_left_y=779&top_left_x=559)
454
+
455
+ We will prove that
456
+
457
+ $$
458
+ \angle S L Q=\angle Q N S
459
+ $$
460
+
461
+ Indeed, since $F L C$ is right-angled and $L S$ is its median, we have that $S L=S C$ and
462
+
463
+ $$
464
+ \angle S L C=\angle S C L=\angle A B C
465
+ $$
466
+
467
+ In addition, since $N, S$ are the midpoints of $D C, F C$ we have that $S N / / F D$.
468
+ And finally, $Q, S$ are the midpoints of $E C, C D$, so $Q N / / E D$.
469
+ It follows that the angles $\angle E D B$ and $\angle Q N S$ have parallel sides, and since $A B<C D$, they are acute, and as a result we have that
470
+
471
+ $$
472
+ \angle E D B=\angle Q N S
473
+ $$
474
+
475
+ But, from the cyclic quadrilateral $A B C D$, we get that
476
+
477
+ $$
478
+ \angle E D B=\angle A C B
479
+ $$
480
+
481
+ Now, from (2),(3) and (4) we obtain immediately (1), so $\angle S L Q=\angle Q N S$ and the quadrilateral $L N S Q$ is cyclic. Since from $\left(^{*}\right)$ this circle passes also through $M$, we get that the points $M, L, Q, S, N$ are co-cylic and this means that the circumcircle of $M L S$ passes through $N$.
482
+
483
+ Similarly, that the circumcircle of $M K T$ passes also through $N$ and we have the desired.
484
+
485
+ G3.
486
+ Given that $A B C$ is a triangle where $A B<A C$. On the half-lines $B A$ and $C A$ we take points $F$ and $E$ respectively such that $B F=C E=B C$. Let $M, N$ and $H$ be the mid-points of the segments $B F, C E$ and $B C$ respectively and $K$ and $O$ be the circumcircles of the triangles $A B C$ and $M N H$ respectively. We assume that $O K$ cuts $B E$ and $H N$ at the points $A_{1}$ and $B_{1}$ respectively and that $C_{1}$ is the point of intersection of $H N$ and $F E$. If the parallel line from $A_{1}$ to $O C_{1}$ cuts the line $F E$ at $D$ and the perpendicular from $A_{1}$ to the line $D B_{1}$ cuts $F E$ at the point $M_{1}$, prove that $E$ is the orthocenter of the triangle $A_{1} O M_{1}$.
487
+
488
+ Solution. The circumcenter of the triangle $\triangle M N H$ coincides with the incentre of the triangle $\triangle A B C$ because the triangles $\triangle B M H$ and $\triangle N H C$ are isosceles and therefore the perpendiculars of the $M H, H N$ are also the bisectors of the angles $\angle A B C, \angle A C B$, respectively.
489
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-21.jpg?height=976&width=849&top_left_y=775&top_left_x=611)
490
+
491
+ Let $G, I$ be the points of tangents of the incircle $(O, r)$ of the triangle $\triangle A B C$ with the sides $A B$ and $A C$ respectively. Now if $a, b, c$ are the sides of the triangle $\triangle A B C$ and $s$ the semiperimeter of the triangle , we have
492
+
493
+ $$
494
+ O F^{2}=O G^{2}+F G^{2}=r^{2}+(a-s+b)^{2}
495
+ $$
496
+
497
+ and
498
+
499
+ $$
500
+ O E^{2}=O I^{2}+E I^{2}=r^{2}+(a-s+c)^{2}
501
+ $$
502
+
503
+ Then
504
+
505
+ $$
506
+ O F^{2}-O E^{2}=\alpha(b-c)
507
+ $$
508
+
509
+ Applying two times the theorem of Stewarts at the triangles $\triangle K F B$ and $\triangle K A C$ we get
510
+
511
+ $$
512
+ F A \cdot K A^{2}+c \cdot K F^{2}=a \cdot K A^{2}+a c \cdot F A \quad \text { or } \quad K F^{2}=K A^{2}+a(a-c)
513
+ $$
514
+
515
+ and
516
+
517
+ $$
518
+ E A \cdot K E^{2}+\alpha \cdot K A^{2}=b \cdot K E^{2}+a b \cdot E A \quad \text { or } \quad K E^{2}=K A^{2}+a(b-a)
519
+ $$
520
+
521
+ From (2) and (3) we have
522
+
523
+ $$
524
+ K F^{2}-K E^{2}=a(a-c)-a(b-a)=\alpha(b-c)
525
+ $$
526
+
527
+ From (1),(4), because $O F^{2}-O E^{2}=K F^{2}-K E^{2}$ we have that $F E \perp O K$.
528
+
529
+ Let $J$ the point of intersection of $F E, O K$.
530
+ Because $A_{1} D / / O C_{1}$ we have
531
+
532
+ $$
533
+ \frac{J O}{J A_{1}}=\frac{J C_{1}}{J D}
534
+ $$
535
+
536
+ And since $A_{1} E / / H N$ we get
537
+
538
+ $$
539
+ \frac{J E}{J A_{1}}=\frac{J C_{1}}{J B_{1}}
540
+ $$
541
+
542
+ Therefore, we have
543
+
544
+ $$
545
+ \frac{J O}{J E}=\frac{J B_{1}}{J D}
546
+ $$
547
+
548
+ Thus, from the inverse of Thales theorem we have that $E O / / D B_{1}$, So
549
+
550
+ $$
551
+ A M_{1} \perp E O
552
+ $$
553
+
554
+ Consequently, the point $E$ is the orthocenter of the triangle $\triangle A_{1} O M_{1}$
555
+ Remark(PSC): Here in the solution the side $B C$ has been referred as $\alpha$ and $a$, which are equivalent.
556
+
557
+ ## Number theory
558
+
559
+ N1.
560
+ Find all natural numbers $n$ for which $1^{\phi(n)}+2^{\phi(n)}+\ldots+n^{\phi(n)}$ is coprime with $n$.
561
+ Solution. Consider the given expression $(\bmod p)$ where $p \mid n$ is a prime number. $p|n \Rightarrow p-1| \phi(n)$, thus for any $k$ that is not divisible by $p$, one has $k^{\phi(n)} \equiv 1(\bmod p)$. There are $n-\frac{n}{p}$ numbers among $1,2, \ldots, n$ that are not divisible by $p$. Therefore
562
+
563
+ $$
564
+ 1^{\phi(n)}+2^{\phi(n)}+\ldots+n^{\phi(n)} \equiv-\frac{n}{p} \quad(\bmod p)
565
+ $$
566
+
567
+ If the given expression is coprime with $n$, it is not divisible by $p$, so $p \nmid \frac{n}{p} \Rightarrow p^{2} X n$. This is valid for all prime divisors $p$ of $n$, thus $n$ must be square-free. On the other hand, if $n$ is square-free, one has $p^{2} \nmid n \Rightarrow p \nmid \frac{n}{p}$, hence the given expression is not divisible by $p$. Since this is valid for all prime divisors $p$ of $n$, the given two numbers are indeed coprime.
568
+
569
+ The answer is square-free integers.
570
+
571
+ N2.
572
+ Find all odd natural numbers $n$ such that $d(n)$ is the largest divisor of the number $n$ different from $n$ $(d(n)$ is the number of divisors of the number $n$ including 1 and $n$ ).
573
+
574
+ Solution. From $d(n)\left|n, \frac{n}{d(n)}\right| n$ one obtains $\frac{n}{d(n)} \leq d(n)$.
575
+ Let $n=p_{1}^{\alpha_{1}} p_{2}^{\alpha_{2}} \ldots p_{s}^{\alpha_{s}}$ where $p_{i}, 1 \leq i \leq s$ are prime numbers. The number $n$ is odd from where we get $p_{i}>2,1 \leq i \leq s$. The multiplicativity of the function $d(n)$ implies $d(n)=\left(1+\alpha_{1}\right) \ldots\left(1+\alpha_{s}\right)$.
576
+ From Bernoulli inequality, for every $p_{i}>3$ from the factorization of $n$, one obtain
577
+
578
+ $$
579
+ p_{i}^{\frac{\alpha_{i}}{2}}=\left(1+\left(p_{i}-1\right)\right)^{\frac{\alpha_{i}}{2}} \geq 1+\frac{\alpha_{i}}{2}\left(p_{i}-1\right)>1+\alpha_{i} \quad \text { and } \quad 3^{\frac{\beta}{2}} \geq 1+\beta
580
+ $$
581
+
582
+ The equality holds when $\beta=0, \beta=2$, and strict inequality for $\beta>2$. If $\beta=1$ and there is no prime number in the factorization of $n$, then $n=3, d(n)=2$, which is not a solution of the problem. If $\beta=1$ and there exist another prime in the factorization of $n$, then $n=3 p_{2}^{\alpha_{2}} \ldots p_{s}^{\alpha_{s}}>4\left(1+\alpha_{2}\right)^{2} \ldots\left(1+\alpha_{s}\right)^{2}$. Indeed, if there is $p_{i} \geq 7$ in the factorization, then $3 p_{i}^{\alpha_{i}}>4\left(1+\alpha_{i}\right)^{2}$ for every natural number $\alpha_{i}$. If the power of 5 in the factorization is bigger than 1 , then $3 \cdot p_{i}^{\alpha_{i}}>4\left(1+\alpha_{i}\right)^{2}$. Hence, if the power of 5 is 1 , then $n=3 \cdot 5=15, d(n)=4$, which again is not a solution. The conclusion is that $\beta \neq 1$.
583
+ Finaly, we obtain $\sqrt{n} \geq d(n)$ and equality holds when there is no $p_{i}>3$ in the factorization of $n$ and $n=3^{2}=9$.
584
+
585
+ N3.
586
+ Find all the integer solutions $(x, y, z)$ of the equation
587
+
588
+ $$
589
+ (x+y+z)^{5}=80 x y z\left(x^{2}+y^{2}+z^{2}\right)
590
+ $$
591
+
592
+ Solution. We directly check the identity
593
+
594
+ $$
595
+ (x+y+z)^{5}-(-x+y+z)^{5}-(x-y+z)^{5}-(x+y-z)^{5}=80 x y z\left(x^{2}+y^{2}+z^{2}\right)
596
+ $$
597
+
598
+ Therefore, if integers $x, y$ and $z$ satisfy the equation from the statement, we then have
599
+
600
+ $$
601
+ (-x+y+z)^{5}+(x-y+z)^{5}+(x+y-z)^{5}=0
602
+ $$
603
+
604
+ By Fermat's theorem at least one of the parenthesis equals 0 . Let, w.l.o.g., $x=y+z$. Then the previous equation reduces to $(2 z)^{5}+(2 y)^{5}=0$, which is equivalent to $y=-z$. Therefore, the solution set of the proposed equation is
605
+
606
+ $$
607
+ (x, y, z) \in\{(0, t,-t),(t, 0,-t),(t,-t, 0): t \in \mathbb{Z}\}
608
+ $$
609
+
610
+ Remark(PSC): Due to the volume of calculations that are involved in the solution of this problem, a more simplified version can be:
611
+
612
+ Find all the integer solutions $(x, y, z)$ of the equation
613
+
614
+ $$
615
+ (x+y+z)^{3}=24 x y z
616
+ $$
617
+
618
+ The solution would be similar to the one proposed in the original problem using the identity
619
+
620
+ $$
621
+ (x+y+z)^{3}-(-x+y+z)^{3}-(x-y+z)^{3}-(x+y-z)^{3}=24 x y z
622
+ $$
623
+
624
+ N4.
625
+ Find all monic polynomials $f$ with integer coefficients satisfying the following condition:
626
+ There exists a positive integer $N$ such that for every prime $p>N, p$ divides $2(f(p))!+1$.
627
+ Solution. From the divisibility relation $p \mid 2(f(p))!+1$ we conclude that:
628
+
629
+ $$
630
+ f(p)<p, \text { for all primes } p>N
631
+ $$
632
+
633
+ In fact, if for some prime number $p$ we have $f(p) \geq p$, then $p \mid(f(p))$ ! and then $p \mid 1$, which is absurd. Now suppose that $\operatorname{deg} f=m>1$. Then $f(x)=x^{m}+Q(x), \operatorname{deg} Q(x) \leq m-1$ and so $f(p)=p^{m}+Q(p)$. Hence for some large enough prime number $p$ holds that $f(p)>p$, which contradicts $\left({ }^{*}\right)$. Therefore we must have $\operatorname{deg} Q(x)=1$ and $Q(x)=x-a$, for some positive integer $a$. Thus the given condition becomes:
634
+
635
+ $$
636
+ p \mid 2(p-a)!+1
637
+ $$
638
+
639
+ But we have (using Wilsons theorem)
640
+
641
+ $$
642
+ \begin{gathered}
643
+ 2(p-3)!\equiv-(p-3)!(p-2) \equiv-(p-2)!\equiv-1(\bmod p) \\
644
+ \Rightarrow p \mid 2(p-3)!+1
645
+ \end{gathered}
646
+ $$
647
+
648
+ From (1) and (2) we get $(p-3)!\equiv(p-a)!(\bmod p)$. Since $p-3<p$ and $p-a<p$, we conclude that $a=3$ and $f(p)=p-3$, for every prime $p>N$. Finally, since the number of all these primes is infinite we conclude that $f(x)=x-3$, for all $x$.
649
+ Remark(PSC): There is a typo in the original solution received, the part of the solution $\operatorname{deg} Q(x)=1$ and $Q(x)=x-a$ should be replaced with $\operatorname{deg} f(x)=1$ and $f(x)=x-a$.
650
+
651
+ N5.
652
+ A positive integer $n$ is downhill if its decimal representation $\overline{a_{k} a_{k-1} \ldots a_{0}}$ satisfies $a_{k} \geq a_{k-1} \geq \ldots \geq a_{0}$. A real-coefficient polynomial $P$ is integer-valued if $P(n)$ is an integer for all integer $n$, and downhill-integervalued if $P(n)$ is an integer for all downhill positive integers $n$. Is it true that every downhill-integer-valued polynomial is also integer-valued?
653
+
654
+ Solution. No, it is not.
655
+ A downhill number can always be written as $a-b_{1}-b_{2}-\ldots-b_{9}$, where $a$ is of the form $99 \ldots 99$ and each $b_{i}$ either equals 0 or is of the form $\overline{11 \ldots 11}$.
656
+
657
+ Let $n$ be a positive integer. The numbers of the form $99 \ldots 99$ yield at most $n$ different remainders upon division by $2^{n}$, as do the numbers of the form $11 \ldots 11$. Therefore, downhill numbers yield at most $n(n+1)^{9}$ different remainders upon division by $2^{n}$.
658
+
659
+ Let $n$ be so large that $n(n+1)^{9}<2^{n}$. ( $n=63$ works: $63 \times 64^{9}<64^{10}=2^{60}<2^{63}$.) Let $0 \leq r<2^{n}$ be such that no downhill number is congruent to $r$ modulo $2^{n}$.
660
+
661
+ Consider the polynomial
662
+
663
+ $$
664
+ P(x)=\frac{1}{2 \times\left(2^{n}-1\right)!} \prod_{1 \leq i<2^{n}}(x-r+i) .
665
+ $$
666
+
667
+ We have that $P(r)=\frac{1}{2}$ is not an integer.
668
+ Let, then, $x$ be a downhill number. The number $(x-r+1) \ldots\left(x-r+2^{n}-1\right)$ is a multiple of $\left(2^{n}-1\right)$ ! (as a product of $2^{n}-1$ consecutive integers); therefore, $2 P(x)$ is an integer. On the other hand, the number $(x-r)(x-r+1) \ldots\left(x-r+2^{n}-1\right)$ ia a multiple of $2^{n}$ ! (as a product of $2^{n}$ consecutive integers); therefore, $2(x-r) P(x)$ is an integer multiple of $2^{n}$. Since $x$ is downhill, $x-r$ is not divisible by $2^{n}$. Therefore, $2 P(x)$ is even and $P(x)$ is an integer.
669
+
670
+ Alternative version. A positive integer $n$ is uphill if its decimal representation $\overline{a_{k} a_{k-1} \ldots a_{0}}$ satisfies $a_{k} \leq a_{k-1} \leq \ldots \leq a_{0}$. A real-coefficient polynomial $P$ is integer-valued if $P(n)$ is an integer for all integer $n$, and uphill-integer-valued if $P(n)$ is an integer for all uphill positive integers $n$. Is it true that every uphill-integer-valued polynomial is also integer-valued?
671
+
672
+ Solution. First we show that no uphill number is congruent to 10 modulo 11.
673
+ To this end, notice that an uphill number can always be written as $b_{1}+b_{2}+\ldots+b_{m}$, where $m \leq 9$, $b_{1} \leq b_{2} \leq \ldots \leq b_{m}$, and each $b_{i}$ is of the form $11 \ldots 11$. Since the remainder of each $b_{i}$ modulo 11 is either 0 or 1 , the remainder of $b_{1}+b_{2}+\ldots+b_{m}$ modulo 11 is at most 9 , as required.
674
+
675
+ Consider, then, the polynomial
676
+
677
+ $$
678
+ P(x)=\frac{1}{11} x(x-1) \cdots(x-9)
679
+ $$
680
+
681
+ It value is an integer at every uphill number; however, $P(10)$ is not an integer.
682
+ Remark(PSC): PSC believes the alternative version of this problem has medium as level of difficulty.
683
+
Balkan_Shortlist/md/en-2017_bmo_shortlist.md ADDED
@@ -0,0 +1,1260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## BMO
2
+
3
+ ## SHORT LIST PROBLEM WITH SOLUTION
4
+
5
+ 2017, May $02-07$<br>Ohrid, Macedonia
6
+
7
+ # PROBLEM SHORTLIST (with solutions)
8
+
9
+ Problem selection Committee<br>Risto Malcheski<br>Mirko Petrushevski<br>Pavel Dimovski<br>Daniel Velinov<br>Tomi Dimovski
10
+
11
+ May 2 - 7, 2017
12
+ Ohrid
13
+
14
+ ## Contents
15
+
16
+ ALGEBRA ..... 3
17
+ NUMBER THEORY ..... 12
18
+ GEOMETRY ..... 18
19
+ COMBINATORICS ..... 35
20
+
21
+ ## ALGEBRA
22
+
23
+ ## A1
24
+
25
+ Let $a, b, c$ be positive real numbers such that $a b c=1$. Prove that
26
+
27
+ $$
28
+ \frac{1}{a^{5}+b^{5}+c^{2}}+\frac{1}{b^{5}+c^{5}+a^{2}}+\frac{1}{c^{5}+a^{5}+b^{2}} \leq 1 .
29
+ $$
30
+
31
+ ## Solution
32
+
33
+ First we remark that
34
+
35
+ $$
36
+ a^{5}+b^{5} \geq a b\left(a^{3}+b^{3}\right)
37
+ $$
38
+
39
+ Indeed
40
+
41
+ $$
42
+ \begin{aligned}
43
+ a^{5}+b^{5} \geq a b\left(a^{3}+b^{3}\right) & \Leftrightarrow a^{5}-a^{4} b-a b^{4}+b^{5} \geq 0 \\
44
+ & \Leftrightarrow a^{4}(a-b)-b^{4}(a-b) \geq 0 \\
45
+ (a-b)\left(a^{4}-b^{4}\right) \geq 0 & \Leftrightarrow(a-b)^{2}\left(a^{2}+b^{2}\right)(a+b) \geq 0
46
+ \end{aligned}
47
+ $$
48
+
49
+ We rewrite the inequality as
50
+
51
+ $$
52
+ \frac{1}{a^{5}+b^{5}+a b c^{3}}+\frac{1}{b^{5}+c^{5}+b c a^{3}}+\frac{1}{c^{5}+a^{5}+c a b^{3}} \leq 1 .
53
+ $$
54
+
55
+ On the other hand the following inequality is true
56
+
57
+ $$
58
+ a^{5}+b^{5}+a b c^{3} \geq a b\left(a^{3}+b^{3}+c^{3}\right)
59
+ $$
60
+
61
+ and similar for the other two.
62
+ Finally, using AM-GM we get:
63
+
64
+ $$
65
+ \begin{aligned}
66
+ \frac{1}{a^{5}+b^{5}+c^{2}}+\frac{1}{b^{5}+c^{5}+a^{2}}+\frac{1}{c^{5}+a^{5}+b^{2}} & \leq \frac{1}{a^{3}+b^{3}+c^{3}}\left(\frac{1}{a b}+\frac{1}{b c}+\frac{1}{c a}\right)=\frac{a+b+c}{a^{3}+b^{3}+c^{3}} \\
67
+ & \leq \frac{a+b+c}{\frac{(a+b+c)^{3}}{9}}=\frac{9}{(a+b+c)^{2}} \leq \frac{9}{(3 \sqrt[3]{a b c})^{2}}=1
68
+ \end{aligned}
69
+ $$
70
+
71
+ ## A2
72
+
73
+ Consider the sequence of rational numbers defned by $x_{1}=\frac{4}{3}$ and $x_{n+1}=\frac{x_{n}^{2}}{x_{n}^{2}-x_{n}+1}, n \geq 1$.
74
+ Show that the numerator of the lowest term expression of each sum $\sum_{k=1}^{n} x_{k}$ is a perfect square.
75
+
76
+ ## Solution
77
+
78
+ It is easily seen that the $x_{n}$ are all rational numbers greater than 1 . Rewrite the recurrence formula in the form $x_{n}=\frac{1}{x_{n+1}-1}-\frac{1}{x_{n}-1}, n \geq 1$, to get
79
+
80
+ $$
81
+ \sum_{k=1}^{n} x_{k}=\frac{1}{x_{n+1}-1}-\frac{1}{x_{1}-1}=\frac{x_{n}^{2}-x_{n}+1}{x_{n}-1}-3=\frac{\left(x_{n}-2\right)^{2}}{x_{n}-1}
82
+ $$
83
+
84
+ Finally, express the positive rational number $x_{n}-1$ in lowest terms, $x_{n}-1=\frac{a}{b}$, to deduce that $\frac{(a-b)^{2}}{a b}$ expresses $\sum_{k=1}^{n} x_{k}$ the lowest terms.
85
+ Since $\operatorname{gcd}(a, b)=1 \Rightarrow \operatorname{gcd}(a-b, b)=1 \Rightarrow \operatorname{gcd}\left((a-b)^{2}, b\right)=1$. Similarly we can prove that $\operatorname{gcd}\left((a-b)^{2}, a\right)=1$, which implies that $\operatorname{gcd}\left((a-b)^{2}, a b\right)=1$.
86
+ The conclusion follows.
87
+
88
+ ## A3
89
+
90
+ Find all the functions $f: \mathbb{N} \rightarrow \mathbb{N}$ such that:
91
+
92
+ $$
93
+ n+f(m) \mid f(n)+n f(m)
94
+ $$
95
+
96
+ for any $m, n \in \mathbb{N}$
97
+
98
+ ## Solution
99
+
100
+ We will consider 2 cases, whether the range of the functions is infinite or finite or in other words the function take infinite or finite values.
101
+ Case 1. The Function has an infinite range. Let's fix a random natural number $n$ and let $m$ be any natural number. Then using (1) we have
102
+
103
+ $$
104
+ n+f(m)\left|f(n)+n f(m)=f(n)-n^{2}+n(f(m)+n) \quad \Rightarrow \quad n+f(m)\right| f(n)-n^{2}
105
+ $$
106
+
107
+ Since $n$ is a fixed natural number, then $f(n)-n^{2}$ is as well a fixed natural number, and since the above results is true for any $m$ and the function $f$ has an infinite range, we can choose $m$ such that $n+f(m)>\left|f(n)-n^{2}\right|$. This implies that $f(n)=n^{2}$ for any natural number $n$. We now check that it is a solution. Since
108
+
109
+ $$
110
+ n+f(m)=n+m^{2}
111
+ $$
112
+
113
+ and
114
+
115
+ $$
116
+ f(n)+n f(m)=n^{2}+n m^{2}=n\left(n+m^{2}\right)
117
+ $$
118
+
119
+ it is straightforward that $n+f(m) \mid f(n)+n f(m)$
120
+ Case 2. The Function has a finite range. Since the function takes finite values, then it exists a natural number $k$ such that $\mathrm{I} \leq f(n) \leq k$ for any natural number $n$. It is clear that it exists at least one natural number $s$ (where $1 \leq s \leq k$ ) such that $f(n)=s$ for infinite natural numbers $n$. Let $m, n$ be any natural numbers such that $f(m)=f(n)=s$. Using (1) we have
121
+
122
+ $$
123
+ n+s\left|s+n s=s-s^{2}+s(n+s) \Rightarrow n+s\right| s^{2}-s
124
+ $$
125
+
126
+ Since this is true for any natural number $n$ such that $f(n)=s$ and since exist infinite natural numbers $n$ such that $f(n)=s$, we can choose the natural number $n$ such that $n+s>s^{2}-s$, which implies that $s^{2}=s \Rightarrow s=1$, or in other words $f(n)=1$ for an infinite natural number n
127
+ Let's fix a random natural number $m$ and let $n$ be any natural number $f(n)=1$. Then using (1) we have
128
+
129
+ $$
130
+ n+f(m)\left|1+n f(m)=1-(f(m))^{2}+f(m)(n+f(m)) \Rightarrow n+f(m)\right|(f(m))^{2}-1
131
+ $$
132
+
133
+ Since $m$ is a fixed a random natural number, then $(f(m))^{2}-1$ is a fixed non-negative integer and since $n$ is any natural nummber such that $f(n)=1$ and since exist infinite numbers $n$ such that $f(n)=1$, we can choose the the natural number $n$ such that $n+f(m)>(f(m))^{2}-1$. This implies $f(m)=1$ for any natural number $m$. We now check that it is a solution. Since
134
+
135
+ $$
136
+ n+f(m)=n+1
137
+ $$
138
+
139
+ and
140
+
141
+ $$
142
+ f(n)+n f(m)=1+n
143
+ $$
144
+
145
+ it is straightforward that $n+f(m) \mid f(n)+n f(m)$.
146
+ So, all the functions that satisfy the given condition are $f(n)=n^{2}$ for any $n \in \mathbb{N}$ or $f(n)=1$ for any $n \in \mathbb{N}$.
147
+
148
+ A4
149
+ Let $M=\left\{(a, b, c) \in \mathbb{R}^{3}: 0<a, b, c<\frac{1}{2}\right.$ with $\left.a+b+c=1\right\}$ and $f: M \rightarrow \mathbb{R}$ given as
150
+
151
+ $$
152
+ f(a, b, c)=4\left(\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\right)-\frac{1}{a b c}
153
+ $$
154
+
155
+ Find the best (real) bounds $\alpha$ and $\beta$ such that
156
+
157
+ $$
158
+ f(M)=\{f(a, b, c):(a, b, c) \in M\} \subseteq[\alpha, \beta]
159
+ $$
160
+
161
+ and determine whether any of them is achievable.
162
+
163
+ ## Solution
164
+
165
+ Let $\forall(a, b, c) \in M, \alpha \leq f(a, b, c) \leq \beta$ and supose that there are no better bounds, i.e. $\alpha$ is the largest possible and $\beta$ is the smallest possible. Now,
166
+
167
+ $$
168
+ \begin{aligned}
169
+ \alpha \leq f(a, b, c) \leq \beta & \Leftrightarrow \alpha a b c \leq 4(a b+b c+c a)-1 \leq \beta a b c \\
170
+ & \Leftrightarrow(\alpha-8) a b c \leq 4(a b+b c+c a)-8 a b c-1 \leq(\beta-8) a b c \\
171
+ & \Leftrightarrow(\alpha-8) a b c \leq 1-2(a+b+c)+4(a b+b c+c a)-8 a b c \leq(\beta-8) a b c \\
172
+ & \Leftrightarrow(\alpha-8) a b c \leq(1-2 a)(1-2 b)(1-2 c) \leq(\beta-8) a b c
173
+ \end{aligned}
174
+ $$
175
+
176
+ For $\alpha<8$, we have
177
+
178
+ $$
179
+ (1-2 a)(1-2 b)(1-2 c) \geq 0>(\alpha-8) a b c .
180
+ $$
181
+
182
+ So $\alpha \geq 8$. But if we take $\varepsilon>0$ small and $a=b=\frac{1}{4}+\varepsilon, c=\frac{1}{2}-2 \varepsilon$, we'll have:
183
+
184
+ $$
185
+ (\alpha-8)\left(\frac{1}{4}+\varepsilon\right)\left(\frac{1}{4}+\varepsilon\right)\left(\frac{1}{2}-2 \varepsilon\right) \leq\left(\frac{1}{2}-2 \varepsilon\right)\left(\frac{1}{2}-2 \varepsilon\right) 4 \varepsilon
186
+ $$
187
+
188
+ Taking $\varepsilon \rightarrow 0^{+}$, we get $\alpha-8 \leq 0$. So $\alpha=8$ and it can never be achieved. For the right side, note that there is a triangle whose side-lengths are $a, b, c$. For this triangle, denote $p=\frac{1}{2}$ the half-perimeter, $S$ the area and $r, R$ respectively the radius of incircle,outcircle. Using the relations $R=\frac{a b c}{4 S}$ and $S=p r$, we will have:
189
+
190
+ $$
191
+ \begin{aligned}
192
+ (1-2 a)(1-2 b)(1-2 c) \leq(\beta-8) a b c & \Leftrightarrow(p-a)(p-b)(p-c) \leq \frac{(\beta-8) a b c}{8} \\
193
+ & \Leftrightarrow \frac{S^{2}}{p} \leq \frac{(\beta-8) a b c}{8} \\
194
+ & \Leftrightarrow 2 \frac{S}{p} \leq \frac{(\beta-8) a b c}{4 S} \\
195
+ & \Leftrightarrow \frac{R}{r} \geq 2(\beta-8)^{-1}
196
+ \end{aligned}
197
+ $$
198
+
199
+ Since the least value of $\frac{R}{r}$ is 2 (this is a well-known classic inequality), and it is achievable at $a=b=c=\frac{1}{3}$, we must have $\beta=9$.
200
+ Answer: $\alpha=8$ not achievable and $\beta=9$ achievable.
201
+
202
+ ## A5
203
+
204
+ Consider integers $m \geq 2$ and $n \geq 1$. Show that there is a polynomial $P(x)$ of degree equal to $n$ with integer coefficients such that $P(0), P(1), \ldots, P(n)$ are all perfect powers of $m$.
205
+
206
+ ## Solution
207
+
208
+ Let $a_{0}, a_{1}, \ldots, a_{n}$ be integers to be chosen later, and consider the polynomial $P(x)=\frac{1}{n!} Q(x)$ where
209
+
210
+ $$
211
+ Q(x)=\sum_{k=0}^{n}(-1)^{n-k}\binom{n}{k} a_{k} \prod_{\substack{0 \leq i \leq n \\ i \neq k}}(x-i) .
212
+ $$
213
+
214
+ Observe that for $l \in\{0,1, \ldots, n\}$ we have
215
+
216
+ $$
217
+ \begin{aligned}
218
+ P(l) & =\frac{1}{n!}(-1)^{n!}(\stackrel{n}{l}) a_{l} \prod_{\substack{0 \leq i \leq n \\
219
+ i \neq 1}}(l-i) \\
220
+ & =\frac{1}{n!}(-1)^{n-1}\binom{n}{l} a_{l} l!(-1)^{n-l}(n-l)! \\
221
+ & =a_{l}
222
+ \end{aligned}
223
+ $$
224
+
225
+ So $P(x)$ is the unique polynomial of degree at most $n$ such that $P(l)=a_{l}$. (Any two polynomials of degree at most $n$ agreeing on $n+1$ distinct values are equal.) Note in particular that
226
+
227
+ $$
228
+ \sum_{k=0}^{n}(-1)^{n-k}\binom{n}{k} \prod_{\substack{0 \leq i \leq n \\ i \neq k}}(x-i)=n!
229
+ $$
230
+
231
+ If $p$ is a prime dividing $n$ !, we let $r_{p}$ be maximal such that $p^{r_{p}}$ divides $\boldsymbol{n}$ !. If $p$ divides $\boldsymbol{m}$, then there is an integer $d_{p}$ such that $m^{d_{p}} \approx 0\left(\bmod p^{r_{p}}\right)$, for example $d_{p}=r_{p}$ will do. If $p$ does not divide $m$, then there is an integer $d_{p}$ such that $m^{d_{p}} \equiv 1\left(\bmod p^{r_{p}}\right)$, for example, by Euler's theorem, $d_{p}=\varphi\left(p^{r_{p}}\right)$ will do. Let $d=d_{1} d_{2} \ldots d_{p}$ and observe that for every positive integer $t$ we have $m^{\prime d} \equiv 0\left(\bmod p^{r_{p}}\right)$ if $p \mid m$ and $m^{t d} \equiv 1\left(\bmod p^{r_{p}}\right)$ if $p \nmid m$.
232
+ Now let $t_{0}, \ldots, t_{n}$ be positive integers to be chosen later and define $a_{k}=m^{t_{k} d}$. We will show that the polynomial $P(x)$ has integer coefficients. We will also show that there is an appropriate choice of $t_{0}, \ldots, t_{n}$ such that $P(x)$ has degree exactly equal to $n$.
233
+ To show that $P(x)$ has integer coefficients it is enough to show that for every $\boldsymbol{p}$ dividing $\boldsymbol{n !}$, all coefficients of $Q(x)$ are multiples of $p^{r_{p}}$. This is immediate if $p$ divides $m$ as all $a_{k}$ 's are multiples of $p^{r_{p}}$. If $p$ does not divide $m$ then we have $a_{k} \equiv 1\left(\bmod p^{r_{p}}\right)$ for every $0 \leq k \leq n$ and so by (*)
234
+
235
+ $$
236
+ Q(x) \equiv \sum_{k=0}^{n}(-1)^{n-k}\binom{n}{k} \prod_{\substack{0 \leq i \leq n \\ i \neq k}}(x-i) \equiv n!\equiv 0\left(\bmod p^{r_{p}}\right)
237
+ $$
238
+
239
+ This shows that all coefficients of $Q(x)$ are indeed multiples of $p^{r_{p}}$. It remains to show that there is a choice of $t_{0}, \ldots, t_{n}$ guarantecing that the degree of $P(x)$ is exactly equal to $n$. One such choice is $t_{0}=2$ and $t_{1}=\ldots=t_{n}=1$. This works because if $P(x)$ had degree less than $n$, then looking at the values $P(1), \ldots, P(n)$ we would get that $P(x)$ is constant. But this is impossible as $P(0) \neq P(1)$.
240
+ Note. Looking at the coefficient of $x^{n}$ in the definition of $P(x)$ it is not difficult to see that if we fix any $t_{1}, \ldots, t_{n}$ and pick $t_{0}$ large enough we will get that this coefficient is non-zero. In particular, we can additionally guarantee that $P(0), P(1), \ldots, P(n)$ are distinct perfect powers of $m$.
241
+
242
+ A6
243
+ Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ satisfying
244
+
245
+ $$
246
+ f\left(x+y f\left(x^{2}\right)\right)=f(x)+x f(x y)
247
+ $$
248
+
249
+ for all real numbers $x$ and $y$.
250
+
251
+ ## Solution
252
+
253
+ Let $P(x, y)$ be the assertion $f\left(x+y f\left(x^{2}\right)\right)=f(x)+x f(x y) . P(1,0)$ yields $f(0)=0$. If there exists $x_{0} \neq 0$ satisfying $f\left(x_{0}^{2}\right)=0$, then considering $P\left(x_{0}, y\right)$, we get $f\left(x_{0} y\right)=0$ for all $y \in \mathbb{R}$. In this case, since $x_{0} \neq 0$, we can write any real number $c$ in the form $x_{0} y$ for some $y$ and hence we conclude that $f(c)=0$. It is clear that the zero function satisfies the given equation. Now assume that $f\left(x^{2}\right) \neq 0$ for all $x \neq 0$.
254
+ By $P(1, y)$ we have
255
+
256
+ $$
257
+ f(1+y f(1))=f(1)+f(y)
258
+ $$
259
+
260
+ If $f(1) \neq 1$, there exists a real number $y$ satisfying $1+y f(1)=y$ which means that $f(1)=0$ which is a contradiction since $f\left(x^{2}\right) \neq 0$ for all $x \neq 0$. Therefore we get $f(1)=1$. Considering $P\left(x,-x / f\left(x^{2}\right)\right.$ ) for $x \neq 0$, we obtain that
261
+
262
+ $$
263
+ f(x)=-x f\left(-\frac{x^{2}}{f\left(x^{2}\right)}\right) \quad \forall x \in \mathbb{R} \backslash\{0\} .
264
+ $$
265
+
266
+ Replacing $x$ by $-x$ in (1), we obtain $f(x)=-f(-x)$ for all $x \neq 0$. Since $f(0)=0$, we have $f(x)=-f(-x)$ for all $x \in \mathbb{R}$. Since $f$ is odd, $P(x,-y)$ implies
267
+
268
+ $$
269
+ f\left(x-y f\left(x^{2}\right)\right)=f(x)-x f(x y)
270
+ $$
271
+
272
+ and hence by adding $P(x, y)$ and $P(x,-y)$, we get
273
+
274
+ $$
275
+ f\left(x+y f\left(x^{2}\right)\right)+f\left(x-y f\left(x^{2}\right)\right)=2 f(x) \forall x, y \in \mathbb{R}
276
+ $$
277
+
278
+ Putting $y=x / f\left(x^{2}\right)$ for $x \neq 0$ we get
279
+
280
+ $$
281
+ f(2 x)=2 f(x) \quad \forall x \in \mathbb{R}
282
+ $$
283
+
284
+ and hence we have
285
+
286
+ $$
287
+ f\left(x+y f\left(x^{2}\right)\right)+f\left(x-y f\left(x^{2}\right)\right)=f(2 x) \forall x, y \in \mathbb{R}
288
+ $$
289
+
290
+ It is clear that for any two real numbers $u$ and $v$ with $u \neq-v$, we can choose
291
+
292
+ $$
293
+ x=\frac{u+v}{2} \text { and } y=\frac{v-u}{\left.2 f\left(\frac{u+v}{2}\right)^{2}\right)}
294
+ $$
295
+
296
+ yielding
297
+
298
+ $$
299
+ f(u)+f(v)=f(u+v)
300
+ $$
301
+
302
+ Since $f$ is odd, (2) is also true for $u=-v$ and hence we obtain that
303
+
304
+ $$
305
+ f(x)+f(y)=f(x+y) \quad \forall x, y \in \mathbb{R} .
306
+ $$
307
+
308
+ Therefore, $P(x, y)$ implies
309
+
310
+ $$
311
+ f\left(y f\left(x^{2}\right)\right)=x f(x y) \quad \forall x, y \in \mathbb{R}
312
+ $$
313
+
314
+ Hence we have
315
+
316
+ $$
317
+ f\left(f\left(x^{2}\right)\right)=x f(x) \quad \forall x \in \mathbb{R}
318
+ $$
319
+
320
+ and
321
+
322
+ $$
323
+ f\left(x f\left(x^{2}\right)\right)=x f\left(x^{2}\right) \forall x \in \mathbb{R}
324
+ $$
325
+
326
+ Using (2) and (3), we get
327
+
328
+ $$
329
+ \begin{aligned}
330
+ x f(x)+y f(y)+x f(y)+y f(x) & =(x+y)(f(x)+f(y)) \\
331
+ & =f\left(f\left((x+y)^{2}\right)\right) \\
332
+ & =f\left(f\left(x^{2}+2 x y+y^{2}\right)\right) \\
333
+ & =f\left(f\left(x^{2}\right)+f\left(y^{2}\right)+f(2 x y)\right) \\
334
+ & =f\left(f\left(x^{2}\right)\right)+f\left(f\left(y^{2}\right)\right)+f(f(2 x y)) \\
335
+ & =x f(x)+y(f(y))+f(f(2 x y)) \\
336
+ & =x f(x)+y(f(y))+2 f(f(x y))
337
+ \end{aligned}
338
+ $$
339
+
340
+ and hence
341
+
342
+ $$
343
+ 2 f(f(x y))=x f(y)+y f(x) \forall x, y \in \mathbb{R} .
344
+ $$
345
+
346
+ Using (5), we have
347
+
348
+ $$
349
+ 2 f(f(x))=x+f(x) \quad \forall x \in \mathbb{R} .
350
+ $$
351
+
352
+ Using (3) and (6), we obtain that
353
+
354
+ $$
355
+ 2 x f(x)=2 f\left(f\left(x^{2}\right)\right)=x^{2}+f\left(x^{2}\right) \forall x \in \mathbb{R} .
356
+ $$
357
+
358
+ Putting $y=f\left(x^{2}\right)$ in (5) yields
359
+
360
+ $$
361
+ 2 f\left(f\left(x f\left(x^{2}\right)\right)\right)=x f\left(f\left(x^{2}\right)\right)+f\left(x^{2}\right) f(x) \forall x \in \mathbb{R}
362
+ $$
363
+
364
+ Using (4), we get $f\left(f\left(x f\left(x^{2}\right)\right)\right)=x f\left(x^{2}\right)$ and by (3) and (8) we have
365
+
366
+ $$
367
+ 2 x f\left(x^{2}\right)=2 f\left(f\left(x f\left(x^{2}\right)\right)\right)=x f\left(f\left(x^{2}\right)\right)+f\left(x^{2}\right) f(x)=x^{2} f(x)+f\left(x^{2}\right) f(x) \forall x \in \mathbb{R}
368
+ $$
369
+
370
+ Now using (7), write $f\left(x^{2}\right)=2 x f(x)-x^{2}$ in (9) to obtain that
371
+
372
+ $$
373
+ 2 x\left(2 x f(x)-x^{2}\right)=x^{2} f(x)+\left(2 x f(x)-x^{2}\right) f(x)
374
+ $$
375
+
376
+ which is equivalent to
377
+
378
+ $$
379
+ 2 x(x-f(x))^{2}=0 \quad \forall x \in \mathbb{R}
380
+ $$
381
+
382
+ This shows that $f(x)=x \quad \forall x \in \mathbb{R}$ which satisfies the original equation. Therefore all solutions are $f(x)=0 \quad \forall x \in \mathbb{R}$ and $f(x)=x \quad \forall x \in \mathbb{R}$.
383
+
384
+ ## NUMBER THEORY
385
+
386
+ ## NT1
387
+
388
+ Find all pairs $(x, y)$ of positive integers such that
389
+
390
+ $$
391
+ x^{3}+y^{3}=x^{2}+42 x y+y^{2}
392
+ $$
393
+
394
+ ## Solution
395
+
396
+ Let $d=(x, y)$ be the greatest common divisor of positive integers $x$ and $y$.
397
+ So, $x=a d, y=b d$, where $d \in \mathbb{N},(a, b)=1, a, b \in \mathbb{N}$. We have
398
+
399
+ $$
400
+ \begin{aligned}
401
+ x^{3}+y^{3}=x^{2}+42 x y+y^{2} & \Leftrightarrow d^{3}\left(a^{3}+b^{3}\right)=d^{2}\left(a^{2}+42 a b+b^{2}\right) \\
402
+ & \Leftrightarrow d(a+b)\left(a^{2}-a b+b^{2}\right)=a^{2}+42 a b+b^{2} \\
403
+ & \Leftrightarrow(d a+d b-1)\left(a^{2}-a b+b^{2}\right)=43 a b
404
+ \end{aligned}
405
+ $$
406
+
407
+ If we denote $c=d a+d b-1 \in \mathbb{N}$, then the equality $a^{2} c-a b c+b^{2} c=43 a b$ implies the relations
408
+
409
+ $$
410
+ \begin{aligned}
411
+ \left.\begin{array}{rl}
412
+ b\left|c a^{2} \Rightarrow b\right| c \\
413
+ a\left|c b^{2} \Rightarrow a\right| c
414
+ \end{array}\right\} & \Rightarrow(a b) \mid c \\
415
+ & \Leftrightarrow c=m a b, m \in \mathbb{N}^{+} \\
416
+ & \Rightarrow m\left(a^{2}-a b+b^{2}\right)=43 \\
417
+ & \Rightarrow\left(a^{2}-a b+b^{2}\right) \mid 43 \\
418
+ & \Leftrightarrow a^{2}-a b+b^{2}=1 \text { or } a^{2}-a b+b^{2}=43 .
419
+ \end{aligned}
420
+ $$
421
+
422
+ If $a^{2}-a b+b^{2}=1$, then $(a-b)^{2}=1-a b \geq 0 \Rightarrow a=b=1,2 d=44,(x, y)=(22,22)$.
423
+ If $a^{2}-a b+b^{2}=43$, then, by virtue of simmetry, we suppose that $x \geq y \Rightarrow a \geq b$. We obtain that $43=a^{2}-a b+b^{2} \geq a b \geq b^{2} \Rightarrow b \in\{1,2,3,4,5,6\}$.
424
+ If $b=1$, then $a=7, d=1,(x, y)=(7,1)$ or $(x, y)=(1,7)$.
425
+ If $b=6$, then $a=7, d=\frac{43}{13} \notin \mathbb{N}$.
426
+ For $b \in\{2,3,4,5\}$ there no positive integer solutions for $a$.
427
+ Finally, we have $(x, y) \in\{(1,7),(7,1),(22,22)\}$.
428
+
429
+ ## NT2
430
+
431
+ Find all functions $f: \mathbf{Z}_{>0} \rightarrow \mathbb{Z}_{>0}$ such that the number $x f(x)+f^{2}(y)+2 x f(y)$ is a perfect square for all positive integers $x, y$.
432
+
433
+ ## Solution
434
+
435
+ Let $p$ be a prime number. Then for $x=y=p$ the given condition gives us that the number $f^{2}(p)+3 p f(p)$ is a perfect square. Then, $f^{2}(p)+3 p f(p)=k^{2}$ for some positive integer $k$. Completing the square gives us that $(2 f(p)+3 p)^{2}-9 p^{2}=4 k^{2}$, or
436
+
437
+ $$
438
+ (2 f(p)+3 p-2 k)(2 f(p)+3 p+2 k)=9 p^{2} .
439
+ $$
440
+
441
+ Since $2 f(p)+3 p+3 k>3 p$, we have the following 4 cases.
442
+
443
+ $$
444
+ \begin{aligned}
445
+ & \left\{\begin{array} { l }
446
+ { 2 f ( p ) + 3 p + 2 k = 9 p } \\
447
+ { 2 f ( p ) + 3 p - 2 k = p }
448
+ \end{array} \text { or } \left\{\begin{array}{l}
449
+ 2 f(p)+3 p+2 k=p^{2} \\
450
+ 2 f(p)+3 p-2 k=9
451
+ \end{array}\right.\right. \text { or } \\
452
+ & \left\{\begin{array} { l }
453
+ { 2 f ( p ) + 3 p + 2 k = 3 p ^ { 2 } } \\
454
+ { 2 f ( p ) + 3 p - 2 k = 3 }
455
+ \end{array} \text { or } \left\{\begin{array}{l}
456
+ 2 f(p)+3 p+2 k=9 p^{2} \\
457
+ 2 f(p)+3 p-2 k=1
458
+ \end{array}\right.\right.
459
+ \end{aligned}
460
+ $$
461
+
462
+ Solving the systems, we have the following cases for $f(p)$.
463
+
464
+ $$
465
+ f(p)=p \text { or } f(p)=\left(\frac{p-3}{2}\right)^{2} \text { or } f(p)=\frac{3 p^{2}-6 p-3}{4} \text { or } f(p)=\left(\frac{3 p-1}{2}\right)^{2} .
466
+ $$
467
+
468
+ In all cases, we see that $f(p)$ can be arbitrary large whenever $p$ grows.
469
+ Now fix a positive integer $x$. From the given condition we have that
470
+
471
+ $$
472
+ (f(y)+x)^{2}+x f(x)-x^{2}
473
+ $$
474
+
475
+ is a perfect square. Since for $y$ being a prime, let $y=q, f(q)$ can be arbitrary large and $x f(x)-x^{2}$ is fixed, it means that $x f(x)-x^{2}$ should be zero, since the difference of $(f(q)+x+1)^{2}$ and $(f(q)+x)^{2}$ can be arbitrary large.
476
+ After all, we conclude that $x f(x)=x^{2}$, so $f(x)=x$, which clearly satisfies the given condition.
477
+
478
+ ## NT3
479
+
480
+ Prove that for all positive integer $n$, there is a positive integer $m$, that $7^{n} \mid 3^{m}+5^{m}-1$.
481
+
482
+ ## Solution
483
+
484
+ We prove this by induction on $\boldsymbol{n}$. The case $\boldsymbol{n}=1$ is indeed trivial for $\boldsymbol{m}=1$. Assume that the statement of the problem holds true for $n$, and we have $3^{m}+5^{m}-1=7^{n} l$ for some positive integer $l$ which is not divisible by 7 (if not we are done). Since $3^{6} \equiv 1(\bmod 7)$ and $5^{6} \equiv 1(\bmod 7)$ we conclude that,
485
+
486
+ $$
487
+ 3^{6 \cdot 7^{n-1}} \equiv 1\left(\bmod 7^{n}\right), 5^{6 \cdot 7^{n-1}} \equiv 1\left(\bmod 7^{n}\right) .
488
+ $$
489
+
490
+ Since
491
+
492
+ $$
493
+ v_{7}\left(3^{6.7^{n-1}}-1\right)=v_{7}\left(3^{6}-1\right)+v_{7}\left(7^{n-1}\right)=n \text { and } v_{7}\left(5^{6.7^{n-1}}-1\right)=v_{7}\left(5^{6}-1\right)+v_{7}\left(7^{n-1}\right)=n
494
+ $$
495
+
496
+ Thus we can say that: $3^{6.7^{n-1}}=1+7^{n} r, 5^{6.7^{n-1}}=1+7^{n} s$ for some positive integers $r, s$. We find the reminder of $r, s$ module 7 . Note that:
497
+
498
+ $$
499
+ \frac{y^{7^{k}}-1}{7^{k+1}}=\frac{y-1}{7} \cdot \frac{1+y+\ldots+y^{6}}{7} \cdot \ldots \cdot \frac{1+y^{7^{x-1}}+\ldots+y^{67^{k-1}}}{7}
500
+ $$
501
+
502
+ We use the above identity for $y=3^{6}, 5^{6}$. Note that in both cases $y=1(\bmod 7)$. Now we use the following lemma
503
+ Lemma. Let $p$ be an odd prime such that $p \mid a-1$ then $\frac{a^{p}-1}{a-1} \equiv p\left(\bmod p^{2}\right)$.
504
+ Proof. Take $a-1=b$, then $p \mid b$ now
505
+
506
+ $$
507
+ \frac{a^{p}-1}{a-1}=\frac{(b+1)^{p}-1}{b}=b^{p-1}+\ldots+\binom{p}{2} b+p \equiv p\left(\bmod p^{2}\right)
508
+ $$
509
+
510
+ since all the binomial coefficients is divisible by $p$. So our proof is complete.
511
+ Then by use of the lemma repeatedly we find that all the terms of the above identity ( ${ }^{*}$ ) except the first term is congruent to 1 modulo 7 . Thus we can find that :
512
+
513
+ $$
514
+ \frac{y^{7^{k}}-1}{7^{k+1}} \equiv \frac{y-1}{7}(\bmod 7)
515
+ $$
516
+
517
+ Since
518
+
519
+ $$
520
+ \frac{3^{6}-1}{7}=104 \equiv-1, \frac{5^{6}-1}{7} \equiv 2232 \equiv-1(\bmod 7)
521
+ $$
522
+
523
+ we find that $r \equiv s \equiv-I(\bmod 7)$, and by use of binomial theorem, we can easily find that
524
+
525
+ $$
526
+ 3^{6 l \cdot 7^{n-1}}=1+7^{n} r t\left(\bmod 7^{n+1}\right), \quad 5^{6 i \cdot 7^{n-1}}=1+7^{n} s t\left(\bmod 7^{n+1}\right)
527
+ $$
528
+
529
+ for all positive integers $t$.
530
+ Now take $\boldsymbol{m}+\boldsymbol{t r} \cdot 7^{\boldsymbol{n - 1}}$ instead of $\boldsymbol{m}$,(while we will specify the number $t$ later) we can find that:
531
+
532
+ $$
533
+ 3^{m+6 t \cdot 7^{n-1}}+5^{m+6 r \cdot 7^{n-1}}-1=3^{m} \cdot 3^{6 r} \cdot 7^{n-1}+5^{m} \cdot 5^{61 \cdot 7^{n-1}}-1
534
+ $$
535
+
536
+ Taking modulo $7^{n+1}$ we can find that, the above expression is reduced to
537
+
538
+ $$
539
+ \begin{aligned}
540
+ 3^{m}\left(1+7^{n} r t\right)+5^{m}\left(1+7^{n} s t\right)-1 & \equiv 3^{m}+5^{m}-1+5^{m} \cdot 7^{n} s t+3^{m} \cdot 7^{n} r t \\
541
+ & \equiv 7^{n}\left(l+\left(5^{m} s+3^{m} r\right) t\right)\left(\bmod 7^{n+1}\right)
542
+ \end{aligned}
543
+ $$
544
+
545
+ Now, the problem reduced to finding a positive integer $t$ such that
546
+
547
+ $$
548
+ l+\left(5^{m} s+3^{m} \cdot r\right) t \equiv 0(\bmod 7)
549
+ $$
550
+
551
+ since
552
+
553
+ $$
554
+ 5^{m} s+3^{m} r \equiv-5^{m}-3^{m} \equiv 1(\bmod 7) .
555
+ $$
556
+
557
+ Since $3^{m}+5^{m}-1 \equiv 0(\bmod 7)$ whence, we find that $\operatorname{gcd}\left(5^{m} s+3^{m} r, 7\right)=1$. Thus such integer $t$ exists, so we are done!
558
+
559
+ ## NT4
560
+
561
+ Find all pairs of positive integers $(x, y)$, such that $x^{2}$ is divisible by $2 x y^{2}-y^{3}+1$.
562
+
563
+ ## Solution
564
+
565
+ If $y=1$, then $2 x \mid x^{2} \Leftrightarrow x=2 n, n \in \mathbb{N}$. So, the pairs $(x, y)=(2 n, 1), n \in \mathbb{N}$ satisfy the required divizibility.
566
+ Let $y>1$ such, that $x^{2}$ is divisible by $2 x y^{2}-y^{3}+1$. There exist $m \in \mathbb{N}$ such that
567
+
568
+ $$
569
+ x^{2}=m\left(2 x y^{2}-y^{3}+1\right), \text { e.t. } x^{2}-2 m y^{2} x+\left(m y^{3}-m\right)=0
570
+ $$
571
+
572
+ The discriminant of last quadratic equation is equal to $\Delta=4 m^{2} y^{4}-4 m y^{3}+4 m$. Denote
573
+
574
+ $$
575
+ A=4 m\left(y^{2}-1\right)+(y-1)^{2}, \quad B=4 m\left(y^{2}+1\right)-(y+1)^{2}
576
+ $$
577
+
578
+ For $y>1, y \in \mathbb{N}$ and $m \in \mathbb{N}$ we have
579
+
580
+ $$
581
+ A>0, \quad B=4 m\left(y^{2}+1\right)-(y+1)^{2}>2\left(y^{2}+1\right)-(y+1)^{2}=(y-1)^{2} \geq 0 \Rightarrow B>0
582
+ $$
583
+
584
+ We obtain the following estimations for the discriminant $\Delta$ :
585
+
586
+ $$
587
+ \begin{aligned}
588
+ & \Delta+A=\left(2 m y^{2}-y+1\right)^{2} \geq 0 \Rightarrow \Delta<\left(2 m y^{2}-y+1\right)^{2} ; \\
589
+ & \Delta-B=\left(2 m y^{2}-y-1\right)^{2} \geq 0 \Rightarrow \Delta>\left(2 m y^{2}-y-1\right)^{2} .
590
+ \end{aligned}
591
+ $$
592
+
593
+ Because the discriminant $\Delta$ must be a perfect square, we obtain the equalities:
594
+
595
+ $$
596
+ \Delta=4 m^{2} y^{4}-4 m y^{3}+4 m=\left(2 m y^{2}-y\right)^{2} \Leftrightarrow y^{2}=4 m \Rightarrow y=2 k, k \in \mathbb{N}, m=k^{2}, k \in \mathbb{N}
597
+ $$
598
+
599
+ The equation $x^{2}-8 k^{4} x+k\left(8 k^{4}-k\right)=0$ has the solutions $x=k$ and $x=8 k^{4}-k$, where $k \in \mathbb{N}$.
600
+ Finaly, we obtain that all pairs of positive integers $(x, y)$, such that $x^{2}$ is divisible by $2 x y^{2}-y^{3}+1$, are equal to $(x, y) \in\left\{(2 k, 1),(k, 2 k),\left(8 k^{4}-k, 2 k\right) \mid k \in \mathbb{N}\right\}$.
601
+
602
+ ## NT5
603
+
604
+ Given a positive odd integer $n$, show that the arithmetic mean of fractional parts $\left\{\frac{k^{2 n}}{p}\right\}$, $k=1, \ldots, \frac{p-1}{2}$, is the same for infinitely many primes $p$.
605
+
606
+ ## Solution
607
+
608
+ We show that the arithmetic mean in question is $\frac{1}{2}$ for infinitely many primes congruent to 1 modulo 4.
609
+ Notice that $\left\{\frac{k^{2 n}}{p}\right\}=\frac{r_{k}}{p}$, where $r_{k}$ is the remainder $k^{2 n}$ leaves upon division by $p$. Clearly, the $r_{k}$ are quadratic residues modulo $p$.
610
+ If $p$ is prime, and $p-1$ and $n$ are relatively prime, then the $r_{k}, k=1, \ldots, \frac{p-1}{2}$, are pairwise distinct, since the $k^{2 n}, k=1, \ldots, \frac{p-1}{2}$, are pairwise distinct modulo $p$, by Fermat's little theorem. In this case, the $r_{k}, k=1, \ldots, \frac{p-1}{2}$, form the set $R$ of all $\frac{p-1}{2}$ quadratic residues modulo $p$ in the range 1 through $p-1$.
611
+ If, in addition, $p$ is congruent to 1 modulo 4 , then -1 is a quadratic residue modulo $p$, and the assignment $r \mapsto p-r, r \in R$, defines a permutation of $R$. In this case,
612
+
613
+ $$
614
+ \sum_{r \in R} r=\sum_{r \in R}(p-r)=\frac{p(p-1)}{2}-\sum_{r \in R} r
615
+ $$
616
+
617
+ so
618
+
619
+ $$
620
+ \sum_{r \in R} r=\frac{p(p-1)}{4},
621
+ $$
622
+
623
+ and the arithmetic mean in question is $\frac{1}{2}$.
624
+ Finally, since $n$ is odd, infinitely many primes congruent to 1 modulo 4 are also congruent to 2 modulo $n$, by Dirichlet's theorem on arithmetic sequences of integers; for such a prime $p$, the numbers $p-1$ and $n$ are clearly relatively prime. This completes the proof.
625
+
626
+ ## GEOMETRY
627
+
628
+ ## G1
629
+
630
+ Let $A B C$ be an acute triangle. Variable points $E$ and $F$ are on sides $A C$ and $A B$ respectively such that $B C^{2}=B A \cdot B F+C E \cdot C A$. As $E$ and $F$ vary prove that the circumcircle of $A E F$ passes through a fixed point other than $A$.
631
+
632
+ ## Solution 1
633
+
634
+ Let $H$ be the ortocenter of $A B C$ and $K, L, M$ be the feet of perpendiculars respectively from $A, B, C$ to their opposite sides of $A B C$. Also let $D$ be the intersection point of lines $B E$ and $C F$. From power of point we have
635
+
636
+ $$
637
+ B A \cdot B M=B C \cdot B K
638
+ $$
639
+
640
+ and
641
+
642
+ $$
643
+ C A \cdot C L=C B \cdot C K
644
+ $$
645
+
646
+ Adding (1) and (2) we have:
647
+
648
+ $$
649
+ C A \cdot C L+B A \cdot B M=B C \cdot B K+C B \cdot C K=B C(B K+C K)=B C^{2}
650
+ $$
651
+
652
+ Combining (3) with the problem statement $B C^{2}=B A \cdot B F+C E \cdot C A$ we have:
653
+
654
+ $$
655
+ \begin{aligned}
656
+ & B A \cdot B F-B A \cdot B M=C A \cdot C L-C E \cdot C A \\
657
+ & B A(B F-B M)=C A(C L-C E) \\
658
+ & B A \cdot F M=C A \cdot L E \\
659
+ & \quad \frac{L E}{F M}=\frac{A B}{A C}=\frac{B L}{C M}
660
+ \end{aligned}
661
+ $$
662
+
663
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-20.jpg?height=2007&width=2070&top_left_y=2829&top_left_x=791)
664
+
665
+ Where the last equality follows from $\triangle A M C \sim \triangle A L B$. Now since $\frac{L E}{F M}=\frac{B L}{C M}$ and $\angle F M C=\angle E L B=90^{\circ}$ we get that triangles $\triangle F M C \sim \triangle E L B$. From this similarity we get
666
+
667
+ $$
668
+ \measuredangle A E D=\measuredangle A E B=\angle L E B=\measuredangle M F C=180^{\circ}-\angle A F C=180-\angle A F D,
669
+ $$
670
+
671
+ meaning points $A, D, E, F$ are concylic.
672
+ Since both pairs $\{E, F\}$ and $\{M, L\}$ satisfy the problem condition, we must have this fixed point we are looking for is the second intersection of the circumcircles around $A F D E$ and AMHL. Let this point be $X$. We now prove that $X$ is fixed on the circumcircle of $A M H L$ (which would imply $X$ is fixed).
673
+ From the concylicity we have
674
+
675
+ $$
676
+ \angle X L E=180^{\circ}-\measuredangle X L A=\measuredangle X M A=\angle X M F \text { and } \measuredangle X E L=\measuredangle X E A=180-\measuredangle X F A=\measuredangle X F M
677
+ $$
678
+
679
+ and from here we get $\triangle X L E \sim \triangle X M F$. This similarity gives us
680
+
681
+ $$
682
+ \frac{X L}{X M}=\frac{L E}{M F} .
683
+ $$
684
+
685
+ Now combining (4) and (5) we get $\frac{X L}{X M}=\frac{A B}{A C}$ which is a fixed quantity. Since points $M, L$, the circumcircle of $A M L$, and ratio $\frac{X L}{X M}$ are fixed, this implies that point $X$ is fixed.
686
+
687
+ ## Solution 2
688
+
689
+ Let the $D$ be the intersection of $B E$ and $C F$ and let circumcircle of triangle $C F A$ intersect $B C$ at point $G$. From power of point we have
690
+
691
+ $$
692
+ B G \cdot B C=B F \cdot B A
693
+ $$
694
+
695
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-21.jpg?height=2102&width=2597&top_left_y=2595&top_left_x=548)
696
+
697
+ Combining (6) with the problem statement we get
698
+
699
+ $$
700
+ B C^{2}=B A \cdot B F+C E \cdot C A=B G \cdot B C+C E \cdot C A
701
+ $$
702
+
703
+ and from here we get
704
+
705
+ $$
706
+ C E \cdot C A=B C(B C-B G)=B C \cdot C G
707
+ $$
708
+
709
+ (7) implies that $E, A, B, G$ are concyclic as well.
710
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-22.jpg?height=1863&width=2194&top_left_y=817&top_left_x=780)
711
+
712
+ This gives us
713
+
714
+ $$
715
+ \measuredangle G A C=\measuredangle G A E=\measuredangle G B E=\measuredangle C B D
716
+ $$
717
+
718
+ and
719
+
720
+ $$
721
+ \measuredangle B A C-\measuredangle G A C=\measuredangle G A B=\measuredangle G A F=\measuredangle G C F=\measuredangle B C D .
722
+ $$
723
+
724
+ Adding these two equalities gives us
725
+
726
+ $$
727
+ \measuredangle B A C=\measuredangle C B D+\measuredangle B C D=180^{\circ}-\measuredangle B D C .
728
+ $$
729
+
730
+ This implies that $A, E, D, F$ are concyclic. Now let the second intersection of the circumcircles of $B D C$ and $A F D E$ be $X$. We have
731
+
732
+ $$
733
+ \angle X A B=\angle X A F=\angle X D F=180^{\circ}-\angle X D C=\angle X B C
734
+ $$
735
+
736
+ and
737
+
738
+ $$
739
+ \measuredangle X A C=\angle X A E=180^{\circ}-\measuredangle X D E=\angle X D B=\measuredangle X C B
740
+ $$
741
+
742
+ (8) and (9) imply that $B C$ is tangent to the circumcircles of $\triangle X A B$ and $\triangle X A C$ respectively. Let $A X$, the radical axis of the two circumcircles, intersect $B C$ at $Q$. Now we have by power of point
743
+
744
+ $$
745
+ Q B^{2}=Q X \cdot Q A=Q C^{2}
746
+ $$
747
+
748
+ giving up that $A X$ bisects $B C$. So $X$ is the point on the median from $A$ to side $B C$ such that $\measuredangle B X C=180-\measuredangle B A C$. This point is unique and we have proven that it is always on the circumcircle of $A E D F$.
749
+
750
+ G2
751
+ Let $A B C$ be an acute triangle and $D$ a variable point on side $A C$. Point $E$ is on $B D$ such that $B E=\frac{B C^{2}-C D \cdot C A}{B D}$. As $D$ varies on side $A C$ prove that the circumcircle of $A D E$ passes through a fixed point other than $A$.
752
+
753
+ ## Solution
754
+
755
+ Let the circumcircle of triangle $C E D$ intersect $B C$ at point $G$. From power of point we have
756
+
757
+ $$
758
+ B G \cdot B C=B E \cdot B D .
759
+ $$
760
+
761
+ Combining (1) with the problem statement we get
762
+
763
+ $$
764
+ \frac{B C \cdot B C}{B D}=B E=\frac{B C^{2}-C D \cdot C A}{B D}
765
+ $$
766
+
767
+ and from here we get
768
+
769
+ $$
770
+ C D \cdot C A=B C(B C-B G)=B C \cdot C G .
771
+ $$
772
+
773
+ (2) implies that $D, A, B, G$ are concyclic as well. This gives us
774
+
775
+ $$
776
+ \angle B E C=\measuredangle B G D=180^{\circ}-\measuredangle B A D=180-\measuredangle C A B .
777
+ $$
778
+
779
+ Now let the circumcircle of $A D E$ and $B E C$ intersect again at $X$. Since
780
+
781
+ $$
782
+ \angle X C B=\angle X E B=180^{\circ}-\measuredangle X E D=\angle X A D=\angle X A C
783
+ $$
784
+
785
+ and
786
+
787
+ $$
788
+ \angle B X C=\angle B E C=180^{\circ}-\angle B A C
789
+ $$
790
+
791
+ we have that $X$ is on the unique circle through $A$ and $C$ tangent to side $B C$ at point $C$ and circumcircle of $B H C$ where $H$ is the ortocenter of triangle $A B C$. This intersection is unique and we are done.
792
+
793
+ ## G3
794
+
795
+ Let $A B C$ be a triangle with $A B<A C$ inscribed into a circle $c$. The tangent of $c$ at the point $C$ meets the parallel from $B$ to $A C$ at the point $D$. The tangent of $c$ at the point $B$ meets the parallel from $C$ to $A B$ at the point $E$ and the tangent of $c$ at the point $C$ at the point $L$. Suppose that the circumcircle $c_{1}$ of the triangle $B D C$ meets $A C$ at the point $T$ and the circumcircle $c_{2}$ of the triangle $B E C$ meets $A B$ at the point $S$. Prove that the lines $S T, B C, A L$ are concurrent.
796
+
797
+ ## Solution
798
+
799
+ We will prove first that the circle $c_{1}$ is tangent to $A B$ at the point $B$. In order to prove this, we have to prove that $\measuredangle B D C=\measuredangle A B C$. Indeed, since $B D \| A C$, we have that $\measuredangle D B C=\measuredangle A C B$. Additionally, $\angle B C D=\measuredangle B A C$ (by chord and tangent), which means that the triangles $A B C, B D C$ have two equal angles and so the third ones are also equal. It follows that $\angle B D C=\measuredangle A B C$, so $c_{1}$ is tangent to $A B$ at the point $B$.
800
+
801
+ Similarly, the circle $c_{2}$ is tangent to $A C$ at the point $C$.
802
+ As a consequence, $\measuredangle A B T=\measuredangle A C B$ (by chord and tangent) and also $\measuredangle B S C=\measuredangle A C B$.
803
+ By the above, we have that $\measuredangle A B T=\measuredangle B S C$, so the lines $B T, S C$ are parallel.
804
+ Now, let $S T$ intersect $B C$ at the point $K$. It suffice to prove that $K$ belongs to $A L$. From the trapezoid $B T C S$ we get that
805
+
806
+ $$
807
+ \frac{B K}{K C}=\frac{B T}{S C}
808
+ $$
809
+
810
+ and from the similar triangles $A B T, A S C$, we have that
811
+
812
+ $$
813
+ \frac{B T}{S C}=\frac{A B}{A S}
814
+ $$
815
+
816
+ By (1), (2) we get that
817
+
818
+ $$
819
+ \frac{B K}{K C}=\frac{A B}{A S}
820
+ $$
821
+
822
+ From the power of point theorem, we have that
823
+
824
+ $$
825
+ A C^{2}=A B \cdot A S \Rightarrow A S=\frac{A C^{2}}{A B}
826
+ $$
827
+
828
+ Going back into (3), it gives that
829
+
830
+ $$
831
+ \frac{B K}{K C}=\frac{A B^{2}}{A C^{2}}
832
+ $$
833
+
834
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-24.jpg?height=1362&width=958&top_left_y=2691&top_left_x=2262)
835
+
836
+ From the last one, it follows that $K$ belongs to the symmedian of the triangle $A B C$.
837
+ Finally, recall that the well known fact that since $L B$ and $L C$ are tangents, it follows that $A L$ is the symmedian of the triangle $A B C$, so $K$ belongs to $A L$, as needed.
838
+
839
+ ## G4
840
+
841
+ The acuteangled triangle $A B C$ with circumcenter $O$ is given. The midpoints of the sides $B C$, $C A$ and $A B$ are $D, E$ and $F$ respectivelly. An arbitrary point $M$ on the side $B C$, different of $D$, is choosen. The straight lines $A M$ and $E F$ intersects at the point $N$ and the straight line $O N$ cut again the circumscribed circle of the triangle $O D M$ at the point $P$. Prove that the reflection of the point $M$ with respect to the midpoint of the segment $D P$ belongs on the nine points circle of the triangle $A B C$.
842
+
843
+ ## Solution.
844
+
845
+ The straight lines $D O, E O$ and $F O$ are the perpendicular bisectors of the sides $B C, C A$ and $A B$ respectively. It follows that $[O M]$ is the diameter of the circumscribed circle of the triangle $O D M$ and $M P \perp O N$. The point $O$ is the ortocenter of the triangle $D E F$ (see the picture)
846
+ Let $O_{1}$ be the circumcenter of the triangle $D E F$ and $H$ be the diametrically opposite point of $D$. The circumscribed circle of the triangle $D E F$ is the nine points circle of the triangle $A B C$. It follows that $E H \perp D E, F H \perp F D$ and $E D\|A F, D F\| A E$. So, the point $H$ is the ortocenter of the triangle $A E F$.
847
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-25.jpg?height=2313&width=2556&top_left_y=2071&top_left_x=579)
848
+
849
+ Let $A D \cap E F=\{I\}$ and $R$ is the reflection of the point N with respect to the point $I$, i.e. $R \in(E F), N I=R I$. The point $I$ is the simmetry center of the parallelogram $A E D F$. It follows that the point $I$ is the midpoint of the segment $[O H]$ and the quadrilaterals $A E D F$, $A N D R, H N O R$ are all parallelograms.
850
+
851
+ Let $Q$ be the reflection of the point $M$ with respect to the midpoint of the segment $D P$. It follows that the quadrilaterals $P Q D M$ and $M N R D$ are the parallelograms, which imply that the quadrilateral $P Q R N$ is a parallelogram. So, $N O\|H R, N P\| R Q$, which imply that the points $H, R$ and $Q$ are collinear. We obtain that $m(\angle D Q H)=90^{\circ}$, i.e. the point $Q$ belongs on the nine points circle of the triangle $A B C$.
852
+
853
+ ## G5
854
+
855
+ Let $A B C$ be an acute angled triangle with ortocenter $H$, centroid $G$ and circumcircle $\omega$. Let $D$ and $M$ respectively be the intersection of lines $A H$ and $A G$ with side $B C$. Rays $M H$ and $D G$ interect $\omega$ again at $P$ and $Q$ respectively. Prove that $P D$ and $Q M$ intersect on $\omega$.
856
+
857
+ ## Solution 1
858
+
859
+ Note that it is enough to prove that $\angle D P A+\angle M Q A=180^{\circ}$.
860
+ Without loss of generality assume that $A B<A C$. Let the reflection of $H$ in point $M$ be $H^{\prime}$. Since $B H C H^{\prime}$ is a paralelogram we get
861
+
862
+ $$
863
+ \measuredangle B H^{\prime} C=\angle B H C=180^{\circ}-\measuredangle B A C
864
+ $$
865
+
866
+ which means $H^{\prime}$ lies on $\omega$. Also we get
867
+
868
+ $$
869
+ \angle A B H^{\prime}=\angle A B C+\angle C B H^{\prime}=\angle A B C+\angle B C H=90^{\circ}
870
+ $$
871
+
872
+ since $C H \perp A B$. This mean $A H^{\prime}$ is the diameter of $\omega$. This means $\measuredangle M P A=\angle H^{\prime} P A=90^{\circ}$. Since $\angle M P A=\angle M D A=90^{\circ}$ we get that $M, D, P, A$ are concyclic.
873
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-27.jpg?height=2395&width=2582&top_left_y=2071&top_left_x=540)
874
+
875
+ This gives us $\angle D P A+\angle A M D=180^{\circ}$. So now it is enough to prove that $\measuredangle A M B=\angle M Q A$.
876
+ Taking the homothety with center $G$ and factor -2 (the homothety taking the 9 point circle to the circumcircle of $A B C$ ), we get that $Q$ and $A$ are images of $D$ and $M$ respectively.
877
+
878
+ This means $A Q \| D M$ giving $A Q \| B C$. Since $A Q \| B C$ and $A, B, C, Q$ are concyclic this means $A B C Q$ is an iscoseles trapezoid.
879
+ This means $M$ lies on the perpendicular bisector of $A Q$. This gives us $M A=M Q$. Since $A Q \| B C$ this gives us $\angle A Q M=\angle Q A M=\angle A M B$ which concludes our problem.
880
+
881
+ ## Solution 2
882
+
883
+ We prove that $M, D, P, A$ are concyclic same as in solution 1. Let $P D$ intersect $\omega$ again at $S$ We see that this gives us $\measuredangle S A H^{\prime}=\measuredangle S P H^{\prime}=\measuredangle D P M=\measuredangle D A M$. Combining this with $\measuredangle B A H^{\prime}=\measuredangle C A D$ we get:
884
+
885
+ $$
886
+ \measuredangle S A H^{\prime}+\measuredangle S A B=\measuredangle H^{\prime} A B=\measuredangle C A D=\measuredangle D A M+\measuredangle M A C
887
+ $$
888
+
889
+ ## Giving us
890
+
891
+ $$
892
+ \measuredangle S A B=\measuredangle M A C
893
+ $$
894
+
895
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-28.jpg?height=2556&width=2251&top_left_y=1804&top_left_x=778)
896
+
897
+ Combining (*) with $\angle A S B=\measuredangle A C B=\measuredangle A C M$ we get triangles $A S B$ and $A C M$ are similar. This gives us
898
+
899
+ $$
900
+ \frac{A B}{A M}=\frac{S B}{C M} .
901
+ $$
902
+
903
+ Analogously we get triangles $A S C$ and $A B M$ are similar. This gives us
904
+
905
+ $$
906
+ \frac{A C}{A M}=\frac{S C}{B M} .
907
+ $$
908
+
909
+ Combining ( ${ }^{* *}$ ) and ( $\left.{ }^{(* *}\right)$ we get
910
+
911
+ $$
912
+ \frac{A B}{A C}=\frac{S B}{S C}
913
+ $$
914
+
915
+ since $B M=C M$. Let $S M$ intersect $\omega$ again at $Q^{\prime}$. Let $Q^{\prime} D$ intersect $A M$ at $G^{\prime}$. We wish to prove that $Q^{\prime} \equiv Q$ and $G^{\prime} \equiv G$. It is enough to prove that $A G^{\prime}=2 G^{\prime} M$.
916
+ Since triangles SMB and $C M Q^{\prime}$ are similar we get
917
+
918
+ $$
919
+ \frac{S B}{S M}=\frac{C Q}{C M} .
920
+ $$
921
+
922
+ Analogously SMC and BMQ' are similar and we get
923
+
924
+ $$
925
+ \frac{S M}{S C^{\prime}}=\frac{B M}{B Q^{\prime}} .
926
+ $$
927
+
928
+ Multiplying (2) and (3) we get $\frac{S B}{S C}=\frac{C Q^{\prime}}{B Q^{\prime}}$. Combining that with (1) we get
929
+
930
+ $$
931
+ \frac{A B}{A C}=\frac{C Q^{\prime}}{B Q^{\prime}} .
932
+ $$
933
+
934
+ Since $Q^{\prime}$ and $A$ are on the same side of $B C$ (4) gives us $A Q^{\prime} \| B C$. This means that $A B C Q^{\prime}$ is an isosceles trapezoid.
935
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-29.jpg?height=2582&width=2111&top_left_y=2319&top_left_x=698)
936
+
937
+ Let $Q^{\prime} S$ intersect $A D$ at point $T$. Since $M D \| A Q^{\prime}, M A=M Q^{\prime}$ and $\angle T A Q^{\prime}=90^{\circ}$ we get that $M$ is center of the circumcircle of the right triangle TAQ'.
938
+
939
+ Applying Menelaus' theorem on $D-G^{\prime}-Q^{\prime}$ and triangle $A M T$ we get
940
+
941
+ $$
942
+ \frac{A G^{\prime}}{M G^{\prime}} \cdot \frac{M Q^{\prime}}{T Q^{\prime}} \cdot \frac{T D}{A D}=1
943
+ $$
944
+
945
+ Since $M A=M T$ and $M D \perp A T$ this means
946
+
947
+ $$
948
+ D A=D T .
949
+ $$
950
+
951
+ Also since $M$ is the circumcenter of triangle $T A Q^{\prime}$ we get
952
+
953
+ $$
954
+ 2 M Q^{\prime}=T Q^{\prime} .
955
+ $$
956
+
957
+ Combining (5) with (6) and (7) we get $2 M G^{\prime}=A G^{\prime}$. This gives us $G^{\prime} \equiv G$ and $Q^{\prime} \equiv Q$, thus proving the problem statement.
958
+
959
+ ## G6
960
+
961
+ Construct outside the acute-angled triangle $A B C$ the isosceles triangles $A B A_{B}, A B B_{A}$, $A C A_{C}, A C C_{A}, B C B_{C}$ and $B C C_{B}$, so that
962
+
963
+ $$
964
+ A B=A B_{A}=B A_{B}, A C=A C_{A}=C A_{C}, B C=B C_{B}=C B_{C}
965
+ $$
966
+
967
+ and
968
+
969
+ $$
970
+ \measuredangle B A B_{A}=\measuredangle A B A_{B}=\measuredangle C A C_{A}=\measuredangle A C A_{C}=\measuredangle B C B_{C}=\measuredangle C B C_{B}=\alpha<90^{\circ} .
971
+ $$
972
+
973
+ Prove that the perpendiculars from $A$ to $B_{A} C_{A}$, from $B$ to $A_{B} C_{B}$ and from $C$ to $A_{C} B_{C}$ are concurrent.
974
+
975
+ ## Solution.
976
+
977
+ Lemma. If $B C D$ is the isoceles triangle which is outside the triangle $A B C$ and has
978
+
979
+ $$
980
+ \measuredangle C B D=\measuredangle B C D=90^{\circ}-\alpha: \stackrel{\text { not }}{=} \beta,
981
+ $$
982
+
983
+ then $A D \perp B_{A} C_{A}$.
984
+ Proof of the lemma. Construct an isosceles triangle $A B E$ outside the triangle $A B C$, so that $\measuredangle A B E=\measuredangle A E B=\beta$.
985
+ Then $A E=A B=A B_{A}$ and $\measuredangle E A B_{A}=\alpha$, so a rotation of center $A$ and angle $\alpha$ sends $C_{A}$ to $C$ and $B_{A}$ to $E$, hence $\Varangle\left(\overrightarrow{B_{A} C_{A}}, \overrightarrow{E C}\right)=\alpha$ (the angle between vectors is considered oriented). Also triangles $E B A$ and $B C D$ are similar, so a rotation of center $B$ and angle $\beta$, followed by
986
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-31.jpg?height=1113&width=1412&top_left_y=1978&top_left_x=1973)
987
+ a dilation of ratio $\frac{E B}{A B}=\frac{B C}{B D}$ sends $E$ to $A$ and $C$ to $D$, hence $\measuredangle(\overrightarrow{E C}, \overrightarrow{A D})=\beta$ (also oriented angle).
988
+ This shows that
989
+
990
+ $$
991
+ \measuredangle\left(\overrightarrow{B_{A} C_{A}}, \overrightarrow{A D}\right)=\measuredangle\left(\overrightarrow{B_{A} C_{A}}, \overrightarrow{E C}\right)+\measuredangle(\overrightarrow{E C}, \overrightarrow{A D})=\alpha+\beta=90^{\circ} .
992
+ $$
993
+
994
+ Returning to the solution of the problem, denote $A^{\prime}$ the intersection of $B C$ with the perpendicular from $A$ to $B_{A} C_{A}$. Then $A^{\prime}$ belongs to the segment $B C$ and
995
+
996
+ $$
997
+ \frac{A^{\prime} B}{A^{\prime} C}=\frac{A B \sin (B+\beta)}{A C \sin (C+\beta)}
998
+ $$
999
+
1000
+ Since similar relations are true for the intersections $B^{\prime}, C^{\prime}$ of the other two perpendiculars with the opposite sides, this yields
1001
+
1002
+ $$
1003
+ \frac{A^{\prime} B}{A^{\prime} C} \cdot \frac{B^{\prime} C}{B^{\prime} A} \cdot \frac{C^{\prime} A}{C^{\prime} B}=\frac{A B \sin (B+\beta)}{A C \sin (C+\beta)} \cdot \frac{B C \sin (C+\beta)}{B A \sin (A+\beta)} \cdot \frac{C A \sin (A+\beta)}{C B \sin (B+\beta)}=1
1004
+ $$
1005
+
1006
+ whence the conclusion.
1007
+ Remark. The conditions 'acute-angled' and ' $\alpha<90^{\circ}$ ' are not essential, but without them there are cases when $A^{\prime}$ does not belong to the segment $B C$, or the perpendiculars become parallel.
1008
+
1009
+ G7
1010
+ Let $A B C$ be an acute triangle with $A B \neq A C$ and circumcirle $\Gamma$. The angle bisector of $B A C$ intersects $B C$ and $\Gamma$ at $D$ and $E$ respectively. Circle with diameter $D E$ intersects $\Gamma$ again at $F \neq E$. Point $P$ is on $A F$ such that $P B=P C$ and $X$ and $Y$ are feet of perpendiculars from $P$ to $A B$ and $A C$ respectively. Let $H$ and $H^{\prime}$ be the ortocenters of $A B C$ and $A X Y$ respectively. $A H$ meets $\Gamma$ again at $Q$. If $A H^{\prime}$ and $H H^{\prime}$ intersect the circle with diameter $A H$ again at points $S$ and $T$, respectively, prove that the lines $A T, H S$ and $F Q$ are concurrent.
1011
+
1012
+ ## Solution
1013
+
1014
+ WLOG, assume $A B<A C$. Let $M$ be the midpoint of side $B C$ and let the circumcircle of $D F E$ intersect $A F$ again at $K$. Since
1015
+
1016
+ $$
1017
+ 90^{\circ}+\measuredangle M E D=180^{\circ}-\measuredangle M D E=\measuredangle A B C+\frac{\measuredangle B A C}{2}=\measuredangle A F E=\angle D F E+\angle A F D=90+\angle A F D
1018
+ $$
1019
+
1020
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-32.jpg?height=2489&width=1749&top_left_y=1817&top_left_x=382)
1021
+ $\measuredangle M^{\prime} C E=\measuredangle E C P$. From the angle bisector theorem we get
1022
+
1023
+ $$
1024
+ \frac{M^{\prime} E}{P E}=\frac{C M^{\prime}}{C P}=\frac{M^{\prime} L}{P L}
1025
+ $$
1026
+
1027
+ Multiplying (1) and (2) we get $\frac{M E}{L M}=\frac{M^{\prime} E}{M^{\prime} L}$ adding 1 on both sides we get $L M=L M^{\prime}$ from which it follows that $M \equiv M^{\prime}$ and thus $C E$ and $C L$ are the bisectors of $\measuredangle M C P$.
1028
+ Now we have
1029
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-33.jpg?height=2318&width=1811&top_left_y=770&top_left_x=398)
1030
+
1031
+ Since $X$ and $Y$ are perpendicular to $A B$ and $A C$ we have $B X P M$ and $C Y P M$ are concyclic. Here we get
1032
+
1033
+ $$
1034
+ \angle M Y C=\angle M P C=90^{\circ}-\angle B A C
1035
+ $$
1036
+
1037
+ and it follows that $Y M \perp A X$ Similarily we get $X M \perp A Y$ and so $M$ is the ortocentar of $\triangle A X Y$ giving us $M \equiv H^{\prime}$.
1038
+ Since ATHS and ATQF are both concyclic it is enough to prove that $H S F Q$ is concyclic. Since
1039
+
1040
+ $$
1041
+ \begin{aligned}
1042
+ \triangle B Q C & =180^{\circ}-\angle B A C \\
1043
+ & =\angle B H C
1044
+ \end{aligned}
1045
+ $$
1046
+
1047
+ and $H Q \perp B C$ it follows that $B C$ is the perpendicular bisector of $H Q$. It is enough to prove that $B C$ is the perpendicular bisector of $S F$. Let $A M$ and $T H$ meet $\Gamma$ again at points $A^{\prime}$ and $N$ respec-
1048
+ tively. Since $H N$ passes through the midpoint of side $B C$ and
1049
+
1050
+ $$
1051
+ \angle B H C=180-\angle B A C=\angle B N C
1052
+ $$
1053
+
1054
+ it follows that $B N C H$ is a paralelogram. From here we get that
1055
+
1056
+ $$
1057
+ \angle N C B=\angle H B C=90^{\circ}-\angle A C B
1058
+ $$
1059
+
1060
+ giving us $\measuredangle N C A=90^{\circ}$ and similarily $\measuredangle N B A=90^{\circ}$. This means $A N$ is the diameter of $\Gamma$, so
1061
+
1062
+ $$
1063
+ \begin{aligned}
1064
+ \angle N A^{\prime} S & =\angle N A^{\prime} A=90^{\circ} \\
1065
+ & =\angle H S A=\angle H S A^{\prime}
1066
+ \end{aligned}
1067
+ $$
1068
+
1069
+ and from here we have $H S \| A^{\prime} N$. Now since $H S \| A^{\prime} N$ and $M$ is the midpoint of $H N$ (because $B H C N$ is a paralelogram) we get
1070
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-33.jpg?height=1777&width=1734&top_left_y=3130&top_left_x=1600)
1071
+ that $H S N A$ is a paralelogram. Since
1072
+
1073
+ $$
1074
+ \measuredangle F A E=\measuredangle E A M=\measuredangle E A A^{\prime}
1075
+ $$
1076
+
1077
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-34.jpg?height=1661&width=1821&top_left_y=649&top_left_x=403)
1078
+ we get that $F A^{\prime} B C$ is an isocelese trapezoid which means that $M E$ is the perpendicular bisector of $F A^{\prime}$ (since it is the perpendicular bisector of $B C$ ).
1079
+ This gives us $B F=C A^{\prime}=B S$ and $C F=B A^{\prime}=C S$ giving us that $S B F C$ is a deltoid, meaning that $B C$ is the perpendicular bisector of FS. This means that $H S F Q$ is an isoceles trapezoid. Now from the radical axis theorem of the circumcircles of HSFQ, HSAT and $A T Q F$ we get that $Q F$,
1080
+ $H S, A T$ are concurrent.
1081
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-34.jpg?height=2499&width=2117&top_left_y=2381&top_left_x=819)
1082
+
1083
+ G8
1084
+ Given an acute triangle $\triangle A B C(A C \neq A B)$ and let $(C)$ be its circumcircle. The excircle $\left(C_{1}\right)$ corresponding to the vertex $A$, of center $I_{a}$, tangents to the side $B C$ at the point $D$ and to the extensions of the sides $A B, A C$ at the points $E, Z$ respectively. Let $I$ and $L$ are the intersection points of the circles $(C)$ and $\left(C_{1}\right), H$ the orthocenter of the triangle $\triangle E D Z$ and $N$ the midpoint of segment $E Z$. The parallel line through the point $I_{a}$ to the line $H L$ meets the line $H I$ at the point $G$. Prove that the perpendicular line ( $e$ ) through the point $N$ to the to the line $B C$ and the parallel line $(\delta)$ through the point $G$ to the line $I L$ meet each other on the line $\mathrm{HI}_{a}$
1085
+
1086
+ ## Solution
1087
+
1088
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-35.jpg?height=2527&width=2264&top_left_y=1669&top_left_x=875)
1089
+
1090
+ We have $(e) \perp B C$ and $I_{a} D \perp B C$, so $(e) \| I_{a} D$. Let $T$. $S$ be the midpoints of the segments $H I_{a}, H D$ respectively and $Y$ the point of intersection of the lines $H D, E Z$ Then, $T S \| I_{a} D$. $T S \perp B C$ and $S Y \perp E Z$
1091
+ The Euler circle ( $\omega$ ) of the triangle EDZ passes through the points $N, Y, S$. Therefore, the segment $S N$ is a diameter of the circle $(\omega)$. Thus, the center of $(\omega)$, let $T^{\prime}$, is the midpoint of the segment $S N$
1092
+
1093
+ On the other hand, we know that the center of Euler circle ( $\omega$ ) is the midpoint $T$ of $\mathrm{HI}_{a}$. So $T \equiv T^{\prime}$. Therefore, the line ( $e$ ) passes through the points $T, S$.
1094
+ Therefore, we get that the quadrilateral $H S I_{a} N$ is parallelogram and its diagonals meet each other at the point $T$.
1095
+ We consider the inversion $I\left(I_{a}, I_{a} Z^{2}\right)$. As $I_{a} Z^{2}=I_{a} A \cdot I_{a} N$ we have $I(N)=A$. Similarly, if $M_{1}, M_{2}$ the midpoints of the segments $D E, D Z$ respectively, we get. $I\left(M_{1}\right)=B$ and $I\left(M_{2}\right)=C$.
1096
+ Therefore, the circumcircle ( $C$ ) of the triangle $A B C$ is the image of the circle ( $\omega$ ) under the inversion $I$ and the points of the intersection of the circles and ( $\omega$ ) are invariant under this inversion. But it is well known that the circle of inversion passes through the points of the intersection of the circles $(C)$ and ( $\omega$ ). Thus, the Euler circle ( $\omega$ ) passes through the points I,L.
1097
+
1098
+ Also, we consider the inversion $J\left(H, r^{2}\right)$ with
1099
+
1100
+ $$
1101
+ r^{2}=H X \cdot H Z=H D \cdot H Y=H W \cdot H E
1102
+ $$
1103
+
1104
+ where $X, W, Y$ the traces of the altitudes of the triangle $E D Z$ on its sides. Then, $J(Z)=X$, $J(D)=Y$ and $J(E)=W$. Therefore, the circumcircle $\left(C_{1}\right)$ of the triangle $A B C$ is the image of the circle $(\omega)$ under the inversion $J$. Thus, the circle of inversion $J$ passes through the points $I, L$.
1105
+ We conclude that $H I=H L$ and $H I_{a} \perp I L$ and since $(\delta) \| I L$, we have $H I_{a} \perp(\delta)$.
1106
+ If, $R$ is the point of intersection of the lines $(\delta), H L$, we get that quadrilateral $H R I_{a} G$ is parallelogram and its diagonals meet each other at the point $T$. So, the perpendicular line (e) through the point $N$ to the to the line $B C$ and the parallel line $(\delta)$ through the point $G$ to the line $I L$, meet each other on the line $H I_{a}$.
1107
+
1108
+ ## COMBINATORICS
1109
+
1110
+ ## C1
1111
+
1112
+ A grasshopper is sitting at an integer point in the Euclidean plane. Each second it jumps to another integer point in such a way that the jump vector is constant. A hunter that knows neither the starting point of the grasshopper nor the jump vector (but knows that the jump vector for each second is constant) wants to catch the grasshopper. Each second the hunter can choose one integer point in the plane and, if the grasshopper is there, he catches it. Can the hunter always catch the grasshopper in a finite amount of time?
1113
+
1114
+ ## Solution
1115
+
1116
+ The hunter can catch the grasshopper. Here is the strategy for him. Let $f$ be any bijection between the set of positive integers and the set $\{((x, y),(u, v)): x, y, u, v \in \mathbb{Z}\}$, and denote
1117
+
1118
+ $$
1119
+ f(t)=\left(\left(x_{t}, y_{t}\right),\left(u_{t}, v_{t}\right)\right) .
1120
+ $$
1121
+
1122
+ In the second $t$, the hunter should hunt at the point $\left(x_{t}+t u_{t}, y_{t}+t v_{t}\right)$. Let us show that this strategy indeed works.
1123
+ Assume that the grasshopper starts at the point ( $x^{\prime}, y^{\prime}$ ) and that the jump vector is ( $u^{\prime}, v^{\prime}$ ). Then in the second $t$ the grasshopper is at the point $\left(x^{\prime}+t u^{\prime}, y^{\prime}+t v^{\prime}\right)$. Let
1124
+
1125
+ $$
1126
+ t^{\prime}=f^{-1}\left(\left(x^{\prime}, y^{\prime}\right),\left(u^{\prime}, v^{\prime}\right)\right)
1127
+ $$
1128
+
1129
+ The hunter's strategy dictates that in the second $t^{\prime}$ he searches for the grasshopper at the point $\left(x_{t^{\prime}}+t^{\prime} u_{t^{\prime}}, y_{t^{\prime}}+t^{\prime} v_{t^{\prime}}\right)$, which is actually $\left(x^{\prime}+t^{\prime} u^{\prime}, y^{\prime}+t^{\prime} v^{\prime}\right)$, and this is precisely the point where the grasshopper is in the second $t^{\prime}$. This completes the proof.
1130
+
1131
+ C2
1132
+ Let $n, a, b, c$ be natural numbers. Every point on the coordinate plane with integer coordinates is colored in one of $n$ colors. Prove there exists $c$ triangles whose vertices are colored in the same color, which are pairwise congruent, and which have a side whose lenght is divisible by $a$ and a side whose lenght is divisible by $b$.
1133
+
1134
+ ## Solution
1135
+
1136
+ Let the colors be $d_{1}, d_{2}, d_{3} \ldots, d_{n}$. Look at the coordinates
1137
+
1138
+ $$
1139
+ (k, 0+(n+1) a b r),(k, a b+(n+1) a b r),(k, 2 a b+(n+1) a b r), \ldots,(k, n a b+(n+1) a b r)
1140
+ $$
1141
+
1142
+ for integers $k$ and $r$. By the pigeonhole principle there are two points of the same color. For every pair ( $k, r$ ) we say the color $d_{i}$ is $(k, r)$-good if at least two coordinates
1143
+
1144
+ $$
1145
+ (k, 0+(n+1) a b r),(k, a b+(n+1) a b r),(k, 2 a b+(n+1) a b r), \ldots,(k, n a b+(n+1) a b r)
1146
+ $$
1147
+
1148
+ are colored by color $d_{i}$. Fixing $r$ and taking $k=0, a b, 2 a b, \ldots, n^{2} a b$ get that some color, say $d_{1}$, was $(k, r)$-good for at least $n+1$.
1149
+ Among the $n+1$ pairs $(x, y)$ there exists two which share the same $x$ cordinate. We call such quadruple $r$-great. In every $r$-great quadruple there are two triangle whose vertecies are all the same color and whose two sides are divisible by $a b$. Taking
1150
+
1151
+ $$
1152
+ r=0.1,2, \ldots, n\left(c\left(\left(^{(n+1)\left(n^{2}+1\right)} 3{ }^{3}\right)+1\right)+1\right)+1
1153
+ $$
1154
+
1155
+ we get that there is one color which is in a $r$-great quadruple for at least
1156
+
1157
+ $$
1158
+ c\left(\left(^{(n+1)\left(n^{2}+1\right)} 3-1\right)+1\right.
1159
+ $$
1160
+
1161
+ different values of $r$. Let this color be $d_{1}$. Since there are less than $\binom{\left.(n+1) n^{2}+1\right)}{3}$ possible triangles in any $r$-great quadruple (among $c\left(\left(^{(n+1)\left(n^{2}+1\right)}\right)+1\right)+1 \quad r$-great quadruples with the color $d_{1}$ ) we get that there are $c+1$ triangles which are the same and the same color $d_{1}$ and with two sides divisible by $a b$. This concludes the problem.
1162
+
1163
+ C3
1164
+ Let $n \geq 4$ points in the plane, no three of them are collinear. Prove that the number of parallelograms of area 1 , formed by these points, is at most $\frac{n^{2}-3 n}{4}$.
1165
+
1166
+ ## Solution
1167
+
1168
+ Fix a direction in the plane. We cannot have three points in the same line parallel to the direction so suppose that in that direction there are $k$ pairs of points, each pair belonging to a parallel line to the fixed direction. Then there are at most $k-1$ parallelograms of area 1 formed by these $k$ pairs of points.
1169
+ Summing over all directions we get that the number of parallelograms of area 1 are at most $\binom{n}{2}-s$ where $s$ is the number of different directions. But in that way we count every parallelogram two times, so the that the number of parallelograms of area 1 is at most $\frac{\binom{n}{2}-s}{2}$. We will prove that $s \geq n$. Indeed, taking the convex hull of the $n$ points, let $x$ be a point on the boundary of the convex hull. Because the convex hull has at least three points on its boundary, we can take two points which are neighbors of $x$ in the convex hull, say $y, z$ these points. Then every segment starting from $x$ has different direction from $y z$. So we have at least $n-1+1=n$ different directions. So the number of parallelograms is at most $\frac{\binom{n}{2}-n}{2}=\frac{n^{2}-3 n}{4}$.
1170
+
1171
+ ## C4
1172
+
1173
+ For any set of points $A_{1}, A_{2}, \ldots, A_{n}$ on the plane, one defines $r\left(A_{1}, A_{2}, \ldots, A_{n}\right)$ as the radius of the smallest circle that contains all of these points. Prove that if $n \geq 3$, there are indices $i, j, k$ such that
1174
+
1175
+ $$
1176
+ r\left(A_{1}, A_{2}, \ldots, A_{n}\right)=r\left(A_{1}, A_{,}, A_{k}\right)
1177
+ $$
1178
+
1179
+ ## Solution.
1180
+
1181
+ We start with a lemma.
1182
+ Lemma. If the triangle $A B C$ is acute, $r(A, B, C)$ is its circumradius and if it is obtuse. $r(A, B, C)$ is half the length of its longest side.
1183
+
1184
+ ## Proof.
1185
+
1186
+ Let us do the acute case first. The circumcircle contains the vertices, so $r(A, B, C)$ is not greater than the circumradius. Now, let us prove that no smaller circle contains all three vertices. If there is a smaller circle, let its center be $P$. Further, let the circumcenter be $O$
1187
+
1188
+ Since $A B C$ is acute, $O$ is in the interior. Consider the line that passes through $O$ and is parallel to $B C$. Let us call it $l_{A}$ and define $l_{B}$ and $l_{C}$. similarly. Now, consider the set of points that are on the opposite side of $I_{A}$ with respect to
1189
+ $A$. Call this set $S_{A}$ and define $S_{B}$ and
1190
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-40.jpg?height=1470&width=1548&top_left_y=1644&top_left_x=1750)
1191
+ $S_{C}$ similarly. It is easily seen (by geometry) that $S_{A} \cap S_{B} \cap S_{C} \cdot=\varnothing$. As such, assume $P \notin S_{A}$ without loss of generality. That is to say, $P$ is on the same side of $I_{A}$ as $A$. Now. consider the perpendicular bisector of $B C$ and assume that $P$, w.lo.g, is on the same side of this line as $C$. Under these circumstances, $|P B| \geqslant|O B|$. Thus, the smaller circle centered at $P$ must exclude $B$.
1192
+ In the obtuse case, let $\measuredangle B A C \geq 90^{\circ}$. Then $B C$ is the longest side. The circle with diameter $B C$ contains all three vertices. Therefore. $r(A, B, C)$ is not greater than $\frac{1}{2}|B C|$. But any smaller circle will clearly exclude at least one of $B$ and $C$.
1193
+ Now, let us return to the original problem. Note that there must be points $A, B, C$ among $A_{1}, A_{2}, \ldots, A_{n}$ such that the circumcircle of $A B C$ contains all $n$ points. One can see this as follows: First start with a large circle that contains all $n$ points. Then shrink it while keeping the center fixed, until one of the $n$ points is on the circle and call this point $A$. Then shrink it keeping the point $A$ in place and moving the center closer to $A$. until another point $B$ is on the circle. Then keep the line $A B$ fixed while moving the center toward it or away from it so
1194
+ that another $C$ among the $n$ points appears on the circle. It is easy to see that this procedure is doable.
1195
+ Consider all such triples $A, B, C$ such that the circumcircle of $A B C$ contains all of $A_{1}, A_{2}, \ldots, A_{n}$. Now choose the one among them with the smallest circumradius and let it be $A_{i}, A_{j}, A_{k}$. If $A_{i} A_{j} A_{k}$ is an acute triangle, any smaller circle will exclude one of $A_{1}, A_{j}, A_{k}$ by the lemma above. Therefore,
1196
+
1197
+ $$
1198
+ r\left(A_{1}, A_{2}, \ldots, A_{n}\right)=\text { circumradius of } A_{i} A_{j} A_{k}=r\left(A_{i}, A_{j}, A_{k}\right)
1199
+ $$
1200
+
1201
+ If $A_{i} A_{j} A_{k}$ is an obtuse triangle, let $A_{l}$ be its obtuse angle. We wish to prove that the circle with diameter $A_{j} A_{k}$ contains all $n$ points. This will mean that
1202
+
1203
+ $$
1204
+ r\left(A_{1}, A_{2}, \ldots, A_{n}\right)=\frac{1}{2}\left|A_{j} A_{k}\right|=r\left(A_{i}, A_{j}, A_{k}\right)
1205
+ $$
1206
+
1207
+ and we will be done. If there are no points on the opposite side of $A_{j} A_{k}$ w.r.t. $A_{i}$, then this assertion is clear. If there are some points on that side, choose the one $X$ such that $\measuredangle A_{j} X A_{k}$ is smallest possible. Then the circumcircle of $A_{j} X A_{k}$ contains all $n$ points. However, by the choice of $A_{i}$, the circumradius of $A_{j} X A_{k}$ cannot be less than that of $A_{i} A_{j} A_{k}$. Thus, $\measuredangle A_{j} X A_{k} \geq \measuredangle A_{j} A_{i} A_{k} \geq 90^{\circ}$. As such, the circle with diameter $A_{j} A_{k}$ contains all $n$ points.
1208
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-41.jpg?height=1289&width=1641&top_left_y=2386&top_left_x=1062)
1209
+
1210
+ Figure 1: The circumcircles of $A_{i} A_{j} A_{k}$ and $A_{j} X A_{k}$ as well as the circle with diameter $A_{j} A_{k}$ are shown.
1211
+
1212
+ Remark. The problem selection committee recommended formulation of the task to improve.
1213
+
1214
+ ## C 5
1215
+
1216
+ We have $n$ students sitting at a round table. Initially each student is given one candy. At each step each student having candies either picks one of its candies and gives it to one of its neighbouring students, or distributes all of its candies to its neighbouring students in any way he wishes. A distribution of candies is called legal if it can be reached from the initial distribution via a sequence of steps.
1217
+ Determine the number of legal distributions. (All the candies are udentical.)
1218
+
1219
+ ## Solution
1220
+
1221
+ The answer turns out to be $\binom{2 n-1}{n}$ if $n$ is odd and $\binom{2 n-1}{n}-2\left(\begin{array}{c}\frac{3 n}{2}-1\end{array}\right)$ if $n$ is even.
1222
+ Case 1. Suppose $n$ is odd, say $n=2 m+1$. In this case we will show that any distribution of candies is legal. Thus the number of legal distributions is indeed ( $\left.\begin{array}{c}2 n-1 \\ n\end{array}\right)$.
1223
+ In this case we can achieve the above claim by letting each student to always distribute all of its candies to its two neighbouring students in some way. Thus at each step each candy will move either one position clockwise or one anticlockwise.
1224
+ We now look at the initial distribution of candies and the required final distribution. We specify arbitrarily for each candy in the initial distribution, the position we wish this candy to end up in the required final distribution. Because $n$ is odd, either the clockwise distance or the anticlockwise distance between the initial position of the candy and the required final position is even and at most $m$.
1225
+ Thus after an even number of steps (at most $m$ ) we can move each candy to its required final position. (Note that if the candy reaches the required position earlier. we can move it back and forth until all candies reach their required position.) This completes the proof of our claim in this case.
1226
+ Case 2. Suppose $n$ is even, say $n=2 m$. Let $x_{1} \ldots \ldots x_{2 m}$ be the students in this cyclic order. Observe that initially the students with even indices (even students) have at least one candy in total, and so do the students with odd indices (odd students). This property is preserved after each step.
1227
+ We will show that every distribution in which the even students have at least one candy in total and the odd students also have at least one candy in total is legal.
1228
+ Let us suppose that the required final distribution has $a$ candies in odd positions and $b$ candies in even positions. (Where $a, b \geq 1$.) It will be enough to reach any position with $a$ candies in even positions and $b$ candies in odd positions as then we can follow the same approach as in Case 1.
1229
+ To achieve this we will first move all candies to students $x_{1}$ and $x_{2}$. This is easy by specifying that at each step $x_{1}$ moves all of its candies to $x_{2}$ while for $1 \leq r \leq 2 m-1$ student $x_{r+1}$ moves all of its candies to $x_{r}$.
1230
+ Suppose that we now have $a+k$ candies at $x_{1}$ and $b-k$ candies at $x_{2}$ where without loss of generality $k \geq 0$. If $k=0$ we have reached our target. If not, in the next step $x_{1}$ moves a candy to $x_{2}$ and $x_{2}$ moves a candy to $x_{3}$. In the next step $x_{1}$ (it still has $a+k-1 \geq a>0$
1231
+ candies) moves a candy to $x_{2}, x_{2}$ moves a candy to $x_{1}$ and $x_{3}$ moves a candy to $x_{2}$. We now have $a+k-1$ candies in $x_{1}$ and $b+1-k$ in $x_{2}$. Repeating this process another $k-1$ times we end up with $a$ candies in $x_{1}$ and $b$ candies in $x_{2}$ as required.
1232
+ It remains to count the total number of legal configurations in this case. This is indeed equal to
1233
+
1234
+ $$
1235
+ \binom{2 n-1}{n}-2\binom{\frac{3 n}{2}-1}{n}
1236
+ $$
1237
+
1238
+ as $\binom{2 n-1}{n}$ counts the total number of configurations while $\binom{\frac{3 n}{2}-1}{n}$ counts the number of illegal configurations where either all $n$ candies belong to the $\frac{n}{2}$ odd positions or all $n$ candies belong to the $\frac{n}{2}$ even positions.
1239
+
1240
+ C6
1241
+ What is the least positive integer $k$ such that, in every convex 101 -gon, the sum of any $k$ diagonals is greater than or equal to the sum of the remaining diagonals?
1242
+
1243
+ ## Solution
1244
+
1245
+ Let $P Q=1$. Consider a convex 101 -gon such that one of its vertices is at $P$ and the remaining 100 vertices are within $\varepsilon$ of $Q$ where $\varepsilon$ is an arbitrarily small positive real. Let $k+l$ equal the total number $\frac{101.98}{2}=4949$ of diagonals. When $k \leq 4851$. the sum of the $k$ shortest diagonals is arbitrarily small. When $k \geq 4851$, the sum of the $k$ shortest diagonals is arbitrarily close to $k-4851=98-l$ and the sum of the remaining diagonals is arbitrarily close to $l$. Therefore, we need to have $l \leq 49$ and $k \geq 4900$.
1246
+ We proceed to show that $k=4900$ works. To this end, colour all $l=49$ remaining diagonals green. To each green diagonal $A B$, apart from, possibly, the last one, we will assign two red diagonals $A C$ and $C B$ so that no green diagonal is ever coloured red and no diagonal is coloured red twice.
1247
+ Suppose that we have already done this for $0 \leq i \leq 48$ green diagonals (thus forming $i$ red-red-green triangles) and let $A B$ be up next. Let $D$ be the set of all diagonals emanating from $A$ or $B$ and distinct from $A B$ : we have $|D|=2 \cdot 97=194$. Every red-red-green triangle formed thus far has at most two sides in $D$. Therefore, the subset $E$ of all as-of-yetuncoloured diagonals in $D$ contains at least 194-2i elements.
1248
+ When $i \leq 47,194-2 i \geq 100$. The total number of endpoints distinct from $A$ and $B$ of diagonals in $D$. however, is 99 . Therefore, two diagonals in $E$ have a common endpoint $C$ and we can assign $A C$ and $C B$ to $A B$. as needed.
1249
+ The case $i=48$ is slightly more tricky: this time, it is possible that no two diagonals in $E$ have a common endpoint other than $A$ and $B$. but, if so, then there are two diagonals in $E$ that intersect in a point interior to both. Otherwise, at least one (say, $a$ ) of the two vertices adjacent to $A$ is cut off from $B$ by the diagonals emanating from $A$ and at least one (say, $b$ ) of the two vertices adjacent to $B$ is cut off from $A$ by the diagonals emanating from $B$ (and $a \neq b$ ). This leaves us with at most 97 suitable endpoints and at least 98 diagonals in $E$. a contradiction.
1250
+ By the triangle inequality, this completes the solution.
1251
+
1252
+ ## $\mathbb{O}_{1}^{2}$ $R_{1}$
1253
+
1254
+ ## Union of Mathematicians of Macedonia
1255
+
1256
+ Sponsored by
1257
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-48.jpg?height=229&width=519&top_left_y=4473&top_left_x=1530)
1258
+
1259
+ Homisinan
1260
+
Balkan_Shortlist/md/en-2018_bmo_shortlist.md ADDED
@@ -0,0 +1,799 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Mathematical Olympiad
2
+
3
+ ## The shortlisted problems should be kept strictly confidential until the Balkan MO 2019.
4
+
5
+ ## Contributing countries
6
+
7
+ The Organising Committee and the Problem Selection Committee of BMO 2018 thank the following 8 countries for submitting 30 problems in total:
8
+
9
+ Albania, Bulgaria, Cyprus, Greece, Iran,
10
+ FYR Macedonia, Romania, United Kingdom.
11
+
12
+ ## Problem Selection Committee
13
+
14
+ - Dušan Đukić (chairman)
15
+ - Marko Radovanović
16
+ «blank page»
17
+
18
+
19
+ ## P R O B L E M S
20
+
21
+ ## Algebra
22
+
23
+ A1. Let $a, b, c$ be positive real numbers such that $a b c=\frac{2}{3}$. Prove that
24
+
25
+ $$
26
+ \frac{a b}{a+b}+\frac{b c}{b+c}+\frac{c a}{c+a} \geqslant \frac{a+b+c}{a^{3}+b^{3}+c^{3}} .
27
+ $$
28
+
29
+ A2. Two ants start at the same point in the plane. Each minute they choose whether to walk due north, east, south or west. They each walk 1 meter in the first minute. In each subsequent minute the distance they walk is multiplied by a rational number $q>0$. They meet after a whole number of minutes, but have not taken exactly the same route within that time. Determine all possible values of q. (Jeremy King, United Kingdom)
30
+
31
+ A3. Show that for every positive integer $n$ we have:
32
+
33
+ $$
34
+ \sum_{k=0}^{n}\left(\frac{2 n+1-k}{k+1}\right)^{k}=\left(\frac{2 n+1}{1}\right)^{0}+\left(\frac{2 n}{2}\right)^{1}+\cdots+\left(\frac{n+1}{n+1}\right)^{n} \leqslant 2^{n}
35
+ $$
36
+
37
+ (Dorlir Ahmeti, Albania)
38
+
39
+ A4. Let $a, b, c$ be positive real numbers such that $a b c=1$. Prove that the following inequality holds:
40
+
41
+ $$
42
+ 2\left(a^{2}+b^{2}+c^{2}\right)\left(\frac{1}{a^{2}}+\frac{1}{b^{2}}+\frac{1}{c^{2}}\right) \geqslant 3(a+b+c+a b+b c+c a)
43
+ $$
44
+
45
+ (Florin Rotaru, Romania)
46
+ A5. Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be a concave function and let $g: \mathbb{R} \rightarrow \mathbb{R}$ be continuous. Given that
47
+
48
+ $$
49
+ f(x+y)+f(x-y)-2 f(x)=g(x) y^{2}
50
+ $$
51
+
52
+ for all $x, y \in \mathbb{R}$, prove that $f$ is a quadratic function.
53
+ (Peter Gaydarov, Bulgaria)
54
+
55
+ A6. Let $n$ be a positive integer and let $x_{1}, \ldots, x_{n}$ be real numbers. Show that
56
+
57
+ $$
58
+ \sum_{i=1}^{n} x_{i}^{2} \geqslant \frac{1}{n+1}\left(\sum_{i=1}^{n} x_{i}\right)^{2}+\frac{12\left(\sum_{i=1}^{n} i x_{i}\right)^{2}}{n(n+1)(n+2)(3 n+1)}
59
+ $$
60
+
61
+ (Marios Voskou, Cyprus)
62
+
63
+ ## Combinatorics
64
+
65
+ C1. Let $N \geqslant 3$ be an odd integer. $N$ tennis players take part in a league. Before the league starts, a committee ranks the players in some order based on perceived skill. During the league, each pair of players plays exactly one match, and each match has one winner. A match is considered an upset if the winner had a lower initial ranking than the loser. At the end of the league, the players are ranked according to number of wins, with the initial ranking used to rank players with the same number of wins. It turns out that the final ranking is the same as the initial ranking. What is the largest possible number of upsets?
66
+ (Dominic Yeo, United Kingdom)
67
+
68
+ C2. Alice and Bob play the following game: They start with two non-empty piles of coins. Taking turns, with Alice playing first, they choose a pile with an even number of coins and move half of the coins of this pile to the other pile. The game ends if a player cannot move, or if we reach a previously reached position. In the first case, the player who cannot move loses. In the second case, the game is declared a draw.
69
+ Determine all pairs $(a, b)$ of positive integers such that if initially the two piles have $a$ and $b$ coins respectively, then Bob has a winning strategy.
70
+ (Demetres Christofides, Cyprus)
71
+ C3. An open necklace can contain rubies, emeralds and sapphires. At every step we can perform any of the following operations:
72
+ $\left(1^{\circ}\right)$ We can replace two consecutive rubies with an emerald and a sapphire, where the emerald is on the left of the sapphire.
73
+ $\left(2^{\circ}\right)$ We can replace three consecutive emeralds with a sapphire and a ruby, where the sapphire is on the left of the ruby.
74
+ (3 ) If we find two consecutive sapphires then we can remove them.
75
+ (4 ) If we find consecutively and in this order a ruby, an emerald, and a sapphire, then we can remove them.
76
+
77
+ Furthermore we can also reverse all of the above operations. For example, by reversing $\left(3^{\circ}\right)$ we can put two consecutive sapphires on any position we wish.
78
+ Initially the necklace has one sapphire (and no other precious stones). Decide, with proof, whether there is a finite sequence of steps such that at the end of this sequence the necklace contains one emerald (and no other precious stones).
79
+
80
+ Remark. A necklace is open if its precious stones are on a line from left to right. We are not allowed to move a precious stone from the rightmost position to the leftmost as we would be able to do if the necklace was closed. (Demetres Christofides, Cyprus)
81
+
82
+ ## Geometry
83
+
84
+ G1. In an acute triangle $A B C$, the midpoint of the side $B C$ is $M$ and the centers of the excircles relative to $M$ of the triangles $A M B$ and $A M C$ are $D$ and $E$ respectively. The circumcircle of the triangle $A B D$ meets line $B C$ at $B$ and $F$. The circumcircle of the triangle $A C E$ meets line $B C$ at $C$ and $G$. Prove that $B F=C G$.
85
+ (Petru Braica, Romania)
86
+
87
+ G2. Let $A B C$ be a triangle inscribed in circle $\Gamma$ with center $O$ and let $H$ its orthocenter and $K$ be the midpoint of $O H$. The tangent of $\Gamma$ at $B$ meets the perpendicular bisector of $A C$ meets at $L$ and the tangent of $\Gamma$ at $C$ meets the perpendicular bisector of $A B$ at $M$. Prove that $A K \perp L M$.
88
+ (Michalis Sarantis, Greece)
89
+
90
+ G3. Let $P$ be a point inside a triangle $A B C$ and let $a, b, c$ be the side lengths and $p$ the semi-perimeter of the triangle. Find the maximum value of
91
+
92
+ $$
93
+ \min \left(\frac{P A}{p-a}, \frac{P B}{p-b}, \frac{P C}{p-c}\right)
94
+ $$
95
+
96
+ over all possible choices of triangle $A B C$ and point $P$.
97
+ (Elton Bojaxhiu, Albania)
98
+
99
+ G4. A quadrilateral $A B C D$ is inscribed in a circle $k$, where $A B>C D$ and $A B$ is not parallel to $C D$. Point $M$ is the intersection of the diagonals $A C$ and $B D$ and point $H$ is the foot of the perpendicular from $M$ to $A B$. Given that $\varangle M H C=\varangle M H D$, prove that $A B$ is a diameter of $k$.
100
+ (Emil Stoyanov, Bulgaria)
101
+
102
+ G5. Let $A B C$ be an acute-angled triangle with $A B<A C<B C$ and let $D$ be an arbitrary point on the extension of $B C$ beyond $C$. The circle $c_{1}(A, A D)$ intersects the rays $A C$, $A B, C B$ at points $E, F, G$, respectively. The circumcircle $c_{2}$ of triangle $A F G$ intersects the lines $F E, B C, G E, D F$ again at points $J, H, H^{\prime}, J^{\prime}$. The circumcircle $c_{3}$ of triangle $A D E$ intersects the lines $F E, B C, G E, D F$ again at points $I, K, K^{\prime}, I^{\prime}$. Prove that the quadrilaterals $H I J K$ and $H^{\prime} I^{\prime} J^{\prime} K^{\prime}$ are cyclic and that their circumcenters coincide.
103
+ (Vangelis Psychas, Greece)
104
+
105
+ G6. In a triangle $A B C$ with $A B=A C, \omega$ is the circumcircle and $O$ its center. Let $D$ be a point on the extension of $B A$ beyond $A$. The circumcircle $\omega_{1}$ of triangle $O A D$ intersects the line $A C$ and the circle $\omega$ again at points $E$ and $G$, respectively. Point $H$ is such that $D A E H$ is a parallelogram. Line $E H$ meets circle $\omega_{1}$ again at point $J$. The line through $G$ perpendicular to $G B$ meets $\omega_{1}$ again at point $N$ and the line through $G$ perpendicular to $G J$ meets $\omega$ again at point $L$. Prove that the points $L, N, H, G$ lie on a circle.
106
+ (Theoklitos Paragyiou, Cyprus)
107
+
108
+ ## Number Theory
109
+
110
+ N1. For positive integers $m$ and $n$, let $d(m, n)$ be the number of distinct primes that divide both $m$ and $n$. For instance, $d(60,126)=d\left(2^{2} \times 3 \times 5,2 \times 3^{2} \times 7\right)=2$. Does there exist a sequence $\left(a_{n}\right)$ of positive integers such that:
111
+ (i) $a_{1} \geqslant 2018^{2018}$;
112
+ (ii) $a_{m} \leqslant a_{n}$ whenever $m \leqslant n$;
113
+ (iii) $d(m, n)=d\left(a_{m}, a_{n}\right)$ for all positive integers $m \neq n$ ?
114
+ (Dominic Yeo, United Kingdom)
115
+
116
+ N2. Find all functions $f: \mathbb{N} \rightarrow \mathbb{N}$ such that
117
+
118
+ $$
119
+ n!+f(m)!\mid f(n)!+f(m!)
120
+ $$
121
+
122
+ for all $m, n \in \mathbb{N}$.
123
+ (Dorlir Ahmeti and Valmir Krasniqi, Albania)
124
+
125
+ N3. Find all primes $p$ and $q$ such that $3 p^{q-1}+1$ divides $11^{p}+17^{p}$.
126
+ (Stanislav Dimitrov, Bulgaria)
127
+
128
+ N4. Let $P(x)=a_{d} x^{d}+\cdots+a_{1} x+a_{0}$ be a non-constant polynomial with nonnegative integer coefficients having $d$ rational roots. Prove that
129
+
130
+ $$
131
+ \operatorname{lcm}(P(m), P(m+1), \ldots, P(n)) \geqslant m\binom{n}{m}
132
+ $$
133
+
134
+ for all positive integers $n>m$.
135
+ (Navid Safaei, Iran)
136
+
137
+ N5. Let $x$ and $y$ be positive integers. If for each positive integer $n$ we have that
138
+
139
+ $$
140
+ (n y)^{2}+1 \mid x^{\varphi(n)}-1
141
+ $$
142
+
143
+ prove that $x=1$.
144
+ (Silouanos Brazitikos, Greece)
145
+ «blank page»
146
+
147
+ 《blank page»
148
+
149
+ ## S O L UTIONS
150
+
151
+ ## Algebra
152
+
153
+ A1. Let $a, b, c$ be positive real numbers such that $a b c=\frac{2}{3}$. Prove that
154
+
155
+ $$
156
+ \frac{a b}{a+b}+\frac{b c}{b+c}+\frac{c a}{c+a} \geqslant \frac{a+b+c}{a^{3}+b^{3}+c^{3}}
157
+ $$
158
+
159
+ (FYR Macedonia)
160
+
161
+ ## Solution.
162
+
163
+ By the AH mean inequality, we have
164
+
165
+ $$
166
+ \frac{a b}{a+b}+\frac{b c}{b+c}+\frac{c a}{c+a}=\frac{2}{3(a c+b c)}+\frac{2}{3(a b+a c)}+\frac{2}{3(a b+a c)} \geqslant \frac{3}{a b+a c+b c}
167
+ $$
168
+
169
+ so it only remains to prove that $\frac{3}{a b+a c+b c} \geqslant \frac{a+b+c}{a^{3}+b^{3}+c^{3}}$, or equivalently
170
+
171
+ $$
172
+ 3\left(a^{3}+b^{3}+c^{3}\right) \geqslant(a+b+c)(a b+a c+b c)
173
+ $$
174
+
175
+ The last inequality easily follows by summing $a^{3}+b^{3} \geqslant a b(a+b), a^{3}+c^{3} \geqslant a c(a+c)$, $b^{3}+c^{3} \geqslant b c(b+c)$ and $a^{3}+b^{3}+c^{3} \geqslant 3 a b c$.
176
+
177
+ A2. Two ants start at the same point in the plane. Each minute they choose whether to walk due north, east, south or west. They each walk 1 meter in the first minute. In each subsequent minute the distance they walk is multiplied by a rational number $q>0$. They meet after a whole number of minutes, but have not taken exactly the same route within that time. Determine all possible values of $q$.
178
+ (United Kingdom)
179
+
180
+ ## Solution.
181
+
182
+ Answer: $q=1$.
183
+ Let $x_{A}^{(n)}$ (resp. $x_{B}^{(n)}$ ) be the $x$-coordinates of the first (resp. second) ant's position after $n$ minutes. Then $x_{A}^{(n)}-x_{A}^{(n-1)} \in\left\{q^{n},-q^{n}, 0\right\}$, and so $x_{A}^{(n)}, x_{B}^{(n)}$ are given by polynomials in $q$ with coefficients in $\{-1,0,1\}$. So if the ants meet after $n$ minutes, then
184
+
185
+ $$
186
+ 0=x_{A}^{(n)}-x_{B}^{(n)}=P(q)
187
+ $$
188
+
189
+ where $P$ is a polynomial with degree at most $n$ and coefficients in $\{-2,-, 1,0,1,2\}$. Thus if $q=\frac{a}{b}(a, b \in \mathbb{N})$, we have $a \mid 2$ and $b \mid 2$, i.e. $q \in\left\{\frac{1}{2}, 1,2\right\}$.
190
+ It is clearly possible when $q=1$.
191
+ We argue that $q=\frac{1}{2}$ is not possible. Assume that the ants diverge for the first time after the $k$ th minute, for $k \geqslant 0$. Then
192
+
193
+ $$
194
+ \left|x_{B}^{(k+1)}-x_{A}^{(k+1)}\right|+\left|y_{B}^{(k+1)}-y_{A}^{(k+1)}\right|=2 q^{k}
195
+ $$
196
+
197
+ But also $\left|x_{A}^{(\ell+1)}-x_{A}^{(\ell)}\right|+\left|y_{A}^{(\ell+1)}-y_{A}^{(\ell)}\right|=q^{\ell}$ for each $l \geqslant k+1$, and so
198
+
199
+ $$
200
+ \left|x_{A}^{(n)}-x_{A}^{(k+1)}\right|+\left|y_{A}^{(n)}-y_{A}^{(k+1)}\right| \leqslant q^{k+1}+q^{k+2}+\ldots+q^{n-1}
201
+ $$
202
+
203
+ and similarly for the second ant. Combining (1) and (2) with the triangle inequality, we obtain for any $n \geqslant k+1$
204
+
205
+ $$
206
+ \left|x_{B}^{(n)}-x_{A}^{(n)}\right|+\left|y_{B}^{(n)}-y_{A}^{(n)}\right| \geqslant 2 q^{k}-2\left(q^{k+1}+q^{k+2}+\ldots+q^{n-1}\right),
207
+ $$
208
+
209
+ which is strictly positive for $q=\frac{1}{2}$. So for any $n \geqslant k+1$, the ants cannot meet after $n$ minutes. Thus $q \neq \frac{1}{2}$.
210
+ Finally, we show that $q=2$ is also not possible. Suppose to the contrary that there is a pair of routes for $q=2$, meeting after $n$ minutes. Now consider rescaling the plane by a factor $2^{-n}$, and looking at the routes in the opposite direction. This would then be an example for $q=1 / 2$ and we have just shown that this is not possible.
211
+
212
+ ## Solution 2.
213
+
214
+ Consider the ants' positions $\alpha_{k}$ and $\beta_{k}$ after $k$ steps in the complex plane, assuming that their initial positions are at the origin and that all steps are parallel to one of the axes. We have $\alpha_{k+1}-\alpha_{k}=a_{k} q^{k}$ and $\beta_{k+1}-\beta_{k}=b_{k} q^{k}$ with $a_{k}, b_{k} \in\{1,-1, i,-i\}$. If $\alpha_{n}=\beta_{n}$ for some $n>0$, then
215
+
216
+ $$
217
+ \sum_{k=0}^{n-1}\left(a_{k}-b_{k}\right) q^{k}=0, \quad \text { where } \quad a_{k}-b_{k} \in\{0, \pm 1 \pm i, \pm 2, \pm 2 i\}
218
+ $$
219
+
220
+ Note that the coefficient $a_{k}-b_{k}$ is always divisible by $1+i$ in Gaussian integers: indeed,
221
+
222
+ $$
223
+ c_{k}=\frac{a_{k}-b_{k}}{1+i} \in\{0, \pm 1, \pm i, \pm 1 \pm i\}
224
+ $$
225
+
226
+ Canceling $1+i$, we obtain $c_{0}+c_{1} q+\cdots+c_{n-1} q^{n-1}=0$. Therefore if $q=\frac{a}{b}(a, b \in \mathbb{N})$, we have $a \mid c_{0}$ and $b \mid c_{n-1}$ in Gaussian integers, which is only possible if $a=b=1$.
227
+
228
+ A3. Show that for every positive integer $n$ we have:
229
+
230
+ $$
231
+ \sum_{k=0}^{n}\left(\frac{2 n+1-k}{k+1}\right)^{k}=\left(\frac{2 n+1}{1}\right)^{0}+\left(\frac{2 n}{2}\right)^{1}+\cdots+\left(\frac{n+1}{n+1}\right)^{n} \leqslant 2^{n}
232
+ $$
233
+
234
+ ## Solution.
235
+
236
+ We shall prove that
237
+
238
+ $$
239
+ \binom{n}{k} \geqslant\left(\frac{2 n+1-k}{k+1}\right)^{k} \quad \text { for all } \quad k=0,1, \ldots, n
240
+ $$
241
+
242
+ The result will follow immediately, as $\sum_{k=0}^{n}\binom{n}{k}=2^{n}$.
243
+ Note that $(*)$ is trivial for $k=0$ and $k=n$. For $0<k<n$, by Hölder's inequality we have
244
+
245
+ $$
246
+ \binom{n}{k}=\left(1+\frac{n-k}{k}\right) \cdot\left(1+\frac{n-k}{k-1}\right) \cdots\left(1+\frac{n-k}{1}\right) \geqslant\left(1+\frac{n-k}{\sqrt[k]{k!}}\right)^{k} .
247
+ $$
248
+
249
+ Hence, it is enough to prove that
250
+
251
+ $$
252
+ 1+\frac{n-k}{\sqrt[k]{k!}} \geqslant \frac{2 n+1-k}{k+1}
253
+ $$
254
+
255
+ This is equivalent to $\sqrt[k]{k!} \leqslant \frac{k+1}{2}$, which follows from $\sqrt[k]{k!} \leqslant \frac{1+2+\cdots+k}{k}=\frac{k+1}{2}$.
256
+
257
+ ## Solution 2.
258
+
259
+ As in the previous solution, it is enough to prove (*).
260
+ First, we prove that
261
+
262
+ $$
263
+ (n-i+1)(n-k+i)(k+1)^{2} \geqslant i(k-i+1)(2 n+1-k)^{2} \quad \text { for all } i=1,2, \ldots, k
264
+ $$
265
+
266
+ Let us denote the left hand side of the previous inequality with $L$ and the left hand side with $R$. Then
267
+
268
+ $$
269
+ \begin{aligned}
270
+ & L=(n+1)^{2}(k+1)^{2}-(n+1)(k+1)^{3}+i(k-i+1)(k+1)^{2} \\
271
+ & R=4 i(k-i+1)(n+1)^{2}-4 i(k-i+1)(n+1)(k+1)+i(k-i+1)(k+1)^{2}
272
+ \end{aligned}
273
+ $$
274
+
275
+ So, it is enough to prove that
276
+
277
+ $$
278
+ (n-k)(k+1)^{2} \geqslant 4 i(k-i+1)(n-k),
279
+ $$
280
+
281
+ which follows from
282
+
283
+ $$
284
+ (k+1)^{2}-4 i(k-i+1)=(k+1-2 i)^{2} \geqslant 0 .
285
+ $$
286
+
287
+ Now, by ( $\#$ ) we have
288
+
289
+ $$
290
+ \binom{n}{k}^{2}=\prod_{i=1}^{k} \frac{(n-i+1)(n-k+i)}{i(k-i+1)} \geqslant \prod_{i=1}^{k}\left(\frac{2 n+1-k}{k+1}\right)^{2}=\left(\frac{2 n+1-k}{k+1}\right)^{2 k}
291
+ $$
292
+
293
+ which completes our proof.
294
+
295
+ A4. Let $a, b, c$ be positive real numbers such that $a b c=1$. Prove that the following inequality holds:
296
+
297
+ $$
298
+ 2\left(a^{2}+b^{2}+c^{2}\right)\left(\frac{1}{a^{2}}+\frac{1}{b^{2}}+\frac{1}{c^{2}}\right) \geqslant 3(a+b+c+a b+b c+c a)
299
+ $$
300
+
301
+ (Romania)
302
+
303
+ ## Solution.
304
+
305
+ First, we show that
306
+
307
+ $$
308
+ \frac{a}{b}+\frac{b}{c}+\frac{c}{a} \geqslant a b+b c+c a \quad \text { and } \quad \frac{a}{b}+\frac{b}{c}+\frac{c}{a} \geqslant a+b+c
309
+ $$
310
+
311
+ By AG inequality, we have
312
+
313
+ $$
314
+ \begin{aligned}
315
+ \frac{a}{b}+\frac{b}{c}+\frac{c}{a} & =\frac{1}{3}\left(\frac{a}{b}+\frac{a}{b}+\frac{c}{a}\right)+\frac{1}{3}\left(\frac{b}{c}+\frac{b}{c}+\frac{a}{b}\right)+\frac{1}{3}\left(\frac{c}{a}+\frac{c}{a}+\frac{b}{c}\right) \\
316
+ & \geqslant \frac{\sqrt[3]{a c}}{\sqrt[3]{b^{2}}}+\frac{\sqrt[3]{b a}}{\sqrt[3]{c^{2}}}+\frac{\sqrt[3]{c b}}{\sqrt[3]{a^{2}}}=\frac{\sqrt[3]{a b c}}{b}+\frac{\sqrt[3]{a b c}}{c}+\frac{\sqrt[3]{a b c}}{a} \\
317
+ & =a b+b c+c a
318
+ \end{aligned}
319
+ $$
320
+
321
+ Similarly, we have
322
+
323
+ $$
324
+ \begin{aligned}
325
+ \frac{a}{b}+\frac{b}{c}+\frac{c}{a} & =\frac{1}{3}\left(\frac{a}{b}+\frac{a}{b}+\frac{b}{c}\right)+\frac{1}{3}\left(\frac{b}{c}+\frac{b}{c}+\frac{c}{a}\right)+\frac{1}{3}\left(\frac{c}{a}+\frac{c}{a}+\frac{a}{b}\right) \\
326
+ & \geqslant \frac{\sqrt[3]{a^{2}}}{\sqrt[3]{b c}}+\frac{\sqrt[3]{b^{2}}}{\sqrt[3]{c a}}+\frac{\sqrt[3]{c^{2}}}{\sqrt[3]{a b}}=\frac{a}{\sqrt[3]{a b c}}+\frac{b}{\sqrt[3]{a b c}}+\frac{c}{\sqrt[3]{a b c}} \\
327
+ & =a+b+c
328
+ \end{aligned}
329
+ $$
330
+
331
+ which completes our proof of ( $\dagger$ ).
332
+ By Cauchy-Schwarz inequality we have
333
+
334
+ $$
335
+ \left(a^{2}+b^{2}+c^{2}\right)\left(\frac{1}{b^{2}}+\frac{1}{c^{2}}+\frac{1}{a^{2}}\right) \geqslant\left(\frac{a}{b}+\frac{b}{c}+\frac{c}{a}\right)^{2}
336
+ $$
337
+
338
+ which together with $\left(a^{2}+b^{2}+c^{2}\right)\left(1 / a^{2}+1 / b^{2}+1 / c^{2}\right) \geqslant 9$ leads to
339
+
340
+ $$
341
+ 2\left(a^{2}+b^{2}+c^{2}\right)\left(\frac{1}{a^{2}}+\frac{1}{b^{2}}+\frac{1}{c^{2}}\right) \geqslant\left(\frac{a}{b}+\frac{b}{c}+\frac{c}{a}\right)^{2}+9 \geqslant 6\left(\frac{a}{b}+\frac{b}{c}+\frac{c}{a}\right)
342
+ $$
343
+
344
+ Now, the desired inequality follows from ( $\dagger$ ).
345
+
346
+ ## Solution 2.
347
+
348
+ Set $a=x^{3}, b=y^{3}, c=z^{3}$ and denote $T_{p, q, r}=\sum_{s y m} x^{p} y^{q} z^{r}=x^{p} y^{q} z^{r}+y^{p} x^{q} z^{r}+\cdots$. The given inequality is expanded into
349
+
350
+ $$
351
+ 4 T_{12,6,0}+2 T_{6,6,6} \geqslant 3 T_{8,5,5}+3 T_{7,7,4}
352
+ $$
353
+
354
+ Applying the Schur inequality on triples $\left(x^{4} y^{2}, y^{4} z^{2}, z^{4} x^{2}\right)$ and $\left(x^{2} y^{4}, y^{2} z^{4}, z^{2} x^{4}\right)$ and summing them up yields
355
+
356
+ $$
357
+ T_{12,6,0}+T_{6,6,6} \geqslant T_{10,4,4}+T_{8,8,2}
358
+ $$
359
+
360
+ On the other hand, by the Muirhead inequality we have
361
+
362
+ $$
363
+ T_{12,6,0} \geqslant T_{6,6,6}, \quad T_{10,4,4} \geqslant T_{8,5,5}, \quad T_{8,8,2} \geqslant T_{7,7,4} .
364
+ $$
365
+
366
+ The four inequalities in (1) and (2) imply the desired inequality.
367
+
368
+ A5. Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be a concave function and let $g: \mathbb{R} \rightarrow \mathbb{R}$ be continuous. Given that
369
+
370
+ $$
371
+ f(x+y)+f(x-y)-2 f(x)=g(x) y^{2}
372
+ $$
373
+
374
+ for all $x, y \in \mathbb{R}$, prove that $f$ is a quadratic function.
375
+ (Bulgaria)
376
+
377
+ ## Solution.
378
+
379
+ We plug in the pairs $(a, x),(a, 2 x),(a+x, x)$ and $(a-x, x)$ to get
380
+
381
+ $$
382
+ \begin{aligned}
383
+ f(a+x)+f(a-x)-2 f(a) & =g(a) x^{2} \\
384
+ f(a+2 x)+f(a-2 x)-2 f(a) & =4 g(a) x^{2} \\
385
+ f(a+2 x)+f(a)-2 f(a+x) & =g(a+x) x^{2} \\
386
+ f(a-2 x)+f(a)-2 f(a-x) & =g(a-x) x^{2}
387
+ \end{aligned}
388
+ $$
389
+
390
+ respectively. Combining these equations in the form $2 E_{1}-E_{2}+E_{3}+E_{4}$ the left hand side vanishes, yielding an equation in $g:(g(a+x)+g(a-x)-2 g(a)) x^{2}=0$, i.e.
391
+
392
+ $$
393
+ g(a)=\frac{g(a+x)+g(a-x)}{2}
394
+ $$
395
+
396
+ Since $g$ is continuous, it must be linear, i.e. $g(x)=c_{1} x+c_{0}$. However, the original equation for $x=y$ together with the concavity condition now gives us
397
+
398
+ $$
399
+ 0 \geqslant f(2 x)+f(0)-2 f(x)=\left(x c_{1}+c_{0}\right) x^{2}
400
+ $$
401
+
402
+ for all $x$, which is only possible if $c_{1}=0$. Thus $g(x) \equiv c_{0}=2 A$ is constant and
403
+
404
+ $$
405
+ f(x+y)+f(x-y)-2 f(x)=2 A y^{2}
406
+ $$
407
+
408
+ This suggests that $f$ is a quadratic function, so we can set $f(x)=A x^{2}+f_{1}(x)$. Then $(*)$ becomes $f_{1}(x+y)+f_{1}(x-y)-2 f_{1}(x)=0$, so an easy induction gives us
409
+
410
+ $$
411
+ f_{1}(n x)-f_{1}(0)=n\left(f_{1}(x)-f_{1}(0)\right) \quad \text { for all } \quad n \in \mathbb{Z}
412
+ $$
413
+
414
+ By setting $f_{1}(0)=C$ and $f_{1}(1)=B+C$ we obtain $f_{1}(x)=B x+C$ and $f(x)=$ $A x^{2}+B x+C$ for all $x \in \mathbb{Q}$. By concavity of $f$ we conclude that $f(x)=A x^{2}+B x+C$ for all real $x$.
415
+
416
+ ## Remark.
417
+
418
+ In fact, $(*)$ implies that the second derivative of $f$ is constant by taking $y \rightarrow 0$ and the problem is solved. The solution presented here avoids use of derivatives.
419
+
420
+ A6. Let $n$ be a positive integer and let $x_{1}, \ldots, x_{n}$ be real numbers. Show that
421
+
422
+ $$
423
+ \sum_{i=1}^{n} x_{i}^{2} \geqslant \frac{1}{n+1}\left(\sum_{i=1}^{n} x_{i}\right)^{2}+\frac{12\left(\sum_{i=1}^{n} i x_{i}\right)^{2}}{n(n+1)(n+2)(3 n+1)}
424
+ $$
425
+
426
+ ## Solution.
427
+
428
+ Let $S=\frac{1}{n+1} \sum_{i=1}^{n} x_{i}$, and $y_{i}=x_{i}-S$ for $1 \leqslant i \leqslant n$. Then we have
429
+
430
+ $$
431
+ \sum_{i=1}^{n} i x_{i}=\sum_{i=1}^{n} i y_{i}+\frac{n(n+1)}{2} S
432
+ $$
433
+
434
+ and
435
+
436
+ $$
437
+ \sum_{i=1}^{n} y_{i}^{2}=\sum_{i=1}^{n} x_{i}^{2}-2 S \sum_{i=1}^{n} x_{i}+n S^{2}=\sum_{i=1}^{n} x_{i}^{2}-\frac{1}{n+1}\left(\sum_{i=1}^{n} x_{i}\right)^{2}-S^{2}
438
+ $$
439
+
440
+ Now, by the Cauchy-Schwarz inequality
441
+
442
+ $$
443
+ \begin{aligned}
444
+ \left(\sum_{i=1}^{n} i x_{i}\right)^{2} & =\left(\sum_{i=1}^{n} i y_{i}+\frac{n(n+1)}{2} S\right)^{2} \\
445
+ & \leqslant\left(\sum_{i=1}^{n} i^{2}+\frac{n^{2}(n+1)^{2}}{4}\right)\left(\sum_{i=1}^{n} y_{i}^{2}+S^{2}\right) \\
446
+ & =\frac{n(n+1)(n+2)(3 n+1)}{12} \cdot\left(\sum_{i=1}^{n} x_{i}^{2}-\frac{1}{n+1}\left(\sum_{i=1}^{n} x_{i}\right)^{2}\right)
447
+ \end{aligned}
448
+ $$
449
+
450
+ which completes our proof.
451
+
452
+ ## Remark.
453
+
454
+ It can be checked that equality holds if and only if $x_{i}=c(n(n+1)+2 i)$ for $1 \leqslant i \leqslant n$ and some $c \in \mathbb{R}$.
455
+
456
+ ## Combinatorics
457
+
458
+ C1. Let $N \geqslant 3$ be an odd integer. $N$ tennis players take part in a league. Before the league starts, a committee ranks the players in some order based on perceived skill. During the league, each pair of players plays exactly one match, and each match has one winner. A match is considered an upset if the winner had a lower initial ranking than the loser. At the end of the league, the players are ranked according to number of wins, with the initial ranking used to rank players with the same number of wins. It turns out that the final ranking is the same as the initial ranking. What is the largest possible number of upsets?
459
+ (United Kingdom)
460
+
461
+ ## Solution.
462
+
463
+ Answer: $\frac{(N-1)(3 N-1)}{8}$.
464
+ Suppose the players are ranked $1,2, \ldots, N=2 n+1$, where 1 is the highest ranking.
465
+ For $k \leqslant n$, the player ranked $k$ could have beaten at most $k-1$ players with a higher ranking. Thus the top $n$ players could have made at most $\sum_{k=1}^{n}(k-1)=\frac{n(n-1)}{2}$ upsets. On the other hand, the average score of all $2 n+1$ players is $n$, so the average score of the bottom $n+1$ players is not more than $n$, which implies that these $n+1$ players have at most $n(n+1)$ wins in total. Hence the total number of upsets is at most
466
+
467
+ $$
468
+ \frac{n(n-1)}{2}+n(n+1)=\frac{n(3 n+1)}{2}=\frac{(N-1)(3 N-1)}{8} .
469
+ $$
470
+
471
+ An example can be constructed as follows. Suppose that, for $1 \leqslant i \leqslant 2 n+1$, the player ranked $i$ beats the players ranked $i-1, i-2, \ldots, i-n$ (the rankings are counted modulo $N)$ and loses to the rest of the players. Thus each player has exactly $n$ wins. The player ranked $i$ for $i \leqslant n$ made $i-1$ upsets, whereas the player ranked $i$ for $i>n$ made $n$ upsets, so the total number of upsets is exactly $\sum_{i=1}^{n}(i-1)+(n+1) n=\frac{n(3 n+1)}{2}$.
472
+
473
+ ## Solution 2.
474
+
475
+ Write $N=2 n+1$. We only prove the upper bound.
476
+ Consider a tournament $\mathbb{T}$ with correct final ranking, but where not everyone won $n$ matches. Let $A$ be the worst-ranked player with the maximal number of wins, and let $B$ be the best-ranked player with minimal wins. Clearly, $A$ was ranked above $B$.
477
+ Assume $A$ beat $B$. Consider the tournament $\mathbb{T}^{\prime}$ obtained from $\mathbb{T}$ by reversing this result, and keeping all others the same. So $B$ beat $A$, which is an upset. $A$ is now the bestranked player with the second-most number of wins; $B$ is now the worst-ranked player with the second-least number of wins, and so the final ranking of $\mathbb{T}^{\prime}$ is still correct, but with one more upset than in $\mathbb{T}$.
478
+ Alternatively, assume $B$ beat $A$. Then there must have been a player $C$ such that $A$ beat $C$ and $C$ beat $B$. These are upsets if, respectively, $C$ was ranked above $A$, or
479
+ below $B$. It therefore cannot be the case that both of the matches involving $C$ and $\{A, B\}$ were upsets. Consider the tournament $\mathbb{T}^{\prime}$ obtained from $\mathbb{T}$ by reversing these two matches. $C$ 's number of wins stays fixed, while as before $A$ is now the best-ranked player with the second-most wins, and similar for $B$. Thus in $\mathbb{T}^{\prime}$ the final ranking is still correct, with either the same number of upsets as $\mathbb{T}$, or two more upsets than $\mathbb{T}$.
480
+ If we iterate this procedure, we eventually obtain a tournament $\overline{\mathbb{T}}$ where everyone won exactly $n$ matches, and with at least as many upsets as in the original tournament $\mathbb{T}$. We now bound the number of upsets in such a tournament $\overline{\mathbb{T}}$. Suppose the player ranked $i \leqslant \frac{N+1}{2}$ beat $K$ higher ranked players. Obviously $K \leqslant i-1$. Then the number of upsets involving $i$ is
481
+
482
+ $$
483
+ 2 K+\frac{N+1}{2}-i \leqslant 2(i-1)+\frac{N+1}{2}-i=\frac{N-1}{2}+i-1 .
484
+ $$
485
+
486
+ Similarly, for $i \geqslant \frac{N+1}{2}$ one proves that the number of upsets involving $i$ is at most $\frac{N-1}{2}+i-1$.
487
+ Finally, summing over all values of $i$ and dividing by 2 we obtain the desired result.
488
+
489
+ ## Remark.
490
+
491
+ We demand $N$ odd to avoid candidates providing a case distinction, rather than because the construction or the bounding argument is significantly different.
492
+
493
+ C2. Alice and Bob play the following game: They start with two non-empty piles of coins. Taking turns, with Alice playing first, they choose a pile with an even number of coins and move half of the coins of this pile to the other pile. The game ends if a player cannot move, or if we reach a previously reached position. In the first case, the player who cannot move loses. In the second case, the game is declared a draw.
494
+ Determine all pairs $(a, b)$ of positive integers such that if initially the two piles have $a$ and $b$ coins respectively, then Bob has a winning strategy.
495
+ (Cyprus)
496
+
497
+ ## Solution.
498
+
499
+ By $v_{2}(n)$ we denote the largest nonnegative integer $r$ such that $2^{r} \mid n$.
500
+ A position $(a, b)$ (i.e. two piles of sizes $a$ and $b$ ) is said to be $k$-happy if $v_{2}(a)=v_{2}(b)=k$ for some integer $k \geqslant 0$, and $k$-unhappy if $\min \left\{v_{2}(a), v_{2}(b)\right\}=k<\max \left\{v_{2}(a), v_{2}(b)\right\}$. We shall prove that Bob has a winning strategy if and only if the initial position is $k$-happy for some even $k$.
501
+
502
+ - Given a 0-happy position, the player in turn is unable to play and loses.
503
+ - Given a $k$-happy position $(a, b)$ with $k \geqslant 1$, the player in turn will transform it into one of the positions $\left(a+\frac{1}{2} b, \frac{1}{2} b\right)$ and $\left(b+\frac{1}{2} a, \frac{1}{2} a\right)$, both of which are ( $k-1$ )-happy because $v_{2}\left(a+\frac{1}{2} b\right)=v_{2}\left(\frac{1}{2} b\right)=v_{2}\left(b+\frac{1}{2} a\right)=v_{2}\left(\frac{1}{2} a\right)=k-1$.
504
+ Therefore, if the starting position is $k$-happy, after $k$ moves they will get stuck at a 0 -happy position, so Bob will win if and only if $k$ is even.
505
+ - Given a $k$-unhappy position $(a, b)$ with $k$ odd and $v_{2}(a)=k<v_{2}(b)=\ell$, Alice can move to position $\left(\frac{1}{2} a, b+\frac{1}{2} a\right)$. Since $v_{2}\left(\frac{1}{2} a\right)=v_{2}\left(b+\frac{1}{2} a\right)=k-1$, this position is ( $k-1$ )-happy with $2 \mid k-1$, so Alice will win.
506
+ - Given a $k$-unhappy position $(a, b)$ with $k$ even and $v_{2}(a)=k<v_{2}(b)=\ell$, Alice must not play to position $\left(\frac{1}{2} a, b+\frac{1}{2} a\right)$, because the new position is $(k-1)$-happy and will lead to Bob's victory. Thus she must play to position $\left(a+\frac{1}{2} b, \frac{1}{2} b\right)$. We claim that this position is also $k$-unhappy. Indeed, if $\ell>k+1$, then $v_{2}\left(a+\frac{1}{2} b\right)=$ $k<v_{2}\left(\frac{1}{2} b\right)=\ell-1$, whereas if $\ell=k+1$, then $v_{2}\left(a+\frac{1}{2} b\right)>v_{2}\left(\frac{1}{2} b\right)=k$.
507
+
508
+ Hence a $k$-unhappy position is winning for Alice if $k$ is odd, and drawing if $k$ is even.
509
+
510
+ C3. An open necklace can contain rubies, emeralds and sapphires. At every step we can perform any of the following operations:
511
+ $\left(1^{\circ}\right)$ We can replace two consecutive rubies with an emerald and a sapphire, where the emerald is on the left of the sapphire.
512
+ $\left(2^{\circ}\right)$ We can replace three consecutive emeralds with a sapphire and a ruby, where the sapphire is on the left of the ruby.
513
+ (3 ) If we find two consecutive sapphires then we can remove them.
514
+ (4 ) If we find consecutively and in this order a ruby, an emerald, and a sapphire, then we can remove them.
515
+
516
+ Furthermore we can also reverse all of the above operations. For example, by reversing $\left(3^{\circ}\right)$ we can put two consecutive sapphires on any position we wish.
517
+ Initially the necklace has one sapphire (and no other precious stones). Decide, with proof, whether there is a finite sequence of steps such that at the end of this sequence the necklace contains one emerald (and no other precious stones).
518
+ Remark. A necklace is open if its precious stones are on a line from left to right. We are not allowed to move a precious stone from the rightmost position to the leftmost as we would be able to do if the necklace was closed.
519
+ (Cyprus)
520
+
521
+ ## Solution.
522
+
523
+ For each precious stone on the necklace, we define its value as $(-1)^{r} \cdot s$, where $r$ denotes the number of emeralds and sapphires preceding it, and $s$ equals $-2,1$ or -1 for a ruby, emerald or sapphire, respectively.
524
+ The value of the necklace is equal to the sum of the values of its precious stones. We claim that the value of the necklace is invariant modulo 6 .
525
+ Suppose for example that we remove two consecutive rubies, and suppose there is an even number of emeralds and sapphires preceding them. The value of each ruby is -2 so by removing them we increase the value of the necklace by 4 . The emerald that we add had an even number of emeralds and sapphires preceding it, so its value is 1 . The sapphire that we add has an odd number of emeralds and sapphires preceding it (accounting for the added emerald), so its value is 1 . No other precious stone changes value, so the total increase of the value of the necklace is 6 .
526
+ Similarly we can check that all of the other operations and their inverses also leave the value of the necklace invariant modulo 6 .
527
+ Since the necklace containing just one sapphire has value -1 , whereas the necklace containing just one emerald has value 1 , there is no desired sequence of steps.
528
+
529
+ ## Solution 2.
530
+
531
+ Write $a, b$ and $c$ respectively for a ruby, emerald and sapphire. Each necklace corresponds to an element of a group $G$ containing elements $a, b, c$. If we impose the conditions $a^{2}=b c, b^{3}=c a, c^{2}=1$ and $a b c=1$, the allowed operations will preserve this element. In this group we have $c=a b$ (since $c^{2}=a b c$ ), i.e. $b=a^{-1} c$ and using this relation we obtain $a^{3}=c^{2}=\left(a^{-1} c\right)^{4}=1$. Thus we can take $G=\mathbb{S}_{4}, a=(1,2,3)$, $c=(1,4)$ and $b=a^{-1} c=(1,4,3,2)$. The initial and final necklaces should correspond to elements $c$ and $b$, respectively, so the desired sequence of operations does not exist.
532
+
533
+ ## Geometry
534
+
535
+ G1. In an acute triangle $A B C$, the midpoint of the side $B C$ is $M$ and the centers of the excircles relative to $M$ of the triangles $A M B$ and $A M C$ are $D$ and $E$ respectively. The circumcircle of the triangle $A B D$ meets line $B C$ at $B$ and $F$. The circumcircle of the triangle $A C E$ meets line $B C$ at $C$ and $G$. Prove that $B F=C G$.
536
+ (Romania)
537
+
538
+ ## Solution.
539
+
540
+ We have $\varangle A D B=90^{\circ}-\frac{1}{2} \varangle A M B$ and $\varangle A E C=90^{\circ}-\frac{1}{2} \varangle A M C$.
541
+ Let the circles $A D B$ and $A E C$ respectively meet the line $A M$ again at points $P$ and $P^{\prime}$. Note that $M$ lies outside the circles $A B D$ and $A C E$ because $\varangle A D B+\varangle A M B<180^{\circ}$ and $\varangle A E C+\varangle A M C<180^{\circ}$, so $P$ and $P^{\prime}$ lie on the ray $M A$. Moreover, $\varangle B P M=$ $\varangle B D A=90^{\circ}-\frac{1}{2} \varangle P M B$, implying that $\triangle B P M$ is isosceles with $M P=M B$. Similarly, $M P^{\prime}=M C=M B$, so $P^{\prime} \equiv P$.
542
+ Now it follows from the power of point $P$ that $M B \cdot M F=M P \cdot M A=M C \cdot M G$, i.e. $M F=M G=M A$ and hence $B F=C G$.
543
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_39733bbc834091c7a45dg-22.jpg?height=527&width=849&top_left_y=1390&top_left_x=609)
544
+
545
+ G2. Let $A B C$ be a triangle inscribed in circle $\Gamma$ with center $O$ and let $H$ its orthocenter and $K$ be the midpoint of $O H$. The tangent of $\Gamma$ at $B$ meets the perpendicular bisector of $A C$ meets at $L$ and the tangent of $\Gamma$ at $C$ meets the perpendicular bisector of $A B$ at $M$. Prove that $A K \perp L M$.
546
+ (Greece)
547
+
548
+ ## Solution.
549
+
550
+ The polar of $L$ with respect to $\Gamma$ is the line $\ell_{B}$ through $B$ parallel to $A C$, and the polar of $M$ with respect to $\Gamma$ is the line $\ell_{C}$ through $C$ parallel to $A B$. Therefore the pole of the line $L M$ is the intersection $A^{\prime}$ of $\ell_{B}$ and $\ell_{C}$. It follows that $O A^{\prime} \perp L M$, so it remains to show that $O D \| A K$.
551
+ Consider the reflection $O^{\prime}$ of $O$ in the midpoint $D$ of $B C$. Since $A^{\prime}$ is the reflection of $A$ in $D, A O A^{\prime} O^{\prime}$ is a parallelogram. Moreover, $A H O^{\prime} O$ is a parallelogram because $\overrightarrow{O O^{\prime}}=2 \overrightarrow{O D}=\overrightarrow{A H}$. It follows that $\overrightarrow{O A^{\prime}}=\overrightarrow{A O^{\prime}}=2 \overrightarrow{A K}$, so $O A^{\prime} \| A K$.
552
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_39733bbc834091c7a45dg-23.jpg?height=892&width=830&top_left_y=1025&top_left_x=613)
553
+
554
+ ## Solution 2.
555
+
556
+ We introduce the complex plane such that $\Gamma$ is the unit cycle. Also, let the lower-case letters denote complex numbers corresponding to the points denoted by capital letters. First, note that $o=0, \bar{a}=1 / a, \bar{b}=1 / b$ and $\bar{c}=1 / c$.
557
+ Since $B L \perp B O$, we have
558
+
559
+ $$
560
+ \frac{b-l}{\bar{b}-\bar{l}}=-\frac{b-o}{\bar{b}-\bar{o}}=-\frac{b}{\bar{b}}=-b^{2}, \quad \text { and hence } \quad \bar{l}=\frac{2 b-l}{b^{2}}
561
+ $$
562
+
563
+ Since $L O \perp A C$, we have
564
+
565
+ $$
566
+ \frac{l}{\bar{l}}=\frac{l-o}{\bar{l}-\bar{o}}=-\frac{a-c}{\bar{a}-\bar{c}}=a c, \quad \text { and hence } \quad \bar{l}=\frac{l}{a c} .
567
+ $$
568
+
569
+ Combining $(\dagger)$ and $(\ddagger)$ we get $l=\frac{2 a b c}{b^{2}+a c}$. By symmetry, $m=\frac{2 a b c}{c^{2}+a b}$ and hence
570
+
571
+ $$
572
+ l-m=\frac{2 a b c(c-b)(b+c-a)}{\left(b^{2}+a c\right)\left(c^{2}+a b\right)} \quad \text { and } \quad \bar{l}-\bar{m}=\frac{2(b-c)(a b+a c-b c)}{\left(b^{2}+a c\right)\left(c^{2}+a b\right)}
573
+ $$
574
+
575
+ By Hamilton's formula $a+b+c=h-o=h$, and hence $k=\frac{h+o}{2}=\frac{a+b+c}{2}$. So,
576
+
577
+ $$
578
+ a-k=\frac{b+c-a}{2} \quad \text { and } \quad \bar{a}-\bar{k}=\frac{a b+a c-b c}{2 a b c}
579
+ $$
580
+
581
+ and hence
582
+
583
+ $$
584
+ \frac{l-m}{\bar{l}-\bar{m}}=-\frac{a-k}{\bar{a}-\bar{k}}
585
+ $$
586
+
587
+ which implies $L M \perp A K$.
588
+
589
+ G3. Let $P$ be a point inside a triangle $A B C$ and let $a, b, c$ be the side lengths and $p$ the semi-perimeter of the triangle. Find the maximum value of
590
+
591
+ $$
592
+ \min \left(\frac{P A}{p-a}, \frac{P B}{p-b}, \frac{P C}{p-c}\right)
593
+ $$
594
+
595
+ over all possible choices of triangle $A B C$ and point $P$.
596
+
597
+ ## Solution.
598
+
599
+ If $A B C$ is an equilateral triangle and $P$ its center, then $\frac{P A}{p-a}=\frac{P B}{p-b}=\frac{P C}{p-c}=\frac{2}{\sqrt{3}}$.
600
+ We shall prove that $\frac{2}{\sqrt{3}}$ is the required value. Suppose without loss of generality that $\varangle A P B \geqslant 120^{\circ}$. Then
601
+
602
+ $$
603
+ A B^{2} \geqslant P A^{2}+P B^{2}+P A \cdot P B \geqslant \frac{3}{4}(P A+P B)^{2}
604
+ $$
605
+
606
+ i.e. $P A+P B \leqslant \frac{2}{\sqrt{3}} A B=\frac{2}{\sqrt{3}}((p-a)+(p-b))$, so at least one of the ratios $\frac{P A}{p-a}$ and $\frac{P B}{p-b}$ does not exceed $\frac{2}{\sqrt{3}}$.
607
+
608
+ G4. A quadrilateral $A B C D$ is inscribed in a circle $k$, where $A B>C D$ and $A B$ is not parallel to $C D$. Point $M$ is the intersection of the diagonals $A C$ and $B D$ and point $H$ is the foot of the perpendicular from $M$ to $A B$. Given that $\varangle M H C=\varangle M H D$, prove that $A B$ is a diameter of $k$.
609
+
610
+ ## Solution.
611
+
612
+ Let the line through $M$ parallel to $A B$ meet the segments $A D, D H, B C, C H$ at points $K, P, L, Q$, respectively. Triangle $H P Q$ is isosceles, so $M P=M Q$. Now from
613
+
614
+ $$
615
+ \frac{M P}{B H}=\frac{D M}{D B}=\frac{K M}{A B} \quad \text { and } \quad \frac{M Q}{A H}=\frac{C M}{C A}=\frac{M L}{A B}
616
+ $$
617
+
618
+ we obtain $A H / H B=K M / M L$.
619
+ Let the lines $A D$ and $B C$ meet at point $S$ and let the line $S M$ meet $A B$ at $H^{\prime}$. Then $A H^{\prime} / H^{\prime} B=K M / M L=A H / H B$, so $H^{\prime} \equiv H$, i.e. $S$ lies on the line $M H$.
620
+ The quadrilateral $A B C D$ is not a trapezoid, so $A H \neq B H$. Consider the point $A^{\prime}$ on the ray $H B$ such that $H A^{\prime}=H A$. Since $\varangle S A^{\prime} M=\varangle S A M=\varangle S B M$, quadrilateral $A^{\prime} B S M$ is cyclic and therefore $\varangle A B C=\varangle A^{\prime} B S=\varangle A^{\prime} M H=\varangle A M H=90^{\circ}-\varangle B A C$, which implies that $\varangle A C B=90^{\circ}$.
621
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_39733bbc834091c7a45dg-26.jpg?height=835&width=795&top_left_y=1287&top_left_x=633)
622
+
623
+ G5. Let $A B C$ be an acute-angled triangle with $A B<A C<B C$ and let $D$ be an arbitrary point on the extension of $B C$ beyond $C$. The circle $\gamma(A, A D)$ intersects the rays $A C$, $A B, C B$ at points $E, F, G$, respectively. The circumcircle $\omega_{1}$ of triangle $A F G$ intersects the lines $F E, B C, G E, D F$ again at points $J, H, H^{\prime}, J^{\prime}$. The circumcircle $\omega_{2}$ of triangle $A D E$ intersects the lines $F E, B C, G E, D F$ again at points $I, K, K^{\prime}, I^{\prime}$. Prove that the quadrilaterals $H I J K$ and $H^{\prime} I^{\prime} J^{\prime} K^{\prime}$ are cyclic and that their circumcenters coincide.
624
+ (Greece)
625
+
626
+ ## Solution.
627
+
628
+ From $\varangle F A H=\varangle F G H=\varangle F G D=\frac{1}{2} \varangle F A D=90^{\circ}-\varangle A F D$ we deduce that $A H \perp$ $D F$. Similarly, $\varangle D A I=180^{\circ}-\varangle D E I=180^{\circ}-\varangle D E F=\varangle D G F=\frac{1}{2} \varangle D A F$, so we also have $A I \perp D F$. Therefore, points $A, H, I$ are collinear. Analogously, we find that the triples of points $(A, K, J),\left(A, H^{\prime}, I^{\prime}\right)$ and $\left(A, K^{\prime}, J^{\prime}\right)$ are collinear.
629
+ Quadrilateral $H I J K$ is cyclic because $\varangle A I K=\varangle A D K=\varangle A G H=\varangle A J H$. Analogously, quadrilateral $H^{\prime} I^{\prime} J^{\prime} K^{\prime}$ is cyclic.
630
+ Finally, since $\varangle H^{\prime} J H=\varangle H^{\prime} G H=\varangle E G D=\varangle E F D=\varangle J F J^{\prime}=\varangle J H J^{\prime}$, quadrilateral $H J J^{\prime} H^{\prime}$ is an isosceles trapezoid with $H J \| H^{\prime} J^{\prime}$, so the perpendicular bisectors of $H J$ and $H^{\prime} J^{\prime}$ coincide. Analogously, the perpendicular bisectors of $I K$ and $I^{\prime} K^{\prime}$ coincide. Therefore the circumcenters of $H I J K$ and $H^{\prime} I^{\prime} J^{\prime} K^{\prime}$ coincide.
631
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_39733bbc834091c7a45dg-27.jpg?height=666&width=1052&top_left_y=1312&top_left_x=499)
632
+
633
+ G6. In a triangle $A B C$ with $A B=A C, \omega$ is the circumcircle and $O$ its center. Let $D$ be a point on the extension of $B A$ beyond $A$. The circumcircle $\omega_{1}$ of triangle $O A D$ intersects the line $A C$ and the circle $\omega$ again at points $E$ and $G$, respectively. Point $H$ is such that $D A E H$ is a parallelogram. Line $E H$ meets circle $\omega_{1}$ again at point $J$. The line through $G$ perpendicular to $G B$ meets $\omega_{1}$ again at point $N$ and the line through $G$ perpendicular to $G J$ meets $\omega$ again at point $L$. Prove that the points $L, N, H, G$ lie on a circle.
634
+ (Cyprus)
635
+
636
+ ## Solution.
637
+
638
+ We first observe that $\varangle D O E=\varangle D A E=2 \varangle A B C=\varangle B O A$ and hence $\varangle D O B=$ $\varangle E O A$, which together with $O B=O A$ and $\varangle O B D=\varangle B A O=\varangle O A E$ gives us $\triangle O B D \cong \triangle O A E$. Therefore $B D=A E$.
639
+ Next, $O G=O A$ implies $\varangle O D G=\varangle O D A=\varangle O D B$ and hence $\triangle O G D \cong \triangle O B D$. It follows that $D G=D B=A E=D H$. Moreover, since $A D \| E J$, we have $D J=A E=$ $D G$. Thus, the points $B, G, H, J$ lie on a circle $\omega_{2}$ with center $D$.
640
+ We deduce that $\varangle A G H=\varangle B G H-\varangle B G A=180^{\circ}-\frac{1}{2} \varangle H D B-\varangle B C A=180^{\circ}-$ $\frac{1}{2} \varangle C A B-\varangle B C A=90^{\circ}$.
641
+ We will now invert the diagram through $G$. By $\hat{X}$ we denote the image of any point $X$. The points $\hat{H}, \hat{L}, \hat{N}$ then lie on the lines $\hat{B} \hat{J}, \hat{A} \hat{B}$ and $\hat{A} \hat{J}$, respectively, such that $\varangle \hat{A} G \hat{H}=\hat{B} G \hat{N}=\varangle \hat{J} G \hat{L}=90^{\circ}$. It remains to prove that $\hat{H}, \hat{L}$ and $\hat{N}$ are collinear, which follows from the following statement:
642
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_39733bbc834091c7a45dg-28.jpg?height=652&width=1459&top_left_y=1424&top_left_x=302)
643
+
644
+ Lemma. Let $X Y Z$ be a triangle and let $U$ be a point in the plane. If the lines through $U$ perpendicular to $U X, U Y, U Z$ meet the lines $Y Z, Z X, X Y$ respectively at points $P, Q, R$, then the points $P, Q$ and $R$ are collinear.
645
+ $\underline{\text { Proof. Here we assume that } U \text { is inside } \triangle X Y Z \text { and the angles } X U Y, Y U Z \text { and } Z U X . . . ~}$ are all obtuse - the other cases are similar. We have
646
+
647
+ $$
648
+ \frac{\overrightarrow{Y P}}{\overrightarrow{P Z}}=-\frac{P_{Y U P}}{P_{P U Z}}, \quad \frac{\overrightarrow{Z Q}}{\overrightarrow{Q X}}=-\frac{P_{Z U Q}}{P_{Q U X}}, \quad \frac{\overrightarrow{X R}}{\overrightarrow{R Y}}=-\frac{P_{X U R}}{P_{R U Y}}
649
+ $$
650
+
651
+ On the other hand, since $\varangle Q U X=\varangle Y U P$ are equal and equally directed, we have $\frac{P_{Y U P}}{P_{Q U X}}=\frac{U P \cdot U Y}{U Q \cdot U X}$. Writing the analogous expressions for $\frac{P_{Z U Q}}{P_{R U Y}}$ and $\frac{P_{X U R}}{P_{P U Z}}$
652
+ and multiplying them out we obtain $\frac{\overrightarrow{Y P}}{\overrightarrow{P Z}} \cdot \frac{\overrightarrow{Z Q}}{\overrightarrow{Q X}} \cdot \frac{\overrightarrow{X R}}{\overrightarrow{R Y}}=-1$, and the result follows by Menelaus' theorem.
653
+
654
+ ## Remark.
655
+
656
+ The result remains valid if $D$ is any point on the line $A B$.
657
+ Point $L$ does not depend on the choice of $D$. Indeed, $\varangle L C B=\varangle L G B=\varangle J G B-90^{\circ}=$ $\varangle J E A+\varangle A G B-90^{\circ}=\varangle B A C+\varangle A C B-90^{\circ}=90^{\circ}-\varangle A B C$, so $C L \perp A B$.
658
+ Also, since $\varangle A O N=\varangle A G N=90^{\circ}-\varangle B G A=90^{\circ}-\varangle B C A=\varangle O A B=\varangle O N D$, $O N D A$ is an isosceles trapezoid, i.e. $O N \| A B$.
659
+
660
+ ## Alternative formulation.
661
+
662
+ Based on the Remark, the PSC proposes the following modification which hides point $J$ and defines the points in a more natural way:
663
+ A triangle $A B C$ with $A B=A C$ is inscribed in a circle $\omega$ with center $O$. Its altitude from $C$ meets $\omega$ again at point $L$. Line $\ell$ through $O$ is parallel to $A B$. A circle $\omega_{1}$ passes through points $A$ and $O$ and meets the lines $A B, A C, \ell$ and circle $\omega$ again at points $D, E, N$ and $G$, respectively. Point $H$ is such that $A D H E$ is a parallelogram.
664
+ Prove that $H$ lies on the circumcircle of triangle $G L N$.
665
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_39733bbc834091c7a45dg-29.jpg?height=638&width=769&top_left_y=1471&top_left_x=635)
666
+
667
+ ## Number Theory
668
+
669
+ N1. For positive integers $m$ and $n$, let $d(m, n)$ be the number of distinct primes that divide both $m$ and $n$. For instance, $d(60,126)=d\left(2^{2} \times 3 \times 5,2 \times 3^{2} \times 7\right)=2$. Does there exist a sequence $\left(a_{n}\right)$ of positive integers such that:
670
+ (i) $a_{1} \geqslant 2018^{2018}$;
671
+ (ii) $a_{m} \leqslant a_{n}$ whenever $m \leqslant n$;
672
+ (iii) $d(m, n)=d\left(a_{m}, a_{n}\right)$ for all positive integers $m \neq n$ ?
673
+ (United Kingdom)
674
+
675
+ ## Solution.
676
+
677
+ Such a sequence does exist.
678
+ Let $p_{1}<p_{2}<p_{3}<\ldots$ be the usual list of primes, and $q_{1}<q_{2}<\ldots, r_{1}<r_{2}<\ldots$ be disjoint sequences of primes greater than $2018^{2018}$. For example, let $q_{i} \equiv 1$ and $r_{i} \equiv 3$ modulo 4. Then, if $n=p_{1}^{\alpha_{1}} p_{2}^{\alpha_{2}} \ldots$, where all but finitely many of the $\alpha_{i}$ will be zero, set
679
+
680
+ $$
681
+ b_{n}:=q_{1}^{\alpha_{1}} q_{2}^{\alpha_{2}} \cdots, \quad \text { for all } n \geqslant 2
682
+ $$
683
+
684
+ This sequence satisfies requirement (iii), but not the ordering conditions (i) and (ii). Iteratively, take $a_{1}=r_{1}$, then given $a_{1}, \ldots, a_{n-1}$, define $a_{n}$ by multiplying $b_{n}$ by as large a power of $r_{n}$ as necessary in order to ensure $a_{n}>a_{n-1}$. Thus $d\left(a_{m}, a_{n}\right)=d\left(b_{m}, b_{n}\right)=$ $d(m, n)$, and so all three requirements are satisfied.
685
+
686
+ N2. Find all functions $f: \mathbb{N} \rightarrow \mathbb{N}$ such that
687
+
688
+ $$
689
+ n!+f(m)!\mid f(n)!+f(m!)
690
+ $$
691
+
692
+ for all $m, n \in \mathbb{N}$.
693
+
694
+ ## Solution.
695
+
696
+ Answer: $f(n)=n$ for all $n \in \mathbb{N}$.
697
+ Taking $m=n=1$ in $(*)$ yields $1+f(1)!\mid f(1)!+f(1)$ and hence $1+f(1)!\mid f(1)-1$. Since $|f(1)-1|<f(1)!+1$, this implies $f(1)=1$.
698
+ For $m=1$ in $(*)$ we have $n!+1 \mid f(n)!+1$, which implies $n!\leqslant f(n)$ !, i.e. $f(n) \geqslant n$.
699
+ On the other hand, taking $(m, n)=(1, p-1)$ for any prime number $p$ and using Wilson's theorem we obtain $p|(p-1)!+1| f(p-1)!+1$, implying $f(p-1)<p$. Therefore
700
+
701
+ $$
702
+ f(p-1)=p-1
703
+ $$
704
+
705
+ Next, fix a positive integer $m$. For any prime number $p$, setting $n=p-1$ in (*) yields $(p-1)!+f(m)!\mid(p-1)!+f(m!)$, and hence
706
+
707
+ $$
708
+ (p-1)!+f(m)!\mid f(m!)-f(m)!\text { for all prime numbers } p
709
+ $$
710
+
711
+ This implies $f(m!)=f(m)$ ! for all $m \in \mathbb{N}$, so $(*)$ can be rewritten as $n!+f(m)!\mid$ $f(n)!+f(m)$ !. This implies
712
+
713
+ $$
714
+ n!+f(m)!\mid f(n)!-n!\text { for all } n, m \in \mathbb{N}
715
+ $$
716
+
717
+ Fixing $n \in \mathbb{N}$ and taking $m \in \mathbb{N}$ large enough, we conclude that $f(n)$ ! $=n$ !, i.e. $f(n)=n$, for all $n \in \mathbb{N}$.
718
+ One readily checks that the identity function satisfies the conditions of the problem.
719
+
720
+ N3. Find all primes $p$ and $q$ such that $3 p^{q-1}+1$ divides $11^{p}+17^{p}$.
721
+
722
+ ## Solution.
723
+
724
+ Answer: $(p, q)=(3,3)$.
725
+ For $p=2$ it is directly checked that there are no solutions. Assume that $p>2$.
726
+ Observe that $N=11^{p}+17^{p} \equiv 4(\bmod 8)$, so $8 \nmid 3 p^{q-1}+1>4$. Consider an odd prime divisor $r$ of $3 p^{q-1}+1$. Obviously, $r \notin\{3,11,17\}$. There exists $b$ such that $17 b \equiv 1$ $(\bmod r)$. Then $r \mid b^{p} N \equiv a^{p}+1(\bmod r)$, where $a=11 b$. Thus $r \mid a^{2 p}-1$, but $r \nmid a^{p}-1$, which means that $\operatorname{ord}_{r}(a) \mid 2 p$ and $\operatorname{ord}_{r}(a) \nmid p$, i.e. $\operatorname{ord}_{r}(a) \in\{2,2 p\}$.
727
+ Note that if $\operatorname{ord}_{r}(a)=2$, then $r \mid a^{2}-1 \equiv\left(11^{2}-17^{2}\right) b^{2}(\bmod r)$, which gives $r=7$ as the only possibility. On the other hand, $\operatorname{ord}_{r}(a)=2 p$ implies $2 p \mid r-1$. Thus, all prime divisors of $3 p^{q-1}+1$ other than 2 or 7 are congruent to 1 modulo $2 p$, i.e.
728
+
729
+ $$
730
+ 3 p^{q-1}+1=2^{\alpha} 7^{\beta} p_{1}^{\gamma_{1}} \cdots p_{k}^{\gamma_{k}}
731
+ $$
732
+
733
+ where $p_{i} \notin\{2,7\}$ are prime divisors with $p_{i} \equiv 1(\bmod 2 p)$.
734
+ We already know that $\alpha \leqslant 2$. Also, note that
735
+
736
+ $$
737
+ \frac{11^{p}+17^{p}}{28}=11^{p-1}-11^{p-2} 17+11^{p-3} 17^{2}-\cdots+17^{p-1} \equiv p \cdot 4^{p-1} \quad(\bmod 7)
738
+ $$
739
+
740
+ so $11^{p}+17^{p}$ is not divisible by $7^{2}$ and hence $\beta \leqslant 1$.
741
+ If $q=2$, then $(*)$ becomes $3 p+1=2^{\alpha} 7^{\beta} p_{1}^{\gamma_{1}} \cdots p_{k}^{\gamma_{k}}$, but $p_{i} \geqslant 2 p+1$, which is only possible if $\gamma_{i}=0$ for all $i$, i.e. $3 p+1=2^{\alpha} 7^{\beta} \in\{2,4,14,28\}$, which gives us no solutions.
742
+ Thus $q>2$, which implies $4 \mid 3 p^{q-1}+1$, i.e. $\alpha=2$. Now the right hand side of $(*)$ is congruent to 4 or 28 modulo $p$, which gives us $p=3$. Consequently $3^{q}+1 \mid 6244$, which is only possible for $q=3$. The pair $(p, q)=(3,3)$ is indeed a solution.
743
+
744
+ N4. Let $P(x)=a_{d} x^{d}+\cdots+a_{1} x+a_{0}$ be a non-constant polynomial with nonnegative integer coefficients having $d$ rational roots. Prove that
745
+
746
+ $$
747
+ \operatorname{lcm}(P(m), P(m+1), \ldots, P(n)) \geqslant m\binom{n}{m}
748
+ $$
749
+
750
+ for all positive integers $n>m$.
751
+
752
+ ## Solution.
753
+
754
+ Let $x_{i}=-\frac{p_{i}}{q_{i}}(1 \leqslant i \leqslant d)$ be the roots of $P(x)$, where $p_{i}, q_{i} \in \mathbb{N}$ and $\operatorname{gcd}\left(p_{i}, q_{i}\right)=1$. By Gauss' lemma, we have $P(x)=c\left(q_{1} x+p_{1}\right)\left(q_{2} x+p_{2}\right) \cdots\left(q_{d} x+p_{d}\right)$ for some $c \in \mathbb{N}$, so $q_{1} x+p_{1} \mid P(x)$. Thus it suffices to prove the statement for $P(x)=q_{1} x+p_{1}=q x+p$. Let
755
+
756
+ $$
757
+ \begin{array}{ll}
758
+ A=\operatorname{lcm}(q m+p, q(m+1)+p, \ldots, q n+p) & =\prod_{i=1}^{s} p_{i}^{\alpha_{i}}, \\
759
+ B=(q m+p)(q(m+1)+p) \cdots(q n+p) & =\prod_{i=1}^{s} p_{i}^{\beta_{i}}
760
+ \end{array}
761
+ $$
762
+
763
+ be the prime factorizations of $A$ and $B$.
764
+ Consider a prime divisor $p_{i}$. We have $p_{i}^{\alpha_{i}} \mid q x+p$ for some $m \leqslant x \leqslant n$. On the other hand, if $p_{i}^{r} \mid q y+p\left(r \leqslant \alpha_{i}\right)$ for some $m \leqslant y \leqslant n$ with $y \neq x$, then $p_{i}^{r} \mid q(x-y)$, i.e. $p_{i}^{r} \mid x-y$. Taking the product over all $y \neq x$ we obtain that
765
+
766
+ $$
767
+ p_{i}^{\beta_{i}} \quad \text { divides } \quad p_{i}^{\alpha_{i}} \cdot \prod_{\substack{y=m \\ y \neq x}}^{n}|x-y|, \quad \text { which divides } \quad p_{i}^{\alpha_{i}}(n-m)!
768
+ $$
769
+
770
+ It follows that $B \mid A \cdot(n-m)$ !, but $B \geqslant m(m+1) \cdots n$, so the result immediately follows.
771
+
772
+ N5. Let $x$ and $y$ be positive integers. If for each positive integer $n$ we have that
773
+
774
+ $$
775
+ (n y)^{2}+1 \mid x^{\varphi(n)}-1
776
+ $$
777
+
778
+ prove that $x=1$.
779
+
780
+ ## Solution.
781
+
782
+ Let us take $n=3^{k}$ and suppose that $p$ is a prime divisor of $\left(3^{k} y\right)^{2}+1$ such that $p \equiv 2$ $(\bmod 3)$.
783
+ Since $p$ divides $x^{\varphi(n)}-1=x^{2 \cdot 3^{k-1}}-1$, the order of $x$ modulo $p$ divides both $p-1$ and $2 \cdot 3^{k-1}$, but $\operatorname{gcd}\left(p-1,2 \cdot 3^{k-1}\right) \mid 2$, which implies that $p \mid x^{2}-1$. The result will follow if we prove that the prime $p$ can take infinitely many values.
784
+ Suppose, to the contrary, that there are only finitely many primes $p$ with $p \equiv 2(\bmod 3)$ that divide a term of the sequence
785
+
786
+ $$
787
+ a_{k}=3^{2 k} y^{2}+1 \quad(k \geqslant 0)
788
+ $$
789
+
790
+ Let $p_{1}, p_{2}, \ldots, p_{m}$ be these primes. Clearly, we may assume without loss of generality that $3 \nmid y$. Then $a_{0}=y^{2}+1 \equiv 2(\bmod 3)$, so it has a prime divisor of the form $3 s+2$ $\left(s \in \mathbb{N}_{0}\right)$.
791
+ For $N=\left(y^{2}+1\right) p_{1} \cdots p_{m}$ we have $a_{\varphi(N)}=3^{2 \varphi(N)} y^{2}+1 \equiv y^{2}+1(\bmod N)$, which means that
792
+
793
+ $$
794
+ a_{\varphi(N)}=\left(y^{2}+1\right)\left(t p_{1} \cdots p_{m}+1\right)
795
+ $$
796
+
797
+ for some positive integer $t$. Since $y^{2}+1 \equiv 2(\bmod 3)$ and $3^{2 \varphi(N)} y^{2}+1 \equiv 1(\bmod 3)$, the number $t p_{1} \cdots p_{m}+1$ must have a prime divisor of the form $3 s+2$, but it cannot be any of the primes $p_{1}, \ldots, p_{m}$, so we have a contradiction as desired.
798
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_39733bbc834091c7a45dg-36.jpg?height=2506&width=1784&top_left_y=1&top_left_x=0)
799
+
Balkan_Shortlist/md/en-2019_bmo_shortlist.md ADDED
@@ -0,0 +1,932 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ $36^{\text {th }}$ BALKAN MATHEMATICAL OLYMPIAD
2
+ Chisinau, Republic of Moldova
3
+ April 30 - May 5, 2019
4
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-01.jpg?height=1359&width=1359&top_left_y=1401&top_left_x=1436)
5
+
6
+ ## SHORTLIST
7
+
8
+ ## OF SELECTED PROBLEMS
9
+
10
+ ## The shortlisted problems should be kept strictly confidential until BMO 2020.
11
+
12
+ ## Contributing Countries
13
+
14
+ The Organizing Committee and the Problem Selection Committee of BMO 2019 thank the following 6 countries for contributing 20 problem proposals:
15
+
16
+ Albania
17
+ Bularia
18
+ Cyprus
19
+ Greece
20
+ Romania
21
+ United Kingdom
22
+
23
+ | | Problem Selection Committee |
24
+ | :--- | :--- |
25
+ | Chairman: | Baltag Valeriu |
26
+ | Members: | Costas Ana |
27
+ | | Croitoru Dorian |
28
+ | | Guțu Valeriu |
29
+ | | Izbaş Vadimir |
30
+ | | Rusu Galina |
31
+ | | Sî̀bu Parascovia |
32
+
33
+ ## ALGEBRA
34
+
35
+ $A<B \quad$ A1. Let $a_{0}$ be an arbitrary positive integer. Let $\left\{a_{n}\right\}$ be an infinite sequence of positive integers such that for every positive integer $n$ the term $a_{n}$ is the smallest positive integer such that $a_{0}+a_{1}+\ldots+a_{n}$ is divisible by $n$. Prove that there is a positive integer $N$ such that $a_{n+1}=a_{n}$ for all $n \geq N$.
36
+
37
+ A1b. ${ }^{1}$ Let $a_{0}$ be an arbitrary positive integer. Consider the infinite sequence $\left(a_{n}\right)_{n \geq 1}$, defined inductively as follows: given $a_{0}, a_{1}, \ldots, a_{n-1}$ define the term $a_{n}$ as the smallest positive integer such that $a_{0}+a_{1}+\ldots+a_{n}$ is divisible by $n$. Prove that there exists a positive integer $M$ such that $a_{n+1}=a_{n}$ for all $n \geq M$.
38
+
39
+ UNK A2. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that:
40
+
41
+ $$
42
+ f(x y)=y f(x)+x+f(f(y)-f(x))
43
+ $$
44
+
45
+ for all $x, y \in \mathbb{R}$.
46
+
47
+ ROU A3. Let $a, b, c$ be real numbers such that $0 \leq a \leq b \leq c$. Prove that if
48
+
49
+ $$
50
+ a+b+c=a b+b c+c a>0
51
+ $$
52
+
53
+ then $\sqrt{b c}(a+1) \geq 2$. When does the equality hold?
54
+
55
+ HEL A4. Let $a_{i j}, i=1,2, \ldots, m$ and $j=1,2, \ldots, n$, be positive real numbers. Prove that
56
+
57
+ $$
58
+ \sum_{i=1}^{m}\left(\sum_{j=1}^{n} \frac{1}{a_{i j}}\right)^{-1} \leq\left(\sum_{j=1}^{n}\left(\sum_{i=1}^{m} a_{i j}\right)^{-1}\right)^{-1}
59
+ $$
60
+
61
+ When does the equality hold?
62
+
63
+ A5. Let $a, b, c$ be positive real numbers, such that $(a b)^{2}+(b c)^{2}+(c a)^{2}=3$. Prove that
64
+
65
+ $$
66
+ \left(a^{2}-a+1\right)\left(b^{2}-b+1\right)\left(c^{2}-c+1\right) \geq 1 .
67
+ $$
68
+
69
+ [^0]
70
+ ## GEOMETRY
71
+
72
+ RoU G1. Let $A B C D$ be a square of center $O$ and let $M$ be the symmetric of the point $B$ with respect to the point $A$. Let $E$ be the intersection of $C M$ and $B D$, and let $S$ be the intersection of $M O$ and $A E$. Show that $S O$ is the angle bisector of $\angle E S B$.
73
+
74
+ G2. Let be a triangle $\triangle A B C$ with $m(\angle A B C)=75^{\circ}$ and $m(\angle A C B)=45^{\circ}$. The angle bisector of $\angle C A B$ intersects $C B$ at the point $D$. We consider the point $E \in(A B)$, such that $D E=D C$. Let $P$ be the intersection of the lines $A D$ and $C E$. Prove that $P$ is the midpoint of the segment $A D$.
75
+
76
+ UNK G3. Let $A B C$ be a scalene and acute triangle, with circumcentre $O$. Let $\omega$ be the circle with centre $A$, tangent to $B C$ at $D$. Suppose there are two points $F$ and $G$ on $\omega$ such that $F G \perp A O, \angle B F D=\angle D G C$ and the couples of points $(B, F)$ and $(C, G)$ are in different halfplanes with respect to the line $A D$. Show that the tangents to $\omega$ at $F$ and $G$ meet on the circumcircle of $A B C$.
77
+ $\triangle N R$ G4. Given an acute triangle $A B C$, let $M$ be the midpoint of $B C$ and $H$ the orthocentre. Let $\Gamma$ be the circle with diameter $H M$, and let $X, Y$ be distinct points on $\Gamma$ such that $A X, A Y$ are tangent to $\Gamma$. Prove that $B X Y C$ is cyclic.
78
+
79
+ G5. Let $A B C(B C>A C)$ be an acute triangle with circumcircle $k$ centered at $O$. The tangent to $k$ at $C$ intersects the line $A B$ at the point $D$. The circumcircles of triangles $B C D, O C D$ and $A O B$ intersect the ray $C A$ (beyond $A$ ) at the points $Q, P$ and $K$, respectively, such that $P \in(A K)$ and $K \in(P Q)$. The line $P D$ intersects the circumcircle of triangle $B K Q$ at the point $T$, so that $P$ and $T$ are in different halfplanes with respect to $B Q$. Prove that $T B=T Q$.
80
+
81
+ G6. Let $A B C$ be an acute triangle, and $A X, A Y$ two isogonal lines. Also, suppose that $K, S$ are the feet of perpendiculars from $B$ to $A X, A Y$, and $T, L$ are the feet of perpendiculars from $C$ to $A X, A Y$ respectively. Prove that $K L$ and $S T$ intersect on $B C$.
82
+ $A L B$ G7. Let $A D, B E$, and $C F$ denote the altitudes of triangle $\triangle A B C$. Points $E^{\prime}$ and $F^{\prime}$ are the reflections of $E$ and $F$ over $A D$, respectively. The lines $B F^{\prime}$ and $C E^{\prime}$ intersect at $X$, while the lines $B E^{\prime}$ and $C F^{\prime}$ intersect at the point $Y$. Prove that if $H$ is the orthocenter of $\triangle A B C$, then the lines $A X, Y H$, and $B C$ are concurrent.
83
+
84
+ G8. Given an acute triangle $A B C,(c)$ is circumcircle with center $O$ and $H$ the orthocenter of the triangle $A B C$. The line $A O$ intersects $(c)$ at the point $D$. Let $D_{1}, D_{2}$ and $H_{2}, H_{3}$ be the symmetrical points of the points $D$ and $H$ with respect to the lines $A B, A C$ respectively. Let $\left(c_{1}\right)$ be the circumcircle of the triangle $A D_{1} D_{2}$. Suppose that the line AH intersects again $\left(c_{1}\right)$ at the point $U$, the line $H_{2} H_{3}$ intersects the segment $D_{1} D_{2}$ at the point $K_{1}$ and the line $D H_{3}$ intersects the segment $U D_{2}$ at the point $L_{1}$. Prove that one of the intersection points of the circumcircles of the triangles $D_{1} K_{1} H_{2}$ and $U D L_{1}$ lies on the line $K_{1} L_{1}$.
85
+
86
+ Cyp G9. Given semicircle ( $c$ ) with diameter $A B$ and center $O$. On the (c) we take point $C$ such that the tangent at the $C$ intersects the line $A B$ at the point $E$. The perpendicular line from $C$ to $A B$ intersects the diameter $A B$ at the point $D$. On the ( $c$ ) we get the points $H, Z$ such that $C D=C H=C Z$. The line $H Z$ intersects the lines $C O, C D, A B$ at the points $S, I, K$ respectively and the parallel line from $I$ to the line $A B$ intersects the lines $C O, C K$ at the points $L, M$ respectively. We consider the circumcircle $(k)$ of the triangle $L M D$, which intersects again the lines $A B, C K$ at the points $P, U$ respectively. Let $\left(e_{1}\right)$, $\left(e_{2}\right),\left(e_{3}\right)$ be the tangents of the $(k)$ at the points $L, M, P$ respectively and $R=\left(e_{1}\right) \cap\left(e_{2}\right)$, $X=\left(e_{2}\right) \cap\left(e_{3}\right), T=\left(e_{1}\right) \cap\left(e_{3}\right)$. Prove that if $Q$ is the center of $(k)$, then the lines $R D$, $T U, X S$ pass through the same point, which lies in the line $I Q$.
87
+
88
+ ## NUMBER THEORY
89
+
90
+ $A C B \quad$ TN1. Let $\mathbb{P}$ be the set of all prime numbers. Find all functions $f: \mathbb{P} \rightarrow \mathbb{P}$ such that
91
+
92
+ $$
93
+ f(p)^{f(q)}+q^{p}=f(q)^{f(p)}+p^{q}
94
+ $$
95
+
96
+ holds for all $p, q \in \mathbb{P}$.
97
+
98
+ ROU TN2. Let $S \subset\{1, \ldots, n\}$ be a nonempty set, where $n$ is a positive integer. We denote by $s$ the greatest common divisor of the elements of the set $S$. We assume that $s \neq 1$ and let $d$ be its smallest divisor greater than 1 . Let $T \subset\{1, \ldots, n\}$ be a set such that $S \subset T$ and $|T| \geq 1+\left[\frac{n}{d}\right]$. Prove that the greatest common divisor of the elements in $T$ is 1 .
99
+
100
+ TN2b. ${ }^{2}$ Let $n(n \geq 1)$ be a positive integer and $U=\{1, \ldots, n\}$. Let $S$ be a nonempty subset of $U$ and let $d(d \neq 1)$ be the smallest common divisor of all elements of the set $S$. Find the smallest positive integer $k$ such that for any subset $T$ of $U$, consisting of $k$ elements, with $S \subset T$, the greatest common divisor of all elements of $T$ is equal to 1 .
101
+
102
+ [^1]
103
+ ## COMBINATORICS
104
+
105
+ UNK C1. 100 couples are invited to a traditional Moldovan dance. The 200 people stand in a line, and then in a step, two of them (not necessarily adjacent) may swap positions. Find the least $C$ such that whatever the initial order, they can arrive at an ordering where everyone is dancing next to their partner in at most $C$ steps.
106
+
107
+ HEL C2. Suppose that the numbers $\{1,2, \ldots, 25\}$ are written in some order in an $5 \times 5$ array. Find the maximal positive integer $k$, such that the following holds. There is always an $2 \times 2$ subarray whose numbers have a sum not less than $k$.
108
+
109
+ C2b. ${ }^{3}$ An $5 \times 5$ array must be completed with all numbers $\{1,2, \ldots, 25\}$, one number in each cell. Find the maximal positive integer $k$, such that for any completion of the array there is a $2 \times 2$ square (subarray), whose numbers have a sum not less than $k$.
110
+
111
+ CyP C3. Anna and Bob play a game on the set of all points of the form ( $m, n$ ) where $m, n$ are integers with $|m|,|n| \leqslant 2019$. Let us call the lines $x= \pm 2019$ and $y= \pm 2019$ the boundary lines of the game. The points of these lines are called the boundary points. The neighbours of point $(m, n)$ are the points $(m+1, n),(m-1, n),(m, n+1),(m, n-1)$.
112
+
113
+ Anna starts with a token at the origin ( 0,0 ). With Bob playing first, they alternately perform the following steps: At his turn, Bob deletes two points on each boundary line. On her turn Anna makes a sequences of three moves of the token, where a move of the token consists of picking up the token from its current position and placing it in one of its neighbours.
114
+
115
+ To win the game Anna must place her token on a boundary point before it is deleted by Bob. Does Anna have a winning strategy?
116
+ [Note: At every turn except perhaps her last, Anna must make exactly three moves.]
117
+
118
+ UNK C4. A town-planner has built an isolated city whose road network consists of $2 N$ roundabouts, each connecting exactly three roads. A series of tunnels and bridges ensure that all roads in the town meet only at roundabouts. All roads are two-way, and each roundabout is oriented clockwise.
119
+
120
+ Vlad has recently passed his driving test, and is nervous about roundabouts. He starts driving from his house, and always takes the first exit at each roundabout he encounters. It turns out his journey includes every road in the town in both directions before he arrives back at the starting point in the starting direction. For what values of $N$ is this possible?
121
+
122
+ [^2]
123
+ ## ALGEBRA
124
+
125
+ A1. Let $a_{0}$ be an arbitrary positive integer. Let $\left\{a_{n}\right\}$ be an infinite sequence of positive integers such that for every positive integer $n$ the term $a_{n}$ is the smallest positive integer such that $a_{0}+a_{1}+\ldots+a_{n}$ is divisible by $n$. Prove that there is a positive integer $N$ such that $a_{n+1}=a_{n}$ for all $n \geq N$.
126
+
127
+ A1b. ${ }^{4}$ Let $a_{0}$ be an arbitrary positive integer. Consider the infinite sequence $\left(a_{n}\right)_{n \geq 1}$, defined inductively as follows: given $a_{0}, a_{1}, \ldots, a_{n-1}$ define the term $a_{n}$ as the smallest positive integer such that $a_{0}+a_{1}+\ldots+a_{n}$ is divisible by $n$. Prove that there exists a positive integer $M$ such that $a_{n+1}=a_{n}$ for all $n \geq M$.
128
+
129
+ Solution. Define $b_{n}=\frac{a_{0}+a_{1}+\ldots+a_{n}}{n}$ for every positive integer $n$. According to condition, $b_{n}$ is a positive integer for every positive integer $n$.
130
+
131
+ Since $a_{n+1}$ is the smallest positive integer such that $\frac{a_{0}+a_{1}+\ldots+a_{n}+a_{n+1}}{n+1}$ is a positive integer and
132
+
133
+ $$
134
+ \frac{a_{0}+a_{1}+\ldots+a_{n}+b_{n}}{n+1}=\frac{a_{0}+a_{1}+\ldots+a_{n}+\frac{a_{0}+a_{1}+\ldots+a_{n}}{n}}{n+1}=\frac{a_{0}+a_{1}+\ldots+a_{n}}{n}=b_{n}
135
+ $$
136
+
137
+ which is a positive integer, we get $a_{n+1} \leq b_{n}$ for every positive integer $n$.
138
+ Now from last result we have
139
+
140
+ $$
141
+ b_{n+1}=\frac{a_{0}+a_{1}+\ldots+a_{n}+a_{n+1}}{n+1} \leq \frac{a_{0}+a_{1}+\ldots+a_{n}+b_{n}}{n+1}=b_{n} .
142
+ $$
143
+
144
+ Hence the infinite sequence of positive integers $b_{1}, b_{2}, \ldots$ is non-increasing. So there exists a positive integer $T$ such that for all $n \geq T$ we have
145
+
146
+ $$
147
+ \begin{gathered}
148
+ b_{n+1}=b_{n} \Rightarrow \frac{a_{0}+a_{1}+\ldots+a_{n}+a_{n+1}}{n+1}=\frac{a_{0}+a_{1}+\ldots+a_{n}}{n} \Rightarrow \\
149
+ n\left(a_{0}+a_{1}+\ldots+a_{n}+a_{n+1}\right)=(n+1)\left(a_{0}+a_{1}+\ldots+a_{n}\right) \Rightarrow \\
150
+ n a_{n+1}=a_{0}+a_{1}+\ldots+a_{n} \Rightarrow a_{n+1}=\frac{a_{0}+a_{1}+\ldots+a_{n}}{n}=b_{n} .
151
+ \end{gathered}
152
+ $$
153
+
154
+ Similarly we get $a_{n+2}=b_{n+1}$, which follows that $a_{n+2}=b_{n+1}=b_{n}=a_{n+1}$. Hence, taking $M=T+1$, we can state that $a_{n+1}=a_{n}$ for every $n \geq M$.
155
+
156
+ [^3]A2. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that:
157
+
158
+ $$
159
+ f(x y)=y f(x)+x+f(f(y)-f(x))
160
+ $$
161
+
162
+ for all $x, y \in \mathbb{R}$.
163
+ Solution. Firstly, considering $(x, y)=(1,1)$ we get $f(0)=-1$.
164
+ Then, setting $y=1$, we see that $-x=f(f(1)-f(x))$, so $f$ must be surjective.
165
+ Now let $(x, y)=(a, 0)$ and $(0, a)$ to get
166
+
167
+ $$
168
+ -1=a+f(-1-f(a)) \quad \text { and } \quad-1=-a+f(f(a)+1)
169
+ $$
170
+
171
+ Since $f$ is surjective, for any real $z$ we may write $z=f(a)+1$ and then adding these two results gives $f(z)+f(-z)=-2$.
172
+
173
+ Letting $(x, y)=(a, 1)$ and $(1, a)$ we get
174
+
175
+ $$
176
+ -a=f(f(1)-f(a)) \quad \text { and } \quad f(a)=a f(1)+1+f(f(a)-f(1)) .
177
+ $$
178
+
179
+ Adding these, and using the previous result with $z=f(a)-f(1)$ gives
180
+
181
+ $$
182
+ f(a)=a f(1)+a-1 .
183
+ $$
184
+
185
+ So $f(x)=k x-1$ for all $x$, for some fixed $k$. Substituting back into the original equation we see that 1 and -1 are the only possibilities for $k$ and that both of these values do give a function that works.
186
+
187
+ Alternative solution. We prove that $f(x)=x-1$ and $f(x)=-x-1$ are the only solutions. Let $x=y=1$; this gives $f(1)=f(1)+1+f(0)$, so $f(0)=-1$. Then let $(x, y)=(0, a+1),(-a-1,0)$, and $(-a, 1)$ to give the three equalities
188
+
189
+ $$
190
+ \begin{aligned}
191
+ f(0)=(a+1) f(0)+f(f(a+1)-f(0)) & \Rightarrow a=f(f(a+1)+1) \\
192
+ f(0)=-a-1+f(f(0)-f(-a-1)) & \Rightarrow a=f(-f(-a-1)-1) \\
193
+ f(-a)=f(-a)-a+f(f(1)-f(a)) & \Rightarrow a=f(f(1)-f(-a)) .
194
+ \end{aligned}
195
+ $$
196
+
197
+ The last of these three implies $f$ is bijective, hence we have
198
+
199
+ $$
200
+ f(a+1)+1=-f(-a-1)-1=f(1)-f(-a)
201
+ $$
202
+
203
+ From the second of these equalities we can deduce the recurrence relation $f(x)=$ $f(x-1)+f(1)+1$, so if $c=f(1)+1$, we have $f(x)=c x-1$ for all $x \in \mathbb{Z}$. Substituting into the original equation we see that $c^{2}=1$, so $f(x)=x-1$ or $f(x)=-x-1$ for $x \in \mathbb{Z}$.
204
+
205
+ In the first case, let $x=1$. Then $f(y)=1+f(f(y))$, which implies $f(x)=x-1$ for all $x$ as $f$ is surjective. In the second case, set $x=-1$, so $f(-y)=-1+f(f(y))$. However from above we have $f(a+1)+f(-a-1)=2$, so $f(f(y))-1=f(-y)=-f(y)-2$, and we have $f(x)=-x-1$ by surjectivity.
206
+
207
+ A3. Let $a, b, c$ be real numbers such that $0 \leq a \leq b \leq c$. Prove that if
208
+
209
+ $$
210
+ a+b+c=a b+b c+c a>0,
211
+ $$
212
+
213
+ then $\sqrt{b c}(a+1) \geq 2$. When does the equality hold?
214
+ Solution. Let $a+b+c=a b+b c+c a=k$. Since $(a+b+c)^{2} \geq 3(a b+b c+c a)$, we get that $k^{2} \geq 3 k$. Since $k>0$, we obtain that $k \geq 3$.
215
+
216
+ We have $b c \geq c a \geq a b$, so from the above relation we deduce that $b c \geq 1$.
217
+ By AM-GM, $b+c \geq 2 \sqrt{b c}$ and consequently $b+c \geq 2$. The equality holds iff $b=c$.
218
+ The constraint gives us
219
+
220
+ $$
221
+ a=\frac{b+c-b c}{b+c-1}=1-\frac{b c-1}{b+c-1} \geq 1-\frac{b c-1}{2 \sqrt{b c}-1}=\frac{\sqrt{b c}(2-\sqrt{b c})}{2 \sqrt{b c}-1}
222
+ $$
223
+
224
+ For $\sqrt{b c}=2$ condition $a \geq 0$ gives $\sqrt{b c}(a+1) \geq 2$ with equality iff $a=0$ and $b=c=2$.
225
+ For $\sqrt{b c}<2$, taking into account the estimation for $a$, we get
226
+
227
+ $$
228
+ a \sqrt{b c} \geq \frac{b c(2-\sqrt{b c})}{2 \sqrt{b c}-1}=\frac{b c}{2 \sqrt{b c}-1}(2-\sqrt{b c}) .
229
+ $$
230
+
231
+ Since $\frac{b c}{2 \sqrt{b c}-1} \geq 1$, with equality for $b c=1$, we get $\sqrt{b c}(a+1) \geq 2$ with equality iff $a=b=c=1$.
232
+
233
+ For $\sqrt{b c}>2$ we have $\sqrt{b c}(a+1)>2(a+1) \geq 2$.
234
+ The proof is complete.
235
+ The equality holds iff $a=b=c=1$ or $a=0$ and $b=c=2$.
236
+
237
+ A4. Let $a_{i j}, i=1,2, \ldots, m$ and $j=1,2, \ldots, n$, be positive real numbers. Prove that
238
+
239
+ $$
240
+ \sum_{i=1}^{m}\left(\sum_{j=1}^{n} \frac{1}{a_{i j}}\right)^{-1} \leq\left(\sum_{j=1}^{n}\left(\sum_{i=1}^{m} a_{i j}\right)^{-1}\right)^{-1} .
241
+ $$
242
+
243
+ When does the equality hold?
244
+ Solution. We will use the following
245
+ Lemma. If $a_{1}, a_{2}, \ldots, a_{n}, b_{1}, b_{2}, \ldots, b_{n}$ are positive real numbers then
246
+
247
+ $$
248
+ \frac{1}{\sum_{j=1}^{n} \frac{1}{a_{j}}}+\frac{1}{\sum_{j=1}^{n} \frac{1}{b_{j}}} \leq \frac{1}{\sum_{j=1}^{n} \frac{1}{a_{j}+b_{j}}}
249
+ $$
250
+
251
+ The equality holds when $\frac{a_{1}}{b_{1}}=\frac{a_{2}}{b_{2}}=\ldots=\frac{a_{n}}{b_{n}}$.
252
+ Proof. Set $x_{j}=\frac{1}{a_{j}}$ and $y_{j}=\frac{1}{b_{j}}$ for each $j=1,2, \ldots, n$. Then we have to prove that
253
+
254
+ $$
255
+ \frac{1}{\sum_{j=1}^{n} x_{j}}+\frac{1}{\sum_{j=1}^{n} y_{j}} \leq \frac{1}{\sum_{j=1}^{n} \frac{x_{j} y_{j}}{x_{j}+y_{j}}} \quad \text { or } \quad \sum_{j=1}^{n} \frac{x_{j} y_{j}}{x_{j}+y_{j}} \leq \frac{\left(\sum_{j=1}^{n} x_{j}\right)\left(\sum_{j=1}^{n} y_{j}\right)}{\sum_{j=1}^{n} x_{j}+\sum_{j=1}^{n} y_{j}}
256
+ $$
257
+
258
+ Subtract $\sum_{j=1}^{n} x_{j}$, and we have to prove that
259
+
260
+ $$
261
+ \sum_{j=1}^{n}\left(x_{j}-\frac{x_{j} y_{j}}{x_{j}+y_{j}}\right) \geq \sum_{j=1}^{n} x_{j}-\frac{\left(\sum_{j=1}^{n} x_{j}\right)\left(\sum_{j=1}^{n} y_{j}\right)}{\sum_{j=1}^{n} x_{j}+\sum_{j=1}^{n} y_{j}}
262
+ $$
263
+
264
+ or
265
+
266
+ $$
267
+ \sum_{j=1}^{n}\left(\frac{x_{j}^{2}}{x_{j}+y_{j}}\right) \geq \frac{\left(\sum_{j=1}^{n} x_{j}\right)^{2}}{\sum_{j=1}^{n} x_{j}+\sum_{j=1}^{n} y_{j}}
268
+ $$
269
+
270
+ The last one is a consequence of Cauchy-Schwarz inequality and thus the lemma is proved.
271
+ We will now prove that repeating the lemma we will get the desired inequality. For example, if $a_{1}, a_{2}, \ldots, a_{n}, b_{1}, b_{2}, \ldots, b_{n}, c_{1}, c_{2}, \ldots, c_{n}$ are positive reals then by repeating lemma two times we get
272
+
273
+ $$
274
+ \frac{1}{\sum_{j=1}^{n} \frac{1}{a_{j}}}+\frac{1}{\sum_{j=1}^{n} \frac{1}{b_{j}}}+\frac{1}{\sum_{j=1}^{n} \frac{1}{c_{j}}} \leq \frac{1}{\sum_{j=1}^{n} \frac{1}{a_{j}+b_{j}}}+\frac{1}{\sum_{j=1}^{n} \frac{1}{c_{j}}} \leq \frac{1}{\sum_{j=1}^{n} \frac{1}{\left(a_{j}+b_{j}\right)+c_{j}}}=\frac{1}{\sum_{j=1}^{n} \frac{1}{a_{j}+b_{j}+c_{j}}}
275
+ $$
276
+
277
+ Using similar reasoning we can prove by induction that
278
+
279
+ $$
280
+ \sum_{i=1}^{m}\left(\sum_{j=1}^{n} \frac{1}{a_{i j}}\right)^{-1}=\sum_{i=1}^{m} \frac{1}{\sum_{j=1}^{n} \frac{1}{a_{i j}}} \leq \frac{1}{\sum_{j=1}^{n} \frac{1}{\sum_{i=1}^{m} a_{i j}}}=\left(\sum_{j=1}^{n}\left(\sum_{i=1}^{m} a_{i j}\right)^{-1}\right)^{-1}
281
+ $$
282
+
283
+ which is the desired result.
284
+ The equality holds iff
285
+
286
+ $$
287
+ \frac{a_{i 1}}{a_{11}}=\frac{a_{i 2}}{a_{12}}=\ldots=\frac{a_{i n}}{a_{1 n}}
288
+ $$
289
+
290
+ for all $i=1,2, \ldots, m$.
291
+
292
+ A5. Let $a, b, c$ be positive real numbers, such that $(a b)^{2}+(b c)^{2}+(c a)^{2}=3$. Prove that
293
+
294
+ $$
295
+ \left(a^{2}-a+1\right)\left(b^{2}-b+1\right)\left(c^{2}-c+1\right) \geq 1 .
296
+ $$
297
+
298
+ Solution. The inequality is equivalent with
299
+
300
+ $$
301
+ \left(a^{2}-a+1\right)\left(b^{2}-b+1\right)\left(c^{2}-c+1\right) \geq 1 \Leftrightarrow\left(a^{3}+1\right)\left(b^{3}+1\right)\left(c^{3}+1\right) \geq(a+1)(b+1)(c+1) .
302
+ $$
303
+
304
+ Thus:
305
+
306
+ $$
307
+ \begin{gathered}
308
+ \prod_{c y c}\left(a^{3}+1\right)-\prod_{c y c}(a+1)=\sum_{c y c} a^{3}+\sum_{c y c}(a b)^{3}+(a b c)^{3}-\sum_{c y c} a-\sum_{c y c} a b-a b c= \\
309
+ \sum_{c y c}\left(a^{3}+a\right)+\sum_{c y c}\left(a^{3} b^{3}+a b\right)+\left[(a b c)^{3}+1+1\right]-2 \sum_{c y c} a-2 \sum_{c y c} a b-a b c-2^{A M \geq G M} \geq^{\sum_{c y c} a^{2} b^{2}=3} \\
310
+ 2 \sum_{c y c} a^{2}+2 \sum_{c y c} a^{2} b^{2}+2 a b c-2 \sum_{c y c} a-2 \sum_{c y c} a b-2^{c y c}= \\
311
+ \sum_{c y c}\left(a^{2}-2 a+1\right)+\left(\sum_{c y c} a^{2}+2 a b c+1-2 \sum_{c y c} a b\right)= \\
312
+ \sum_{c y c}(a-1)^{2}+\left(\sum_{c y c} a^{2}+2 a b c+1-2 \sum_{c y c} a b\right) \geq\left(\sum_{c y c} a^{2}+2 a b c+1-2 \sum_{c y c} a b\right) .
313
+ \end{gathered}
314
+ $$
315
+
316
+ We will show that $\sum_{c y c} a^{2}+2 a b c+1-2 \sum_{c y c} a b \geq 0 \quad$ (1) for every $a, b, c \geq 0$.
317
+ Firstly, let us observe that
318
+
319
+ $$
320
+ (1+2 a b c)(a+b+c)=(1+a b c+a b c)(a+b+c) \geq 9 \sqrt[3]{a^{2} b^{2} c^{2} a b c}=9 a b c
321
+ $$
322
+
323
+ implying
324
+
325
+ $$
326
+ 1+2 a b c \geq \frac{9 a b c}{a+b+c}
327
+ $$
328
+
329
+ Then, using Schur's Inequality, (i.e. $\sum_{c y c} a(a-b)(a-c) \geq 0$, for any $a, b, c \geq 0$ ) we obtain that
330
+
331
+ $$
332
+ \sum_{c y c} a^{2} \geq 2 \sum_{c y c} a b-\frac{9 a b c}{a+b+c}
333
+ $$
334
+
335
+ Returning to (1), we get:
336
+
337
+ $$
338
+ \begin{gathered}
339
+ \sum_{c y c} a^{2}+2 a b c+1-2 \sum_{c y c} a b \geq\left(2 \sum_{c y c} a b-\frac{9 a b c}{a+b+c}\right)+2 a b c+1-2 \sum_{c y c} a b= \\
340
+ (1+2 a b c)-\frac{9 a b c}{a+b+c} \geq 0
341
+ \end{gathered}
342
+ $$
343
+
344
+ which gives us $\prod_{\text {cyc }}\left(a^{3}+1\right)-\prod_{c y c}(a+1) \geq 0$ and, respectively, $\prod_{\text {cyc }}\left(a^{2}-a+1\right) \geq 1$.
345
+
346
+ ## GEOMETRY
347
+
348
+ G1. Let $A B C D$ be a square of center $O$ and let $M$ be the symmetric of the point $B$ with respect to the point $A$. Let $E$ be the intersection of $C M$ and $B D$, and let $S$ be the intersection of $M O$ and $A E$. Show that $S O$ is the angle bisector of $\angle E S B$.
349
+
350
+ Solution. We have
351
+
352
+ $$
353
+ \left\{\begin{array}{l}
354
+ D C \equiv D A \\
355
+ \angle E D C \equiv \angle E D A \quad \Rightarrow \triangle D E C \equiv \triangle D E A \Rightarrow \angle D A E \equiv \angle D C E(*) . \\
356
+ D E \equiv D E
357
+ \end{array}\right.
358
+ $$
359
+
360
+ Let $C M \cap A D=\{P\}$, then follows $\triangle C D P \equiv \triangle B A P$ and $\angle P C D \equiv \angle P B A(* *)$.
361
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-15.jpg?height=1030&width=1888&top_left_y=2053&top_left_x=737)
362
+
363
+ Figure 1: G1
364
+ From (*) and (**) follows $\angle D C P \equiv \angle D A E \equiv \angle P B A$.
365
+ Now, let $S^{\prime}=A E \cap P B$.
366
+ In the triangle $S^{\prime} A B$ we have
367
+
368
+ $$
369
+ m\left(\angle S^{\prime} A B\right)+m\left(\angle S^{\prime} B A\right)=m\left(\angle S^{\prime} A B\right)+m\left(\angle P A S^{\prime}\right)=m(\angle P A B)=90^{\circ},
370
+ $$
371
+
372
+ so $m\left(\angle B S^{\prime} A\right)=90^{\circ}$.
373
+ We show that $A E, B P$ and $M O$ are concurrent.
374
+ In the triangle $\triangle E M B$ we apply the Ceva theorem, so
375
+
376
+ $$
377
+ \frac{E P}{P M} \cdot \frac{M A}{A B} \cdot \frac{B O}{O E}=1 \Leftrightarrow \frac{E P}{P M}=\frac{O E}{B O}
378
+ $$
379
+
380
+ is true because $P O$ is a midsegment in the triangle $D A B(P O \| A B)$.
381
+ According to the Thales theorem in the triangle $E M B, \frac{E P}{P M}=\frac{E O}{O B}$ and $A E, B P$, $M O$ are concurrent in $S^{\prime}$, which is in fact $S$.
382
+
383
+ Let $P B \cap C A=\{N\}$. Because ESNO has $m(\angle E O N)+m(\angle E S N)=180^{\circ}$, it follows $E S N O$ cyclic and $m(\angle E S O)=m(\angle E N O)=m(\angle D A O)=45^{\circ}$.
384
+
385
+ G2. Let be a triangle $\triangle A B C$ with $m(\angle A B C)=75^{\circ}$ and $m(\angle A C B)=45^{\circ}$. The angle bisector of $\angle C A B$ intersects $C B$ at the point $D$. We consider the point $E \in(A B)$, such that $D E=D C$. Let $P$ be the intersection of the lines $A D$ and $C E$. Prove that $P$ is the midpoint of the segment $A D$.
386
+
387
+ Solution. Let $P^{\prime}$ be the midpoint of the segment $A D$. We will prove that $P^{\prime}=P$. Let $F \in A C$ such that $D F \perp A C$. The triangle $C D F$ is isosceles with $F D=F C$ and the triangle $D P^{\prime} F$ is equilateral as $m(\angle A D F)=60^{\circ}$. Thus, the triangle $F C P^{\prime}$ is isosceles $\left(F P^{\prime}=F C\right)$ and $m\left(\angle F C P^{\prime}\right)=m\left(\angle F P^{\prime} C\right)=15^{\circ}$.
388
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-16.jpg?height=1382&width=1588&top_left_y=1583&top_left_x=622)
389
+
390
+ Figure 2: G2
391
+ We prove now that $m(\angle F C E)=15^{\circ}$.
392
+ Let $M$ be the point on $[A B$ such that the triangle $A C M$ is equilateral. As $\triangle A D C \equiv$ $\triangle A D M(S A S) \Rightarrow D C=D M(=D E)$ and $m(\angle A M D)=m(\angle A C D)=45^{\circ}$. It follows that the triangle $\triangle D M E$ is isosceles with $m(\angle D M E)=m(\angle D E M)=45^{\circ}$. In the triangle $\triangle B D E$ we have $m(\angle B D E)=60^{\circ}$ and thus $m(\angle C D E)=120^{\circ}$.As the triangle $D C E$ is isoscel with $m(\angle D C E)=m(\angle D E C)=30^{\circ}$. Finaly $m(\angle A C E)=m(\angle A C B)-$ $m(\angle B C E)=45^{\circ}-30^{\circ}=15^{\circ}$.
393
+
394
+ Thus $m\left(\angle F C P^{\prime}\right)=15^{\circ}=m(\angle F C E)$, and therefore $P^{\prime} \in C E$ and $P^{\prime}=P$, which means that $P$ is the midpoint of the segment $A D$.
395
+
396
+ Alternative solution: In the way as above we prove that $m(\angle B C E)=15^{\circ}$.
397
+ So the quadrilateral $A C D E$ is inscribed in a circle. Now, applying the sine rules to $\triangle D P E$ and $\triangle A P E$ we get
398
+
399
+ $$
400
+ \begin{gathered}
401
+ \frac{D P}{\sin 30^{\circ}}=\frac{P E}{\sin 15^{\circ}}, \quad \frac{A P}{\sin 105^{\circ}}=\frac{P E}{\sin 30^{\circ}} \Rightarrow \frac{D P}{\sin 30^{\circ}} \cdot \frac{\sin 105^{\circ}}{A P}=\frac{P E}{\sin 15^{\circ}} \cdot \frac{\sin 30^{\circ}}{P E}, \\
402
+ \frac{D P}{A P}=\frac{1}{\sin 30^{\circ}} 105^{\circ} \cdot \sin 15^{\circ} \\
403
+ =\frac{1}{4 \cdot \sin 105^{\circ} \cdot \sin 15^{\circ}}=\frac{1}{2 \cdot\left(\cos 90^{\circ}-\cos 120^{\circ}\right)}=\frac{1}{2 \cdot \frac{1}{2}}=1 .
404
+ \end{gathered}
405
+ $$
406
+
407
+ Thus, $Q P=A P$.
408
+
409
+ G3. Let $A B C$ be a scalene and acute triangle, with circumcentre $O$. Let $\omega$ be the circle with centre $A$, tangent to $B C$ at $D$. Suppose there are two points $F$ and $G$ on $\omega$ such that $F G \perp A O, \angle B F D=\angle D G C$ and the couples of points $(B, F)$ and $(C, G)$ are in different halfplanes with respect to the line $A D$. Show that the tangents to $\omega$ at $F$ and $G$ meet on the circumcircle of $A B C$.
410
+
411
+ Solution. Consider any two points $F, G$ on $\omega$ such that $\angle B F D=\angle D G C$. Exploiting the isosceles triangles $\triangle A F G, \triangle A F D$, and $\triangle A D G$, we deduce (using directed angles throughout):
412
+
413
+ $$
414
+ \begin{gathered}
415
+ \angle D B F-\angle G C D=180^{\circ}-\angle B F D-\angle B D F-\left(180^{\circ}-\angle D G C-\angle C D G\right) \stackrel{(*)}{=} \\
416
+ \angle C D G-\angle F D B=\frac{1}{2} \cdot(\angle D A G-\angle D A F)=\frac{1}{2} \cdot\left[\left(180^{\circ}-2 \cdot \angle A D G\right)-\left(180^{\circ}-2 \cdot \angle A D F\right)\right]= \\
417
+ \angle A D F-\angle G D A=\angle D F A-\angle A G D=\angle D F G-\angle F G D \stackrel{(*)}{=} \angle B F G-\angle F G C,
418
+ \end{gathered}
419
+ $$
420
+
421
+ where we use $\angle B F D=\angle D G C$ at $\left(^{*}\right)$. Thus $B F G C$ is cyclic.
422
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-17.jpg?height=1223&width=1117&top_left_y=2421&top_left_x=1563)
423
+
424
+ Figure 3: G3
425
+ Now, if in addition $F G \perp A O$, then since $A$ is the centre of $\omega$, in fact $A O$ is the perpendicular bisector of $F G$. But by definition, since $A B C$ is scalene, $A O$ meets the perpendicular bisector of $B C$ at $O$. Hence $O$ is the centre of $B F G C$, and thus in fact $B F A G C$ is cyclic. But then the lines perpendicular to $A F$ at $F$, and $A G$ at $G$ (the tangents to $\omega$ ) must intersect at $E$, the point antipodal to $A$ on $\odot B F A G C$.
426
+
427
+ Alternative solution: Let the circumcircle of $A B C$ be $\Gamma$. From the conditions, $G$ is the reflection of $F$ in the line $A O$. Let $B^{\prime}, D^{\prime}$ be the reflections of $B, D$ across this same line $A O$. Clearly $D^{\prime}$ also lies on $\omega$ and $B^{\prime}$ lies on $\Gamma$.
428
+
429
+ Then, using directed angles, $\angle C G D=\angle D F B=\angle B^{\prime} G D^{\prime}$ so
430
+
431
+ $$
432
+ \angle B^{\prime} G C=\angle B^{\prime} G D^{\prime}-\angle C G D^{\prime}=\angle C G D-\angle C G D^{\prime}=\angle D^{\prime} G D=\frac{1}{2} \angle D^{\prime} A D=\angle O A D .
433
+ $$
434
+
435
+ Then, exploiting the isogonality property that $\angle D A B=\angle C A O$, we have $\angle O A D=\angle C A B-2 \angle D A B=\angle A B C-\angle B C A=\angle A B C-\angle B^{\prime} B A=\angle B^{\prime} B C$.
436
+
437
+ So $G$ lies on $\Gamma$, and by the reflection property so does $F$.
438
+ But then, as in the previous solution, the tangents at $F$ and $G$ to $\omega$ must intersect at $E$, the point antipodal to $A$ on $\Gamma$.
439
+
440
+ G4. Given an acute triangle $A B C$, let $M$ be the midpoint of $B C$ and $H$ the orthocentre. Let $\Gamma$ be the circle with diameter $H M$, and let $X, Y$ be distinct points on $\Gamma$ such that $A X, A Y$ are tangent to $\Gamma$. Prove that $B X Y C$ is cyclic.
441
+
442
+ Solution. Let $D$ be the foot of the altitude from $A$ to $B C$, which also lies on $\Gamma$. Let $O$ be the circumcentre of $\triangle A B C$. Since $\angle H D M=90^{\circ}$, note that rays $H D$ and $H M$ meet the circumcircle at points which are reflections in $O M$. Then, since $\angle B A D=\angle O A C$, we recover the well-known fact that ray $H M$ meets the circumcircle at $A^{\prime}$, the point antipodal to $A$. Therefore, the ray $M H$ meets the circumcircle at a point $T$ such that $\angle M T A=90^{\circ}$. Note that $T, D$ lie on the circle with diameter $A M$.
443
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-19.jpg?height=1235&width=1941&top_left_y=1780&top_left_x=1157)
444
+
445
+ Figure 4: G4
446
+ Now, study $K$, the centre of $\Gamma$. Clearly $A X K Y$ is cyclic, with diameter $A K$, so $T$ also lies on this circle. We can now apply the radical axis theorem to the three circles $\odot A T X K Y, \odot A T D M, \odot H X D M Y$ to deduce that $A T, X Y, D M$ concur at a point, $Z$.
447
+
448
+ Then, by power of a point in $\odot A T X Y$, we have $Z X \cdot Z Y=Z T \cdot Z A$; but also by power of a point in the circumcircle, we have $Z A \cdot Z T=Z B \cdot Z C$. Therefore
449
+
450
+ $$
451
+ Z X \cdot Z Y=Z B \cdot Z C
452
+ $$
453
+
454
+ and the result follows.
455
+
456
+ G5. Let $A B C(B C>A C)$ be an acute triangle with circumcircle $k$ centered at $O$. The tangent to $k$ at $C$ intersects the line $A B$ at the point $D$. The circumcircles of triangles $B C D, O C D$ and $A O B$ intersect the ray $C A$ (beyond $A$ ) at the points $Q, P$ and $K$, respectively, such that $P \in(A K)$ and $K \in(P Q)$. The line $P D$ intersects the circumcircle of triangle $B K Q$ at the point $T$, so that $P$ and $T$ are in different halfplanes with respect to $B Q$. Prove that $T B=T Q$.
457
+
458
+ Solution. As $D C$ is tangent to $k$ at $C$ then $\angle O C D=90^{\circ}$. Denote by $X$ the midpoint of $A B$. Then $\angle O X A=90^{\circ}$ because of $O X$ is the perpendicular bisector of the side $A B$. The pentagon $P X O C D$ is inscribed in the circle with diameter $O D$, hence $\angle P X A=$ $\angle P X D=\angle P C D=\angle Q C D=\angle Q B A$ (the latter is due to $Q B C D$ being cyclic). We deduce that $P X \| Q B$ and that $P$ is the midpoint of $A Q$, so $A P=P Q$.
459
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-20.jpg?height=2217&width=2029&top_left_y=2006&top_left_x=1066)
460
+
461
+ Figure 5: G5
462
+ Now let $T_{1}$ be the midpoint of the arc $B Q$, not containing $K$, from the circumcircle of $\triangle B K Q$, then $T_{1} B=T_{1} Q$. Due to $\angle D P O=90^{\circ}$, it suffices to show that $\angle O P T_{1}=90^{\circ}$ - indeed, $T \equiv T_{1}$ and $T B=T Q$ would follow.
463
+
464
+ Denote by $Y$ the midpoint of $B Q$. Then $\angle O X B=\angle T_{1} Y B=90^{\circ}$. The quadrilateral $Q K B T_{1}$ is inscribed in a circle, hence $\angle B T_{1} Q=180-\angle B K Q=\angle A K B$. Then $\angle X B O=$ $\frac{1}{2} \angle A K B=\frac{1}{2} \angle B T_{1} Q=\angle B T_{1} Y$ and thus $\triangle O X B \sim \triangle B Y T_{1}$. The quadrilaterals $P X B Y$
465
+ and $A X Y P$ are paralellograms, since $X Y$ and $P Y$ are middle lines of the triangle $A Q B$. Consequently,
466
+
467
+ $$
468
+ \frac{O X}{X P}=\frac{O X}{B Y}=\frac{X B}{T_{1} Y}=\frac{P Y}{T_{1} Y}
469
+ $$
470
+
471
+ which along with $\angle P X B=\angle P Y B$ and $\angle O X B=\angle T_{1} Y B$ gives $\angle O X P=\angle P Y T_{1}$ and $\triangle O X P \sim \triangle P Y T_{1}$. Thus $\angle X P O=\angle Y T_{1} P$ and $\angle P O X=\angle T_{1} P Y$.
472
+
473
+ In conclusion,
474
+
475
+ $$
476
+ \angle O P T_{1}=\angle X P Y+\angle X P O+\angle Y P T_{1}=\angle P X A+\angle X P O+\angle X O P=90^{\circ}
477
+ $$
478
+
479
+ G6. Let $A B C$ be an acute triangle, and $A X, A Y$ two isogonal lines. Also, suppose that $K, S$ are the feet of perpendiculars from $B$ to $A X, A Y$, and $T, L$ are the feet of perpendiculars from $C$ to $A X, A Y$ respectively. Prove that $K L$ and $S T$ intersect on $B C$.
480
+
481
+ Solution. Denote $\phi=\widehat{X A B}=\widehat{Y A C}, \alpha=\widehat{C A X}=\widehat{B A Y}$. Then, because the quadrilaterals ABSK and ACTL are cyclic, we have
482
+
483
+ $$
484
+ \widehat{B S K}+\widehat{B A K}=180^{\circ}=\widehat{B S K}+\phi=\widehat{L A C}+\widehat{L T C}=\widehat{L T C}+\phi,
485
+ $$
486
+
487
+ so, due to the 90-degree angles formed, we have $\widehat{K S L}=\widehat{K T L}$. Thus, KLST is cyclic.
488
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-22.jpg?height=1935&width=1705&top_left_y=1871&top_left_x=1257)
489
+
490
+ Figure 6: G6
491
+ Consider $M$ to be the midpoint of $B C$ and $K^{\prime}$ to be the symmetric point of $K$ with respect to $M$. Then, $B K C K^{\prime}$ is a parallelogram, and so $B K \| C K^{\prime}$. But $B K \| C T$, because they are both perpendicular to $A X$. So, $K^{\prime}$ lies on $C T$ and, as $\widehat{K T K^{\prime}}=90$ and $M$ is the midpoint of $K K^{\prime}, M K=M T$. In a similar way, we have that $M S=M L$. Thus, the center of $(K L S T)$ is $M$.
492
+
493
+ Consider $D$ to be the foot of altitude from $A$ to $B C$. Then, $D$ belongs in both $(A B K S)$ and ( $A C L T)$. So,
494
+
495
+ $$
496
+ \widehat{A D T}+\widehat{A C T}=180^{\circ}=\widehat{A B S}+\widehat{A D S}=\widehat{A D T}+90^{\circ}-\alpha=\widehat{A D S}+90^{\circ}-\alpha,
497
+ $$
498
+
499
+ and $A D$ is the bisector of $\widehat{S D T}$.
500
+ Because $D M$ is perpendicular to $A D, D M$ is the external bisector of this angle, and, as $M S=M T$, it follows that $D M S T$ is cyclic. In a similar way, we have that $D M L K$ is also cyclic.
501
+
502
+ So, we have that $S T, K L$ and $D M$ are the radical axes of these three circles, $(K L S T)$, $(D M S T),(D M K L)$. These lines are, therefore, concurrent, and we have proved the desired result.
503
+
504
+ Alternative solution. We continue after proving that $M$ is the center of $(K L S T)$. If $D$ is the foot of perpendicular from $A$ to $B C$, then $A S D K B$ is cyclic, as well as $A T D L C$. The radical axes of those two circles and ( $K L S T)$ are concurrent, thus $K S$ and $L T$ intersect on point $Q \in A D$. So, if $P$ is the intersection point of $K L$ and $T S$, due to Brokard's theorem, $A Q$ is perpendicular to $M P$. This is, of course, equivalent to proving that $P$ belongs on $B C$.
505
+
506
+ G7. Let $A D, B E$, and $C F$ denote the altitudes of triangle $\triangle A B C$. Points $E^{\prime}$ and $F^{\prime}$ are the reflections of $E$ and $F$ over $A D$, respectively. The lines $B F^{\prime}$ and $C E^{\prime}$ intersect at $X$, while the lines $B E^{\prime}$ and $C F^{\prime}$ intersect at the point $Y$. Prove that if $H$ is the orthocenter of $\triangle A B C$, then the lines $A X, Y H$, and $B C$ are concurrent.
507
+
508
+ Solution. We will prove that the desired point of concurrency is the midpoint of $B C$. Assume that $\triangle A B C$ is acute. Let $(A B C)^{5}$ intersect $(A E F)$ at the point $Y^{\prime}$; we will prove that $Y=Y^{\prime}$.
509
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-24.jpg?height=1623&width=1529&top_left_y=1569&top_left_x=1422)
510
+
511
+ Figure 7: G7
512
+ Using the fact that $H$ is the incenter of $\triangle D E F$ we get that $D, E^{\prime}, F$ and $D, F^{\prime}, E$ are triples of collinear points. Furthermore,
513
+
514
+ $$
515
+ 90^{\circ}=\angle{ }^{6} A E H=\angle A F^{\prime} H=\angle A E^{\prime} H=\angle A F H \Rightarrow F^{\prime}, E^{\prime}, H \in\left(A E F Y^{\prime}\right) .
516
+ $$
517
+
518
+ We will now prove that the points $Y^{\prime}, B, D, F^{\prime}$ are concyclic. Indeed,
519
+
520
+ $$
521
+ \angle Y^{\prime} B D=\angle Y^{\prime} B C=\angle Y^{\prime} A C=\angle Y^{\prime} A E=\angle Y^{\prime} F^{\prime} E \Rightarrow\left(Y^{\prime}, B, D, F^{\prime}\right) .
522
+ $$
523
+
524
+ Now, as
525
+
526
+ $$
527
+ \angle F^{\prime} Y^{\prime} B=\angle F^{\prime} D C=\angle E D C=\angle C A B=\angle C Y^{\prime} B,
528
+ $$
529
+
530
+ the points $C, F^{\prime}, Y^{\prime}$ are collinear. Similarly we get that $B, E^{\prime}, Y^{\prime}$ are collinear, which implies
531
+
532
+ $$
533
+ Y^{\prime}=Y=(A B C) \cap(A E F) .
534
+ $$
535
+
536
+ [^4]Since we proved this property using directed angles, we know that it is also true for obtuse triangles.
537
+
538
+ Notice that the points $A, B, C, H$ form an orthocentric system; in other words $H$ is the orthocenter of $\triangle A B C$ and $A$ is the orthocenter $\triangle H B C$. Furthermore, notice that $F^{\prime}$ is to $\triangle A B C$ as $E^{\prime}$ is to $\triangle H B C$ and that $E^{\prime}$ is to $\triangle A B C$ as $F^{\prime}$ is to $\triangle H B C$. This means that $X$ is to $\triangle H B C$ as $Y$ is to $\triangle A B C$ and, as we know the proven property is also true for obtuse triangles, we get
539
+
540
+ $$
541
+ X=(H B C) \cap(A E F) .
542
+ $$
543
+
544
+ By Reflecting the Orthocenter Lemma we know that in a triangle $A B C$, the reflection of its orthocenter over the midpoint of $B C$ is the antipode of $A$ w.r.t. ( $A B C$ ). Applying this Lemma on the triangles $A B C$ and $H B C$ we get that $Y H$ and $A X$ both go through the midpoint of $B C$, thus finishing the solution.
545
+
546
+ Remark 1: The crucial part of this solution is defining the points $X, Y$ as intersections of circles. This can also be achieved directly by using similar triangles or by using the Spiral Similarity Lemma on $\triangle H B C, \triangle H F^{\prime} E^{\prime}$ and $\triangle A B C, \triangle A E^{\prime} F^{\prime}$.
547
+
548
+ Remark 2: We can also invert around $A$ with radius $\sqrt{A H \cdot A D}$ or around $H$ with radius $\sqrt{H A \cdot H D}$ to prove that $X$ or $Y$ invert to the midpoint of $B C$ by using the existence of the nine-point circle.
549
+
550
+ G8. Given an acute triangle $A B C,(c)$ is circumcircle with center $O$ and $H$ the orthocenter of the triangle $A B C$. The line $A O$ intersects $(c)$ at the point $D$. Let $D_{1}, D_{2}$ and $H_{2}, H_{3}$ be the symmetrical points of the points $D$ and $H$ with respect to the lines $A B, A C$ respectively. Let $\left(c_{1}\right)$ be the circumcircle of the triangle $A D_{1} D_{2}$. Suppose that the line $A H$ intersects again $\left(c_{1}\right)$ at the point $U$, the line $H_{2} H_{3}$ intersects the segment $D_{1} D_{2}$ at the point $K_{1}$ and the line $D H_{3}$ intersects the segment $U D_{2}$ at the point $L_{1}$. Prove that one of the intersection points of the circumcircles of the triangles $D_{1} K_{1} H_{2}$ and $U D L_{1}$ lies on the line $K_{1} L_{1}$.
551
+
552
+ Solution. It is well known that the symmetrical points $H_{1}, H_{2}, H_{3}$ of $H$ with respect the sides $B C, A B, A C$ of the triangle $A B C$ respectively lie on the circle (c).
553
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-26.jpg?height=2087&width=2264&top_left_y=1895&top_left_x=972)
554
+
555
+ Figure 8: G8
556
+ Let $L$ be the second point of intersection of $(c)$ and $\left(c_{1}\right)$. First we will prove that the lines $D_{1} H_{2}, D_{2} H_{3}$ and $U D$ pass through the point $L$.
557
+
558
+ Suppose that the line $A H$ intersects the side $B C$ at the point $Z$. Since $H_{1} D\|B C\| D_{1} D_{2}$ and $B, C$ are the midpoints of the segments $D_{1} D, D_{2} D$ respectively, we get that $Z$ is the midpoint of the segment $H H_{1}$, so the point $H$ lies on $D_{1} D_{2}$. Therefore, $A H \perp D_{1} D_{2}$ and $A U$ is a diameter of $\left(c_{1}\right)$. Thus, $A L \perp U L$ and $A L \perp D L$. We have that the points $U, D, L$ are collinear. (1)
559
+
560
+ Now, $\angle A L D_{1}=\angle A D_{2} D_{1}, \angle A L H_{2}=\angle A C H_{2}$. Since $A H C D_{2}$ is cyclic we get
561
+ $\angle A C H_{2}=\angle A D_{2} D_{1}$. Therefore, $\angle A L H_{2}=\angle A L D_{1}$. So the points $D_{1}, H_{2}, L$ are collinear. (2)
562
+
563
+ Similarly,
564
+
565
+ $$
566
+ \angle D_{1} L D_{2}=\angle D_{1} A D_{2}=180^{\circ}-2\left(\angle A D_{1} H\right) .
567
+ $$
568
+
569
+ Since $A D_{1} B H$ is cyclic we have $\angle A D_{1} H=\angle A B H=\angle A B H_{3}$. Therefore, we get
570
+
571
+ $$
572
+ \angle D_{1} L D_{2}=180^{\circ}-2\left(\angle A B H_{3}\right)=180^{\circ}-2\left(\angle A D H_{3}\right)=180^{\circ}-\angle H_{2} D H_{3} .
573
+ $$
574
+
575
+ Thus,
576
+
577
+ $$
578
+ \angle D_{1} L D_{2}+\angle H_{2} D H_{3}=180^{\circ} \quad \text { or } \angle D_{1} L D_{2}+\angle H_{3} L H_{2}=180^{\circ} .
579
+ $$
580
+
581
+ So the points $H_{3}, L, D_{2}$ are collinear. (3)
582
+ From (1), (2), (3) we have that the lines $D_{1} H_{2}, D_{2} H_{3}$ and $U D$ are concurrent at the point $L$.
583
+
584
+ Also we have
585
+
586
+ $$
587
+ \angle H_{3} D A=\angle D_{2} D A-\angle C D H_{3}=\angle A D_{2} D-\angle C B H_{3}
588
+ $$
589
+
590
+ and because $B \mathrm{HD}_{2} \mathrm{C}$ is a parallelogram, we get $\angle C B H_{3}=\angle H D_{2} C$. So
591
+
592
+ $$
593
+ \angle H_{3} D A=\angle A D_{2} D-\angle H D_{2} C=\angle A D_{2} D_{1}=\angle A D_{1} D_{2}=\angle A U D_{2} .
594
+ $$
595
+
596
+ Therefore, the circumcircle of the triangle $U D L_{1}$ passes through the point $A$. Also, $\angle A D_{1} K_{1}=\angle D_{2} D_{1} A=\angle D_{2} U A$. But $A U L_{1} D$ is cyclic and we have $\angle D_{2} U A=\angle H_{3} D A=$ $\angle H_{3} B A=\angle H_{3} H_{2} A$. Therefore, $\angle A D_{1} K_{1}=\angle H_{3} H_{2} A$. Thus, the circumcircle of the triangle $D_{1} K_{1} H_{2}$ passes through the point $A$.
597
+
598
+ Because the points $H_{3}, L, D_{2}$ are collinear by the Desargues theorem, the lines $U D_{1}$, $L_{1} K_{1}, D H_{2}$ are concurrent, let say in the point $M$.
599
+
600
+ From the similarity of the triangles $U D L_{1}$ and $D_{1} K_{1} H_{2}$ we conclude that $M$ is the center of unique spiral similarity and because the circumcircles of the triangles $D_{1} K_{1} H_{2}$ and $U D L_{1}$ intersect at the point $A$, then the second point of intersection is $M$. Therefore, $M$ lies on the line $K_{1} L_{1}$.
601
+
602
+ Comment. We can prove the last part in a different way.
603
+ Let $M$ be the point of intersection of the circumcircles of the triangles $D_{1} K_{1} H_{2}$ and $U D L_{1}$. Now, we have
604
+
605
+ $$
606
+ \angle K_{1} M A=\angle H_{3} H_{2} A=\angle H_{3} B A=\angle A D H_{3}=\angle L_{1} U A=\angle L_{1} M A .
607
+ $$
608
+
609
+ Therefore, the points $L_{1}, K_{1}, M$ are collinear.
610
+
611
+ G9. Given semicircle (c) with diameter $A B$ and center $O$. On the (c) we take point $C$ such that the tangent at the $C$ intersects the line $A B$ at the point $E$. The perpendicular line from $C$ to $A B$ intersects the diameter $A B$ at the point $D$. On the (c) we get the points $H, Z$ such that $C D=C H=C Z$. The line $H Z$ intersects the lines $C O, C D, A B$ at the points $S, I, K$ respectively and the parallel line from $I$ to the line $A B$ intersects the lines $C O, C K$ at the points $L, M$ respectively. We consider the circumcircle $(k)$ of the triangle $L M D$, which intersects again the lines $A B, C K$ at the points $P, U$ respectively. Let $\left(e_{1}\right)$, $\left(e_{2}\right),\left(e_{3}\right)$ be the tangents of the $(k)$ at the points $L, M, P$ respectively and $R=\left(e_{1}\right) \cap\left(e_{2}\right)$, $X=\left(e_{2}\right) \cap\left(e_{3}\right), T=\left(e_{1}\right) \cap\left(e_{3}\right)$. Prove that if $Q$ is the center of $(k)$, the lines $R D, T U$, $X S$ pass through the same point, which lies in the line $I Q$.
612
+
613
+ Solution. Since $C H=C Z$ we have $O C \perp H Z$. So from the cyclic quadrilateral $S O D I$ we get
614
+
615
+ $$
616
+ C S \cdot C O=C I \cdot C D .
617
+ $$
618
+
619
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-28.jpg?height=1900&width=2528&top_left_y=2200&top_left_x=846)
620
+
621
+ Figure 9: G9
622
+ We draw the perpendicular line $(v)$ to $H C$ at the point $H$. Let $J$ be the intersection point of lines $(v)$ and $C O$. Then $C J$ is diameter of the circle $(O, O A)$ and
623
+
624
+ $$
625
+ C J=2 C O
626
+ $$
627
+
628
+ From the right triangle $J H C$ we have
629
+
630
+ $$
631
+ H C^{2}=C S \cdot C J
632
+ $$
633
+
634
+ Therefore, from (1), (2) and (3) we get
635
+
636
+ $$
637
+ C S \cdot \frac{1}{2} C J=C I \cdot C D \quad \text { or } \quad H C^{2}=2 C I \cdot C D \text {. }
638
+ $$
639
+
640
+ However $H C=C D$ and thus $C D=2 C I$. Thus, $I$ is the midpoint of the segment $C D$. Nevertheless, $L M \| O K$, so the points $L, M$ are the midpoints of the sides $C O$ and $C K$ respectively. Therefore, the circumcircle $(k)$ of the triangle $L M D$ is the Euler circle of the $C O K$ and thus it passes through the point $S$.
641
+
642
+ We have $Q S=Q U$ and from the right triangles $O S K, O U K$ we get $P S=P U=\frac{O K}{2}$.
643
+ Therefore, the points $P, Q$ are located on the perpendicular bisector of the segment $S U$. Now, we conclude that $S U \| T X$, because $Q P \perp\left(e_{3}\right)$. Similarly, we prove that $D U \| R T$ and $S D \| R X$.
644
+
645
+ Since the triangles $S U D$ and $X T R$ are homothetic we get that the lines $R D, T U, X S$ are concurrent at the center $\mathcal{M}$ of homothety.
646
+
647
+ The points $I$ and $Q$ atre the incenters of homothetic triangles $S U D$ and $X T R$, respectively. Thus, the line $I Q$ passes through the point $\mathcal{M}$.
648
+
649
+ ## NUMBER THEORY
650
+
651
+ TN1. Let $\mathbb{P}$ be the set of all prime numbers. Find all functions $f: \mathbb{P} \rightarrow \mathbb{P}$ such that
652
+
653
+ $$
654
+ f(p)^{f(q)}+q^{p}=f(q)^{f(p)}+p^{q}
655
+ $$
656
+
657
+ holds for all $p, q \in \mathbb{P}$.
658
+ Solution. Obviously, the identical function $f(p)=p$ for all $p \in \mathbb{P}$ is a solution. We will show that this is the only one.
659
+
660
+ First we will show that $f(2)=2$. Taking $q=2$ and $p$ any odd prime number, we have
661
+
662
+ $$
663
+ f(p)^{f(2)}+2^{p}=f(2)^{f(p)}+p^{2} .
664
+ $$
665
+
666
+ Assume that $f(2) \neq 2$. It follows that $f(2)$ is odd and so $f(p)=2$ for any odd prime number $p$.
667
+
668
+ Taking any two different odd prime numbers $p, q$ we have
669
+
670
+ $$
671
+ 2^{2}+q^{p}=2^{2}+p^{q} \Rightarrow p^{q}=q^{p} \Rightarrow p=q,
672
+ $$
673
+
674
+ contradiction. Hence, $f(2)=2$.
675
+ So for any odd prime number $p$ we have
676
+
677
+ $$
678
+ f(p)^{2}+2^{p}=2^{f(p)}+p^{2} .
679
+ $$
680
+
681
+ Copy this relation as
682
+
683
+ $$
684
+ 2^{p}-p^{2}=2^{f(p)}-f(p)^{2}
685
+ $$
686
+
687
+ Let $T$ be the set of all positive integers greater than 2 , i.e. $T=\{3,4,5, \ldots\}$. The function $g: T \rightarrow \mathbb{Z}, g(n)=2^{n}-n^{2}$, is strictly increasing, i.e.
688
+
689
+ $$
690
+ g(n+1)-g(n)=2^{n}-2 n-1>0
691
+ $$
692
+
693
+ for all $n \in T$. We show this by induction. Indeed, for $n=3$ it is true, $2^{3}-2 \cdot 3-1>0$. Assume that $2^{k}-2 k-1>0$. It follows that for $n=k+1$ we have
694
+
695
+ $$
696
+ 2^{k+1}-2(k+1)-1=\left(2^{k}-2 k-1\right)+\left(2^{k}-2\right)>0
697
+ $$
698
+
699
+ for any $k \geq 3$. Therefore, (2) is true for all $n \in T$.
700
+ As consequence, (1) holds if and only if $f(p)=p$ for all odd prime numbers $p$, as well as for $p=2$.
701
+
702
+ Therefore, the only function that satisfies the given relation is $f(p)=p$, for all $p \in \mathbb{P}$.
703
+
704
+ TN2. Let $S \subset\{1, \ldots, n\}$ be a nonempty set, where $n$ is a positive integer. We denote by $s$ the greatest common divisor of the elements of the set $S$. We assume that $s \neq 1$ and let $d$ be its smallest divisor greater than 1 . Let $T \subset\{1, \ldots, n\}$ be a set such that $S \subset T$ and $|T| \geq 1+\left[\frac{n}{d}\right]$. Prove that the greatest common divisor of the elements in $T$ is 1 .
705
+
706
+ Solution. Let $t$ be the greatest common divisor of the elements in $T$. Due to the fact that $S \subset T$, we immediately get that $t / s$. Let us assume for the sake of contradiction that $t \neq 1$. From the previous observation we get that $t \geq d$.
707
+
708
+ By taking into account that $|T| \geq 1+\left[\frac{n}{d}\right]$, we infer that we can find at least $1+\left[\frac{n}{d}\right]$ elements in $T$. All of them will be divisible by $t$, and the largest of them, which we shall denote by $M$, will be at least $t \cdot\left(1+\left[\frac{n}{d}\right]\right)$. On the other hand, $t \geq d$, hence
709
+
710
+ $$
711
+ M \geq t \cdot\left(1+\left[\frac{n}{d}\right]\right) \geq d \cdot\left(1+\left[\frac{n}{d}\right]\right)>d \cdot \frac{n}{d}=n
712
+ $$
713
+
714
+ Therefore, $M>n$, which contradicts the fact that $M \in\{1, \ldots, n\}$.
715
+ In conclusion, $t=1$, as desired.
716
+ TN2b. ${ }^{7}$ Let $n(n \geq 1)$ be a positive integer and $U=\{1, \ldots, n\}$. Let $S$ be a nonempty subset of $U$ and let $d(d \neq 1)$ be the smallest common divisor of all elements of the set $S$. Find the smallest positive integer $k$ such that for any subset $T$ of $U$, consisting of $k$ elements, with $S \subset T$, the greatest common divisor of all elements of $T$ is equal to 1 .
717
+
718
+ Solution. We will show that $k_{\min }=1+\left[\frac{n}{d}\right]$ (here [.] denotes the integer part).
719
+ Obviously, the number of elements of $S$ is not grater than $\left[\frac{n}{d}\right]$, i.e. $|S| \leq\left[\frac{n}{d}\right]$, and $S \neq U$.
720
+
721
+ If $S \subset T$ and the greatest common divisor of elements of $T$ is equal to 1 , then $|T| \geq|S|+1$.
722
+
723
+ 1) Assume that $|S|<\left[\frac{n}{d}\right]$. Let $T$ be the subset of $U$, consisting of all multiples of $d$ in $U$. Thus, $|T|=\left[\frac{n}{d}\right]$ and $S \subset T$. Therefore, the greatest common divisor of all elements of $T$ is $d>1$. Thus, $k \geq 1+\left[\frac{n}{d}\right]$.
724
+ 2) Assume $|S|=\left[\frac{n}{d}\right]$. Let $T$ be any subset of $U$ with $S \subset T, S \neq T$. Therefore, $|T| \geq 1+\left[\frac{n}{d}\right]$. Let $q$ be the greatest common divisor of all elements of $T$. Assume that $q>1$. Therefore, $q$ is a common divisor of all elements of $S$ as well. Hence, $q \geq d$. It follows that $|T| \leq\left[\frac{n}{q}\right] \leq\left[\frac{n}{d}\right]$, contradiction. Hence, $q=1$.
725
+
726
+ Therefore, the minimal possible value of $k$ is $1+\left[\frac{n}{d}\right]$.
727
+
728
+ [^5]
729
+ ## COMBINATORICS
730
+
731
+ C1. 100 couples are invited to a traditional Moldovan dance. The 200 people stand in a line, and then in a step, two of them (not necessarily adjacent) may swap positions. Find the least $C$ such that whatever the initial order, they can arrive at an ordering where everyone is dancing next to their partner in at most $C$ steps.
732
+
733
+ Solution. With 100 replaced by $N$, the answer is $C=C(N)=N-1$. Throughout, we will say that the members of a couple have the same.
734
+ $N=2$ : We use this as a base case for induction for both bounds. Up to labelling, there is one trivial initial order, and two non-trivial ones, namely
735
+
736
+ $$
737
+ 1,1,2,2 ; \quad 1, \sqrt{2,2,1} ; \quad 1, \sqrt{2,1}, 2
738
+ $$
739
+
740
+ The brackets indicate how to arrive at a suitable final ordering with one step. Obviously one step is necessary in the second and third cases.
741
+
742
+ Upper bound: First we show $C(N) \leq N-1$, by induction. The base case $N=2$ has already been seen. Now suppose the claim is true for $N-1$, and consider an initial arrangement of $N$ couples. Suppose the types of the left-most couples in line are $a$ and $b$. If $a \neq b$, then in the first step, swap the $b$ in place two with the other person with type $a$. If $a=b$, skip this. In both cases, we now have $N-1$ couples distributed among the final $2 N-2$ places, and we know that $N-2$ steps suffices to order them appropriately, by induction. So $N-1$ steps suffices for $N$ couples.
743
+
744
+ Lower bound: We need to exhibit an example of an initial order for which $N-1$ steps are necessary. Consider
745
+
746
+ $$
747
+ \mathcal{A}_{N}:=1,2,2,3,3, \ldots, N-1, N-1, N, N, 1
748
+ $$
749
+
750
+ Proceed by induction, with the base case $N=2$ trivial. Suppose there is a sequence of at most $N-2$ steps which works. In any suitable final arrangement, a given type must be in positions (odd, even), whereas they start in positions (even, odd). So each type must be involved in at least one step. However, each step involves at most two types, so by the pigeonhole principle, at least four types are involved in at most one step. Pick one such type $a \neq 1$. The one step involving $a$ must be one of
751
+
752
+ $$
753
+ \ldots, ?, a, a, ?, \ldots .
754
+ $$
755
+
756
+ Neither of these steps affects the relative order of the $2 N-2$ other people. So by ignoring this step involving the $a$, we have a sequence of at most $N-3$ steps acting on the other $2 N-2$ people which appropriately sorts them. By induction, this is a contradiction.
757
+
758
+ Alternative lower bound I: Consider the graph with vertices given by pairs of positions $\{(1,2),(3,4), \ldots,(2 N-1,2 N)\}$. We add an edge between pairs of (different)
759
+ vertices if we ever swap two people in places corresponding to those vertices. In particular, at the end, the two people with type $k$ end up in places corresponding to a single vertex.
760
+
761
+ Suppose we start from the ordering (1) and have some number of steps leading to an ordering where everyone is next to their partner. Then, in the induced graph, there is a path between the vertices corresponding to the places $(2 k-3,2 k-2)$ and $(2 k-1,2 k)$ for each $2 \leq k \leq N$, and also between $(1,2)$ and $(2 N-1,2 N)$. In other words, the graph is connected, and so must have at least $N-1$ edges.
762
+
763
+ Alternative lower bound II: Consider a bipartite multigraph with vertex classes $\left(v_{1}, \ldots, v_{n}\right)$ and $\left(w_{1}, \ldots, w_{n}\right)$. Connect $v_{i}$ to $w_{j}$ if a person of type $j$ is in positions ( $2 i-1,2 i$ ) (if both positions are taken by the type $j$ couple, then add two edges).
764
+
765
+ Each step in the dance consists of replacing edges $\left.E=\left\{v_{a} \leftrightarrow w_{c}, v_{b} \leftrightarrow w_{d}\right)\right\}$ with $E^{\prime}=\left\{v_{a} \leftrightarrow w_{d}, v_{b} \leftrightarrow w_{c}\right\}$. However, both before and after the step, the number of components in the graph which include $\left\{v_{a}, v_{b}, w_{c}, w_{d}\right\}$ is either one or two. The structure of other components which do not include these vertices is unaffected by the move.
766
+
767
+ Therefore, the number of connected components increases by at most 1 in each step.
768
+ Starting from configuration (1), the graph initially consists of a single (cyclic) component, so one requires at least $n-1$ steps to get to the final configuration for which there are $n$ connected components.
769
+
770
+ C2. Suppose that the numbers $\{1,2, \ldots, 25\}$ are written in some order in an $5 \times 5$ array. Find the maximal positive integer $k$, such that the following holds. There is always an $2 \times 2$ subarray whose numbers have a sum not less than $k$.
771
+
772
+ C2b. ${ }^{8}$ An $5 \times 5$ array must be completed with all numbers $\{1,2, \ldots, 25\}$, one number in each cell. Find the maximal positive integer $k$, such that for any completion of the array there is a $2 \times 2$ square (subarray), whose numbers have a sum not less than $k$.
773
+
774
+ Solution. We will prove that $k_{\max }=45$.
775
+ We number the columns and the rows and we select all possible $3^{2}=9$ choices of an odd column with an odd row.
776
+
777
+ Collecting all such pairs of an odd column with an odd row, we double count some squares. Indeed, we take some $3^{2}$ squares 5 times, some 12 squares 3 times and there are some 4 squares (namely all the intersections of an even column with an even row) that we don't take in such pairs.
778
+
779
+ It follows that the maximal total sum over all $3^{2}$ choices of an odd column with an odd row is
780
+
781
+ $$
782
+ 5 \times(17+18+\cdots+25)+3 \times(5+6+\cdots+16)=1323
783
+ $$
784
+
785
+ So, by an averaging argument, there exists a pair of an odd column with an odd row with sum at most $\frac{1323}{9}=147$.
786
+
787
+ Then all the other squares of the array will have sum at least
788
+
789
+ $$
790
+ (1+2+\cdots+25)-147=178
791
+ $$
792
+
793
+ But for these squares there is a tiling with $2 \times 2$ arrays, which are 4 in total. So there is an $2 \times 2$ array, whose numbers have a sum at least $\frac{178}{4}>44$. So, there is a $2 \times 2$ array whose numbers have a sum at least 45 . This argument gives that
794
+
795
+ $$
796
+ k_{\max } \geq 45 .
797
+ $$
798
+
799
+ We are going now to give an example of an array, in which 45 is the best possible. We fill the rows of the array as follows:
800
+
801
+ | 25 | 5 | 24 | 6 | 23 |
802
+ | :---: | :---: | :---: | :---: | :---: |
803
+ | 11 | 4 | 12 | 3 | 13 |
804
+ | 22 | 7 | 21 | 8 | 20 |
805
+ | 14 | 2 | 15 | 1 | 16 |
806
+ | 19 | 9 | 18 | 10 | 17 |
807
+
808
+ We are going now to even rows:
809
+ In the above array, every $2 \times 2$ subarray has a sum, which is less or equal to 45 . This gives that
810
+
811
+ $$
812
+ k_{\max } \leq 45 .
813
+ $$
814
+
815
+ A combination of (1) and (2) gives that $k_{\max }=45$.
816
+
817
+ [^6]C3. Anna and Bob play a game on the set of all points of the form $(m, n)$ where $m, n$ are integers with $|m|,|n| \leqslant 2019$. Let us call the lines $x= \pm 2019$ and $y= \pm 2019$ the boundary lines of the game. The points of these lines are called the boundary points. The neighbours of point $(m, n)$ are the points $(m+1, n),(m-1, n),(m, n+1),(m, n-1)$.
818
+
819
+ Anna starts with a token at the origin ( 0,0 ). With Bob playing first, they alternately perform the following steps: At his turn, Bob deletes two points on each boundary line. On her turn Anna makes a sequences of three moves of the token, where a move of the token consists of picking up the token from its current position and placing it in one of its neighbours.
820
+
821
+ To win the game Anna must place her token on a boundary point before it is deleted by Bob. Does Anna have a winning strategy?
822
+ [Note: At every turn except perhaps her last, Anna must make exactly three moves.]
823
+ Solution. Anna does not have a winning strategy. We will provide a winning strategy for Bob. It is enough to describe his strategy for the deletions on the line $y=2019$.
824
+
825
+ Bob starts by deleting $(0,2019)$ and $(-1,2019)$. Once Anna completes her step, he deletes the next two available points on the left if Anna decreased her $x$-coordinate, the next two available points on the right if Anna increased her $x$-coordinate, and the next available point to the left and the next available point to the right if Anna did not change her $x$-coordinate. The only exception to the above rule is on the very first time Anna decreases $x$ by exactly 1 . In that step, Bob deletes the next available point to the left and the next available point to the right.
826
+
827
+ Bob's strategy guarantees the following: If Anna makes a sequence of steps reaching $(-x, y)$ with $x>0$ and the exact opposite sequence of moves in the horizontal direction reaching $(x, y)$ then Bob deletes at least as many points to the left of $(0,2019)$ in the first sequence than points to the right of $(0,2019)$ in the second sequence.
828
+
829
+ So we may assume for contradiction that Anna wins by placing her token at $(k, 2019)$ for some $k>0$.
830
+
831
+ Define $\Delta=3 m-(2 x+y)$ where $m$ is the total number of points deleted by Bob to the right of $(0,2019)$, and $(x, y)$ is the position of Anna's token.
832
+
833
+ For each sequence of steps performed first by Anna and then by Bob, $\Delta$ does not decrease. This can be seen by looking at the following table exhibiting the changes in $3 m$ and $2 x+y$. We have excluded the cases where $2 x+y<0$.
834
+
835
+ | Step | $(0,3)$ | $(1,2)$ | $(-1,2)$ | $(2,1)$ | $(0,1)$ | $(3,0)$ | $(1,0)$ | $(2,-1)$ | $(1,-2)$ |
836
+ | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
837
+ | $m$ | 1 | 2 | 0 (or 1$)$ | 2 | 1 | 2 | 2 | 2 | 2 |
838
+ | $3 m$ | 3 | 6 | 0 (or 3$)$ | 6 | 3 | 6 | 6 | 6 | 6 |
839
+ | $2 x+y$ | 3 | 4 | 0 | 5 | 1 | 6 | 2 | 3 | 0 |
840
+
841
+ The table also shows that if in this sequence of steps Anna changes $y$ by +1 or -2 then $\Delta$ is increased by 1 . Also, if Anna changes $y$ by +2 or -1 then the first time this happens $\Delta$ is increased by 2 . (This also holds if her move is $(0,-1)$ or $(-2,-1)$ which are not shown in the table.)
842
+
843
+ Since Anna wins by placing her token at $(k, 2019)$ we must have $m \leqslant k-1$ and $k \leqslant 2018$. So at that exact moment we have:
844
+
845
+ $$
846
+ \Delta=3 m-(2 k+2019)=k-2022 \leqslant-4 .
847
+ $$
848
+
849
+ So in her last turn she must have decreased $\Delta$ by at least 4 . So her last step must have been $(1,2)$ or $(2,1)$ which give a decrease of 4 and 5 respectively. (It could not be $(3,0)$ because then she must have already won. Also she could not have done just one or two moves in her last turn since this is not enough for the required decrease in $\Delta$.)
850
+
851
+ If her last step was $(1,2)$ then just before doing it we had $y=2017$ and $\Delta=0$. This means that in one of her steps the total change in $y$ was not $0 \bmod 3$. However in that case we have seen that $\Delta>0$, a contradiction.
852
+
853
+ If her last step was $(2,1)$ then just before doing it we had $y=2018$ and $\Delta=0$ or $\Delta=1$. So she must have made at least two steps with the change of $y$ being +1 or -2 or at least one step with the change of $y$ being +2 or -1 . In both cases, consulting the table, we get an increase of at least 2 in $\Delta$, a contradiction.
854
+
855
+ Note 1: If Anna is allowed to make at most three moves at each step, then she actually has a winning strategy.
856
+
857
+ Note 2: If 2019 is replaced by $N>1$ then Bob has a winning strategy if and only if $3 \mid N$.
858
+
859
+ C4. A town-planner has built an isolated city whose road network consists of 2 N roundabouts, each connecting exactly three roads. A series of tunnels and bridges ensure that all roads in the town meet only at roundabouts. All roads are two-way, and each roundabout is oriented clockwise.
860
+
861
+ Vlad has recently passed his driving test, and is nervous about roundabouts. He starts driving from his house, and always takes the first exit at each roundabout he encounters. It turns out his journey includes every road in the town in both directions before he arrives back at the starting point in the starting direction. For what values of $N$ is this possible?
862
+
863
+ Solution. $N$ odd. In fact, the number of trajectories has the same parity as $N$.
864
+ The setting is a (multi)graph where every vertex has degree three. Each vertex has an orientation, an ordering of its incident edges. We call Vlad's possible paths trajectories, and a complete trajectory if he traverses every edge in both directions. We may assume the multigraph is connected, as otherwise a complete trajectory is certainly not possible.
865
+
866
+ N odd (construction): There is an example when $N=1$, as shown in Figure 10.
867
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-37.jpg?height=548&width=671&top_left_y=2312&top_left_x=1774)
868
+
869
+ Figure 10: C4: $\quad N=1$
870
+
871
+ There are two 3-regular graphs on two vertices, the handcuffs and theta. The handcuffs fail since each self-loop has its own trajectory, but the theta does work for two of the four possible orientations.
872
+
873
+ We now construct examples for $N \geq 3$ odd by induction. Suppose we have a valid 3 -regular graph on $2(N-2)$ vertices, such that Vlad's trajectory is complete. This has at least two (undirected) edges, so pick two of them, $e$ and $e^{\prime}$. (It does not matter if they share incident vertices.) Split both $e$ and $e^{\prime}$ into three, by adding two new vertices to each, and connect as in Figure 11.
874
+
875
+ New vertices have degree three; other degrees are unchanged, so the graph is still 3regular. For each edge $e$ and $e^{\prime}$, pick a direction. (Both $u p$ in the figure.) These directed edges are part of the complete trajectory given by the induction hypothesis. Choose the orientations of the new vertices to preserve these two sections of the trajectory. The remaining two directed edges in the original graph will end up as partial trajectories in the new graph (see Figure 11).
876
+
877
+ However, because all the new partial trajectories start and finish at the same places and in the same directions in the original graph, and no other directed edges are changed, the trajectory remains complete. The result for $N$ odd follows by induction.
878
+ $\mathbf{N}$ even: Split each edge $e$ in the graph into two directed edges $\overleftarrow{e}$ and $\vec{e}$. Let $D$ be the set of the $6 N$ directed edges. Let $\alpha$ be the permutation of $D$ which exchanges $\overleftarrow{e}$
879
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-38.jpg?height=489&width=977&top_left_y=649&top_left_x=1627)
880
+
881
+ Figure 11: C4: Trajectories in the old and new graphs
882
+ and $\vec{e}$.
883
+ Now, for each roundabout $v$, let $\overleftarrow{e_{1}}, \overleftarrow{e_{2}}, \overleftarrow{e_{3}}$ be the three directed edges into $v$. The roundabout has a cyclic orientation, either $\left(\overleftarrow{e_{1}}, \overleftarrow{e_{2}}, \overleftarrow{e_{3}}\right)$ or $\left(\overleftarrow{e_{1}}, \overleftarrow{e_{3}}, \overleftarrow{e_{2}}\right)$. Let $\theta\left(\overleftarrow{e_{1}}\right)$ describe the directed edge after $\overleftarrow{e_{1}}$ in this orientation. By considering all roundabouts, $\theta$ is also a permutation of $D$.
884
+
885
+ Note that $\theta\left(\overleftarrow{e_{1}}\right)$ is directed towards $v$, so the directed edge after $\overleftarrow{e_{1}}$ in a trajectory is $\alpha\left(\theta\left(\overleftarrow{e_{1}}\right)\right)$. So Vlad makes a complete trajectory precisely if $\alpha \theta$ is a cyclic permutation of $D$. Note that the cycle type of $\theta$ is $(3,3, \ldots, 3)$, and the cycle type of $\alpha$ is $(2,2, \ldots, 2)$. So $\theta$ is always an even permutation, while $\alpha$ is an even permutation precisely when $N$ is even.
886
+
887
+ However, a cyclic permutation of $D$ is always odd, since $|D|=6 N$ is even. So there is certainly no complete trajectory when $N$ is even.
888
+
889
+ Alternative I: We claim that in a graph with $E$ edges, and $V$ vertices, the number of trajectories, $T$, has the same parity as $V+E$. We allow degenerate cases of this statement, for example graphs that are disconnected, or trajectories that consist of only a single vertex, so that the graph that consists of $V$ vertices and no edges has precisely $V$ trajectories, and thus satisfies the given claim. This shows that $N$ cannot be even.
890
+
891
+ We prove the claim by induction on $E$. Suppose we are given a graph with $E \geq 1$ edges and $T$ trajectories. Then consider any edge $e$, and its two directions $\vec{e}, \overleftarrow{e}$. Let $A$ be the sequence of directed edges starting from the one after $\vec{e}$ in its trajectory, ending at the edge before $\overleftarrow{e}$ or $\vec{e}$, whichever appears first. Similarly define $B$ starting after $\overleftarrow{e}$. $A$ and $B$ are disjoint, and may be empty.
892
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-38.jpg?height=430&width=841&top_left_y=3887&top_left_x=978)
893
+
894
+ Figure 12: C4: (a) Initial trajectories.
895
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-38.jpg?height=442&width=853&top_left_y=3893&top_left_x=2430)
896
+ (b) After removing $e$
897
+
898
+ We consider removing $e$, but otherwise keep the orientations at its incident vertices the same. Then if $\vec{e}, \overleftarrow{e}$ are in different trajectories, these are the concatenations ( $\vec{e}, A)$ and $(\overleftarrow{e}, B)$. After removing $e$, for each direction $\overleftarrow{e}, \vec{e}$, instead of proceeding onto this directed edge, the relevant trajectory moves to the other trajectory. In other words, the resulting trajectory is the concatenation $(A, B)$. So $T$ decreases by one.
899
+
900
+ Similarly, if both directions of $e$ are part of the same trajectory, this is the concatenation $(\vec{e}, A, \overleftarrow{e}, B)$. Then when we remove $e$, this splits into the two trajectories $(A)$ and $(B)$, by an essentially identical argument. So $T$ increases by one. Thus in both cases, removing one edge changes the parity of $T$, and so the claim follows by induction on $E$.
901
+
902
+ In the original setting we have $V=2 N, E=3 N$, so $T$ must have the same parity as $5 N$. Thus $T=1$ is impossible when $N$ is even.
903
+
904
+ Alternative II: An alternative is to induct on $N$, using the following stronger claim.
905
+ Claim: You can't have exactly one trajectory for $N$ even; nor exactly two trajectories for a connected graph with $N$ odd.
906
+
907
+ Proof of claim: We have to check that the claim is true for $N=1,2$. Checking $N=2$ requires a couple of case. Alternatively, one can argue that a single cyclic edge with no vertices (!) counts as the case $N=0$. Now use strong induction by contradiction. If $N$ is even, but has exactly one trajectory, then there are no self-loops, so pick any edge $e$, connecting vertices $v \neq w$. Remove $e$, then remove $v$, and connect $v$ 's other two incident edges (which are distinct from each other and $e$ ) to form a single edge. Do the same for $w$.
908
+ ![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-39.jpg?height=389&width=1183&top_left_y=2427&top_left_x=1536)
909
+
910
+ Figure 13: C4: Trajectories in the old and new graphs
911
+ The effect on the trajectories is shown in Figure 13. Note that the new graph is still 3-regular. We then argue as in Proof I that this operation splits the trajectory into two. So if the new graph is connected, this contradicts the hypothesis for $N-1$. Alternately, the new graph might consist of two components. Since it is 3 -regular, each component has an even number of vertices. The total number of vertices is $2(N-1)$, which is 2 modulo 4 , and so one of the components has a number of vertices which is a multiple of four, and a complete trajectory of this component, which also contradicts the induction hypothesis.
912
+
913
+ Now suppose $N$ is odd, but the original oriented graph has exactly two trajectories. If there is a self-loop at some vertex $v$, then one of the trajectories involves only this self-loop. So remove this vertex, and consider the other vertex $w$ connected to $v$. Remove $w$ and join up its other two incident edges. The resulting graph corresponds to $N$ even, and has a complete trajectory, which is a contradiction.
914
+
915
+ Otherwise, there are no self-loops, but the graph is connected hence there must be one edge $e$ connecting vertices $v \neq w$ which has one trajectory in one direction, and the other trajectory in the other direction. Collapse this edge as in Figure 13, and again by the same argument as in Proof I, this merges the two trajectories, giving a complete trajectory for $N$ even, and a contradiction.
916
+
917
+
918
+ [^0]: ${ }^{1}$ Proposed by PSC.
919
+
920
+ [^1]: ${ }^{2}$ Proposed by PSC.
921
+
922
+ [^2]: ${ }^{3}$ Proposed by PSC.
923
+
924
+ [^3]: ${ }^{4}$ Proposed by PSC.
925
+
926
+ [^4]: ${ }^{5}(X Y Z)$ denotes the circumcircle of $\triangle X Y Z$
927
+ ${ }^{6} \angle$ denotes a directed angle modulo $\pi$
928
+
929
+ [^5]: ${ }^{7}$ Proposed by PSC.
930
+
931
+ [^6]: ${ }^{8}$ Proposed by PSC.
932
+
Balkan_Shortlist/md/en-2021_bmo_shortlist.md ADDED
The diff for this file is too large to render. See raw diff
 
Balkan_Shortlist/raw/en-2016_bmo_shortlist.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93e67768071434e7c0b15b2f2da32bb3be0c673068a7a2884e04a34acb22cdec
3
+ size 627046
Balkan_Shortlist/raw/en-2017_bmo_shortlist.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:86850805c888c211101e14769e37a3ea33f1e702a115645b1cadae578d25efd9
3
+ size 6189122
Balkan_Shortlist/raw/en-2018_bmo_shortlist.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9897af3a0b66956a91db47b4c6b43cfe39ffddead2881b6d5e6c8e79dbdb1ee
3
+ size 806673
Balkan_Shortlist/raw/en-2019_bmo_shortlist.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1030b48634928d0f4f71b5a12e8c5e7b4863c92b85e7bcaa1528507aceec26c5
3
+ size 6400325
Balkan_Shortlist/raw/en-2021_bmo_shortlist.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c62a0bd097ba612ff71e04843609fef82157df116b4c77f4398d1a98a628436f
3
+ size 1181382
Balkan_Shortlist/segment_script/segment.py ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import re
3
+ import json
4
+ import enum
5
+
6
+ from tqdm import tqdm
7
+ from loguru import logger
8
+
9
+ from pathlib import Path
10
+ from typing import Tuple, List
11
+
12
+
13
+ project_root = Path(__file__).parent.parent.parent
14
+
15
+ problem_tag = 'Problem'
16
+ solution_tag = 'Solution'
17
+
18
+
19
+ def find_problem_with_solution(
20
+ text: str,
21
+ problem_parttern: re.Pattern,
22
+ solution_pattern: re.Pattern
23
+ ) -> int:
24
+ """
25
+ Find the problem with solution start position in the text.
26
+
27
+ Args:
28
+ text (str): The text to search.
29
+
30
+ Returns:
31
+ int: The start position of the problem with solution.
32
+ """
33
+ matchs = list(problem_parttern.finditer(text))
34
+
35
+ for index, match in enumerate(matchs):
36
+ section_end_position = matchs[index + 1].start() if index + 1 < len(matchs) else len(text)
37
+ if solution_pattern.search(text[match.start():section_end_position]):
38
+ return match.start()
39
+
40
+
41
+ def analyze(text: str) -> Tuple[List, int]:
42
+ """
43
+ Analyze the text and return the tags and problem number.
44
+
45
+ Args:
46
+ text (str): The markdown text to analyze.
47
+
48
+ Returns:
49
+ Tuple[List, int]: A tuple containing the tags and problem number.
50
+ """
51
+ problem_pattern = re.compile(r"(?:\n#+ |\n)((?:A|C|G|NT|TN|N)\d+[A-z]?)\.?(?:\s\$\{ \}\^\{\d+\}\$)?", re.IGNORECASE)
52
+ solution_pattern = re.compile(r"(?:\n#+ |\n)solution\.?", re.IGNORECASE)
53
+
54
+ start_position = find_problem_with_solution(text, problem_pattern, solution_pattern)
55
+
56
+ tags = []
57
+ tags.extend([(x, problem_tag) for x in problem_pattern.finditer(text, start_position)])
58
+ problem_num = len(tags)
59
+
60
+ tags.extend([(x, solution_tag) for x in solution_pattern.finditer(text, start_position)])
61
+ tags.sort(key=lambda x: x[0].start())
62
+ return tags, problem_num
63
+
64
+
65
+ def segment(text: str, tags):
66
+ starts = []
67
+ ends = []
68
+
69
+ for i in range(len(tags)):
70
+ starts.append(tags[i][0].end())
71
+ if i + 1 < len(tags):
72
+ ends.append(tags[i + 1][0].start())
73
+ else:
74
+ ends.append(len(text))
75
+
76
+ return [text[start:end].strip() for start, end in zip(starts, ends)]
77
+
78
+
79
+ def join(tags, segments):
80
+ problem, solution = '', ''
81
+ problem_label, problem_match, solution_match = '', '', ''
82
+ pairs = []
83
+
84
+ for tag, segment in zip(tags, segments):
85
+ if tag[1] == problem_tag:
86
+ problem = segment
87
+ problem_match = tag[0].group(0)
88
+ problem_label = tag[0].group(1)
89
+ else:
90
+ solution = segment
91
+ solution_match = tag[0].group(0)
92
+ pairs.append((problem, solution, problem_label, problem_match, solution_match))
93
+
94
+ return pairs
95
+
96
+
97
+ def write_pairs(output_file: Path, pairs):
98
+ year = re.search(r'(\d{4})', output_file.stem).group(1)
99
+
100
+ problem_type_mapping = {
101
+ "A": "Algebra",
102
+ "C": "Combinatorics",
103
+ "G": "Geometry",
104
+ "N": "Number Theory",
105
+ "T": "Number Theory"
106
+ }
107
+
108
+ output_jsonl_text = ""
109
+ for problem, solution, problem_label, problem_match, solution_match in pairs:
110
+ output_jsonl_text += json.dumps(
111
+ {
112
+ 'year': year,
113
+ 'tier': "T1",
114
+ 'problem_label': problem_label,
115
+ 'problem_type': problem_type_mapping[problem_label[0]],
116
+ 'problem': problem,
117
+ 'solution': solution,
118
+ 'metadata': {
119
+ 'resource_path': output_file.relative_to(project_root).as_posix(),
120
+ 'problem_match': problem_match,
121
+ 'solution_match': solution_match
122
+ }
123
+ },
124
+ ensure_ascii=False
125
+ ) + '\n'
126
+
127
+ output_file.write_text(output_jsonl_text, encoding="utf-8")
128
+
129
+
130
+ def main():
131
+ compet_base_path = Path(__file__).resolve().parent.parent
132
+ compet_md_path = compet_base_path / "md"
133
+ seg_output_path = compet_base_path / "segmented"
134
+
135
+ total_problem_count = 0
136
+ total_solution_count = 0
137
+
138
+ for balkan_s_md in tqdm(list(compet_md_path.glob('**/*.md')), desc='Segmenting'):
139
+ output_file = seg_output_path / balkan_s_md.relative_to(compet_md_path).with_suffix('.jsonl')
140
+ output_file.parent.mkdir(parents=True, exist_ok=True)
141
+
142
+ text = '\n' + balkan_s_md.read_text(encoding="utf-8")
143
+
144
+ tags, problem_num = analyze(text)
145
+
146
+ segments = segment(text, tags)
147
+ pairs = join(tags, segments)
148
+ if pairs and problem_num > 0:
149
+ write_pairs(output_file, pairs)
150
+
151
+ total_problem_count += problem_num
152
+ total_solution_count += len(pairs)
153
+ else:
154
+ logger.warning(f"No problem found in {balkan_s_md}")
155
+
156
+ logger.info(f"Total problem count: {total_problem_count}")
157
+ logger.info(f"Total solution count: {total_solution_count}")
158
+
159
+
160
+ if __name__ == '__main__':
161
+ main()
Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"year": "2016", "tier": "T1", "problem_label": "A1", "problem_type": "Algebra", "problem": "Let $a, b, c$ be positive real numbers. Prove that\n\n$$\n\\sqrt{a^{3} b+a^{3} c}+\\sqrt{b^{3} c+b^{3} a}+\\sqrt{c^{3} a+c^{3} b} \\geq \\frac{4}{3}(a b+b c+c a)\n$$", "solution": "W.L.O.G. $a \\geq b \\geq c$.\n\n$$\n\\begin{gathered}\na \\geq b \\geq c \\Rightarrow a b \\geq a c \\geq b c \\Rightarrow a b+a c \\geq a b+b c \\geq a c+b c \\Rightarrow \\sqrt{a b+a c} \\geq \\sqrt{b c+b a} \\geq \\sqrt{a c+b c} \\\\\n\\sqrt{a^{3} b+a^{3} c}+\\sqrt{b^{3} c+b^{3} a}+\\sqrt{c^{3} a+c^{3} b}=a \\sqrt{a b+a c}+b \\sqrt{b c+b a}+c \\sqrt{c a+c b} \\geq \\\\\n\\frac{(a+b+c)}{3}(\\sqrt{a b+a c}+\\sqrt{b c+b a}+\\sqrt{c a+c b})=\\frac{(a+b+c)}{3}(\\sqrt{a(b+c)}+\\sqrt{b(c+a)}+\\sqrt{c(a+b)}) \\geq \\\\\n\\frac{(a+b+c)}{3}\\left(\\frac{2 a(b+c)}{a+b+c}+\\frac{2 b(c+a)}{b+c+a}+\\frac{c(a+b)}{c+a+b}\\right)=\\frac{(a+b+c)}{3} \\frac{4(a b+b c+c a)}{a+b+c}=\\frac{4}{3}(a b+b c+c a)\n\\end{gathered}\n$$\n\n(1) Chebyshev's inequality\n(2) $\\mathrm{GM} \\geq \\mathrm{HM}$", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\nA1.", "solution_match": "\nSolution."}}
2
+ {"year": "2016", "tier": "T1", "problem_label": "A2", "problem_type": "Algebra", "problem": "For all $x, y, z>0$ satisfying $\\frac{x}{y z}+\\frac{y}{z x}+\\frac{z}{x y} \\leq x+y+z$, prove that\n\n$$\n\\frac{1}{x^{2}+y+z}+\\frac{1}{y^{2}+z+x}+\\frac{1}{z^{2}+x+y} \\leq 1\n$$", "solution": "By Cauchy-Schwarz inequality, we have\n\n$$\n\\left(x^{2}+y+z\\right)\\left(y^{2}+y z^{2}+z x^{2}\\right) \\geq(x y+y z+z x)^{2}\n$$\n\nand hence we obtain that\n\n$$\n\\frac{1}{x^{2}+y+z}+\\frac{1}{y^{2}+z+x}+\\frac{1}{z^{2}+x+y} \\leq \\frac{2\\left(x y^{2}+y z^{2}+z x^{2}\\right)+x^{2}+y^{2}+z^{2}}{(x y+y z+z x)^{2}}\n$$\n\nUsing the condition $\\frac{x}{y z}+\\frac{y}{z x}+\\frac{z}{x y} \\leq x+y+z$, we also have\n\n$$\nx^{2}+y^{2}+z^{2} \\leq x y z(x+y+z)\n$$\n\nand hence\n\n$$\n2\\left(x^{2}+y^{2}+z^{2}\\right)+x^{2} y^{2}+y^{2} z^{2}+z^{2} x^{2} \\leq(x y+y z+z x)^{2} .\n$$\n\nFinally, by AM-GM\n\n$$\nx^{2}+z^{2} x^{2} \\geq 2 z x^{2}\n$$\n\nwhich yields that\n\n$$\n2\\left(x^{2}+y^{2}+z^{2}\\right)+x^{2} y^{2}+y^{2} z^{2}+z^{2} x^{2} \\geq 2\\left(x y^{2}+y z^{2}+z x^{2}\\right)+x^{2}+y^{2}+z^{2}\n$$\n\nUsing (1), (2) and (3), we are done.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\nA2.", "solution_match": "\n## Solution."}}
3
+ {"year": "2016", "tier": "T1", "problem_label": "A3", "problem_type": "Algebra", "problem": "Find all monotonic functions $f: \\mathbb{R} \\rightarrow \\mathbb{R}$ satisfying the condition: for every real number $x$ and every natural number $n$\n\n$$\n\\left|\\sum_{i=1}^{n} i\\left(f(x+i+1)-f^{2}(x+i)\\right)\\right|<C\n$$\n\nwhere $C>0$ is independent of $x$ and $f^{2}(x)=f(f(x))$.", "solution": "From the condition of the problem we get $\\left|\\sum_{i=1}^{n-1} i\\left(f(x+i+1)-f^{2}(x+i)\\right)\\right|<C$. Then $\\left|n\\left(f(x+n+1)-f^{2}(x+n)\\right)\\right|=\\left|\\sum_{i=1}^{n} i\\left(f(x+i+1)-f^{2}(x+i)\\right)-\\sum_{i=1}^{n-1} i\\left(f(x+i+1)-f^{2}(x+i)\\right)\\right|<2 C$ implying $\\left|f(x+n+1)-f^{2}(x+n)\\right|<\\frac{2 C}{n}$ for every real number $x$ and every natural number $n$. Let $y \\in \\mathbb{R}$ be arbitrary. Then there exists $x$ such that $y=x+n$. We obtain $\\left|f(y+1)-f^{2}(y)\\right|<\\frac{2 C}{n}$ for every real number $y$ and every natural number $n$. The last inequality holds for every natural number $n$ from where $f(y+1)=f^{2}(y)$ for every $y \\in \\mathbb{R}$. The function $f$ is monotonic which implies that it is an injection and the latter implies $f(y)=y+1$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\n## A3.", "solution_match": "\nSolution."}}
4
+ {"year": "2016", "tier": "T1", "problem_label": "A4", "problem_type": "Algebra", "problem": "The positive real numbers $a, b, c$ satisfy the equality $a+b+c=1$. For every natural number $n$ find the minimal possible value of the expression\n\n$$\nE=\\frac{a^{-n}+b}{1-a}+\\frac{b^{-n}+c}{1-b}+\\frac{c^{-n}+a}{1-c}\n$$", "solution": "We transform the first term of the expression $E$ in the following way:\n\n$$\n\\begin{aligned}\n\\frac{a^{-n}+b}{1-a}=\\frac{1+a^{n} b}{a^{n}(b+c)}=\\frac{a^{n+1}+a^{n} b+1-a^{n+1}}{a^{n}(b+c)} & =\\frac{a^{n}(a+b)+(1-a)\\left(1+a+a^{2}+\\ldots+a^{n}\\right)}{a^{n}(b+c)} \\\\\n\\frac{a^{n}(a+b)}{a^{n}(b+c)}+\\frac{(b+c)\\left(1+a+a^{2}+\\ldots+a^{n}\\right)}{a^{n}(b+c)} & =\\frac{a+b}{b+c}+1+\\frac{1}{a}+\\frac{1}{a^{2}}+\\ldots+\\frac{1}{a^{n}}\n\\end{aligned}\n$$\n\nAnalogously, we obtain\n\n$$\n\\begin{aligned}\n& \\frac{b^{-n}+c}{1-b}=\\frac{b+c}{c+a}+1+\\frac{1}{b}+\\frac{1}{b^{2}}+\\ldots+\\frac{1}{b^{n}} \\\\\n& \\frac{c^{-n}+a}{1-c}=\\frac{c+a}{a+b}+1+\\frac{1}{c}+\\frac{1}{c^{2}}+\\ldots+\\frac{1}{c^{n}}\n\\end{aligned}\n$$\n\nThe expression $E$ can be written in the form\n\n$$\nE=\\frac{a+b}{b+c}+\\frac{b+c}{c+a}+\\frac{c+a}{a+b}+3+\\left(\\frac{1}{a}+\\frac{1}{b}+\\frac{1}{c}\\right)+\\left(\\frac{1}{a^{2}}+\\frac{1}{b^{2}}+\\frac{1}{c^{2}}\\right)+\\ldots+\\left(\\frac{1}{a^{n}}+\\frac{1}{b^{n}}+\\frac{1}{c^{n}}\\right)\n$$\n\nBy virtue of the inequalities $\\quad \\frac{a+b}{b+c}+\\frac{b+c}{c+a}+\\frac{c+a}{a+b} \\geq 3 \\sqrt{\\frac{a+b}{b+c} \\cdot \\frac{b+c}{c+a} \\cdot \\frac{c+a}{a+b}}=3$\nand $\\quad m_{k}=\\left(\\frac{a^{k}+b^{k}+c^{k}}{3}\\right)^{\\frac{1}{k}} \\leq m_{1}=\\frac{a+b+c}{3}=\\frac{1}{3}$ for every $k=-1,-2,-3, \\ldots,-n$, we have $\\quad \\frac{1}{a^{m}}+\\frac{1}{b^{m}}+\\frac{1}{c^{m}} \\geq 3^{m+1}$ for every $m=1,2, \\ldots, m$ and\n\n$$\nE=3+3+3^{2}+\\ldots+3^{n+1}=2+\\frac{3^{n+2}-1}{2}=\\frac{3^{n+2}+3}{3}\n$$\n\nFor $a=b=c=\\frac{1}{3}$ we obtain $E=\\frac{3^{n+2}+3}{3}$. So, $\\min E=\\frac{3^{n+2}+3}{3}$.\nRemark(PSC): The original solution received from the PSC contained some typos, the correct result is $\\min E=\\frac{3^{n+2}+3}{2}$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\n## A4.", "solution_match": "\nSolution."}}
5
+ {"year": "2016", "tier": "T1", "problem_label": "A5", "problem_type": "Algebra", "problem": "Let $a, b, c$ and $d$ be real numbers such that $a+b+c+d=2$ and $a b+b c+c d+d a+a c+b d=0$.\nFind the minimum value and the maximum value of the product $a b c d$.", "solution": "Let's find the minimum first.\n\n$$\na^{2}+b^{2}+c^{2}+d^{2}=(a+b+c+d)^{2}-2(a b+b c+c d+d a+a c+b d)=4\n$$\n\nBy AM-GM, $4=a^{2}+b^{2}+c^{2}+d^{2} \\geq 4 \\sqrt{|a b c d|} \\Rightarrow 1 \\geq|a b c d| \\Rightarrow a b c d \\geq-1$.\nNote that if $a=b=c=1$ and $d=-1$, then $a b c d=-1$.\nWe'll find the maximum. We search for $a b c d>0$.\nObviously, the numbers $a, b, c$ and $d$ can not be all positive or all negative.\nWLOG $a, b>0$ and $c, d<0$. Denote $-c=x,-d=y$.\nWe have $a, b, x, y>0, a+b-x-y=2$ and $a^{2}+b^{2}+x^{2}+y^{2}=4$. We need to find $\\max (a b x y)$. We get: $x+y=a+b-2$ and $x^{2}+y^{2}=4-\\left(a^{2}+b^{2}\\right)$. Since $(x+y)^{2} \\leq 2\\left(x^{2}+y^{2}\\right)$, then $2\\left(a^{2}+b^{2}\\right)+(a+b-2)^{2} \\leq 8 ;$ on the other hand, $(a+b)^{2} \\leq 2\\left(a^{2}+b^{2}\\right) \\Rightarrow(a+b)^{2}+(a+b-2)^{2} \\leq 8$.\nLet $a+b=2 s \\Rightarrow 2 s^{2}-2 s-1 \\leq 0 \\Rightarrow s \\leq \\frac{\\sqrt{3}+1}{2}=k$.\nBut $a b \\leq s^{2} \\Rightarrow a b \\leq k^{2}$.\nNow $a+b=x+y+2$ and $a^{2}+b^{2}=4-\\left(x^{2}+y^{2}\\right)$. Since $(a+b)^{2} \\leq 2\\left(a^{2}+b^{2}\\right)$, then $2\\left(x^{2}+y^{2}\\right)+(x+y+2)^{2} \\leq 8$; on the other hand, $(x+y)^{2} \\leq 2\\left(x^{2}+y^{2}\\right) \\Rightarrow$\n$\\Rightarrow(x+y)^{2}+(x+y+2)^{2} \\leq 8$. Let $x+y=2 q \\Rightarrow 2 q^{2}+2 q-1 \\leq 0 \\Rightarrow q \\leq \\frac{\\sqrt{3}-1}{2}=\\frac{1}{2 k}$.\nBut $x y \\leq q^{2} \\Rightarrow x y \\leq \\frac{1}{4 k^{2}}$.\nIn conclusion, $a b x y \\leq k^{2} \\cdot \\frac{1}{4 k^{2}}=\\frac{1}{4} \\Rightarrow a b c d \\leq \\frac{1}{4}$.\nNote that if $a=b=k$ and $c=d=-\\frac{1}{2 k}$, then $a b c d=\\frac{1}{4}$\nIn conclusion, $\\min (a b c d)=-1$ and $\\max (a b c d)=\\frac{1}{4}$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\n## A5.", "solution_match": "\nSolution."}}
6
+ {"year": "2016", "tier": "T1", "problem_label": "A6", "problem_type": "Algebra", "problem": "Prove that there is no function from positive real numbers to itself, $f:(0,+\\infty) \\rightarrow(0,+\\infty)$ such that:\n\n$$\nf(f(x)+y)=f(x)+3 x+y f(y) \\quad \\text {,for every } \\quad x, y \\in(0,+\\infty)\n$$", "solution": "First we prove that $f(x) \\geq x$ for all $x>0$.\nIndeed, if there is an $a>0$ with $f(a)<a$ then from the initial for $x=a$ and $y=a-f(a)>0$ we get that $3 a+(a-f(a)) f(a-f(a))=0$. This is absurd since $3 a+(a-f(a)) f(a-f(a))>0$.\nSo we have that\n\n$$\nf(x) \\geq x \\quad \\text {,for all } \\quad x>0\n$$\n\nThen using (1) we have that $f(x)+3 x+y f(x)=f(f(x)+y) \\geq f(x)+y$, so\n\n$$\n3 x+y f(y) \\geq y \\quad, \\text { all } \\quad x, y>0\n$$\n\nSuppose that $y f(y)<y$ for a $y>0$ and let $-y f(y)=b>0$ then for $x=\\frac{b}{4}$ we get $\\frac{3 b}{4}-b \\geq 0$ so $b \\leq 0$, absurd. So we have that $y f(y) \\geq y$, for all $y>0$, and so\n\n$$\nf(y) \\geq 1 \\quad \\text {,for all } \\quad y>0\n$$\n\nSubstituting $y$ with $f(y)$ at the initial we have that\n\n$$\nf(x)+3 x+f(y) f(f(y))=f(f(x)+f(y))\n$$\n\nand changing the roles of $x, y$ we have that:\n\n$$\nf(y)+3 y+f(x) f(f(x))=f(f(x)+f(x))\n$$\n\nSo we have $f(x) f(f(x))-f(x)-3 x=f(y) f(f(y))-f(y)-3 y$, which means that the function $f(x) f(f(x))-$ $f(x)-3 x$ is constant. That means that there exist a constant $c$ such that\n\n$$\nf(x) f(f(x))=f(x)+3 x+c \\quad \\text {,for all } \\quad x>0\n$$\n\nSo we can write (6) in the form $f(x)(f(f(x))-1)=3 x+c$ and since $f(f(x))>1$ we have that $3 x+c \\geq 0$, for all $x>0$. if $c<0$ then for $x=-\\frac{c}{4}>0$ we get that $c>0$ which is absurd. So $c \\geq 0$.\nWe write (6) in the form\n\n$$\nf(f(x))=1+\\frac{3 x}{f(x)}+\\frac{c}{f(x)}\n$$\n\nSince $c \\geq 0$ then from (7) with the help of (1) and (3) we have that $f(f(x)) \\leq 4+c$.\nBut from (1) we have that $f(f(x)) \\geq f(x) \\geq x$, for all $x \\geq 0$, and so\n\n$$\n4+c \\geq f(f(x)) \\geq x \\quad \\text {,for all } \\quad x>0\n$$\n\nTaking $x=5+c$ we get that the last one cannot hold. So there is no such a function.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\n## A6.", "solution_match": "\nSolution."}}
7
+ {"year": "2016", "tier": "T1", "problem_label": "A7", "problem_type": "Algebra", "problem": "Find all integers $n \\geq 2$ for which there exist the real numbers $a_{k}, 1 \\leq k \\leq n$, which are satisfying the following conditions:\n\n$$\n\\sum_{k=1}^{n} a_{k}=0, \\sum_{k=1}^{n} a_{k}^{2}=1 \\text { and } \\sqrt{n} \\cdot\\left(\\sum_{k=1}^{n} a_{k}^{3}\\right)=2(b \\sqrt{n}-1), \\text { where } b=\\max _{1 \\leq k \\leq n}\\left\\{a_{k}\\right\\}\n$$", "solution": "We have: $\\left(a_{k}+\\frac{1}{\\sqrt{n}}\\right)^{2}\\left(a_{k}-b\\right) \\leq 0 \\Rightarrow\\left(a_{k}^{2}+\\frac{2}{\\sqrt{n}} \\cdot a_{k}+\\frac{1}{n}\\right)\\left(a_{k}-b\\right) \\leq 0 \\Rightarrow$\n\n$$\na_{k}^{3} \\leq\\left(b-\\frac{2}{\\sqrt{n}}\\right) \\cdot a_{k}^{2}+\\left(\\frac{2 b}{\\sqrt{n}}-\\frac{1}{n}\\right) \\cdot a_{k}+\\frac{b}{n} \\forall \\in\\{1,2, \\cdot, n\\} \\cdot(k)\n$$\n\nAdding up the inequalities ( $k$ ) we get\n\n$$\n\\begin{gathered}\n\\sum_{k=1}^{n} a_{k}^{3} \\leq\\left(b-\\frac{2}{\\sqrt{n}}\\right) \\cdot\\left(\\sum_{k=1}^{n} a_{k}^{2}\\right)+\\left(\\frac{2 b}{\\sqrt{n}}-\\frac{1}{n}\\right) \\cdot\\left(\\sum_{k=1}^{n} a_{k}\\right)+b \\leftrightarrow \\\\\n\\sum_{k=1}^{n} a_{k}^{3} \\leq b-\\frac{2}{\\sqrt{n}}+b \\leftrightarrow \\sqrt{n} \\cdot\\left(\\sum_{k=1}^{n} a_{k}^{3}\\right) \\leq 2(b \\sqrt{n}-1) .\n\\end{gathered}\n$$\n\nBut according to hypothesis,\n\n$$\n\\sqrt{n} \\cdot\\left(\\sum_{k=1}^{n} a_{k}^{3}\\right)=2(b \\sqrt{n}-1) .\n$$\n\nHence is necessarily that\n\n$$\n\\begin{gathered}\na_{k}^{3}=\\left(b-\\frac{2}{\\sqrt{n}}\\right) \\cdot a_{k}^{2}+\\left(\\frac{2 b}{\\sqrt{n}}-\\frac{1}{n}\\right) \\cdot a_{k}+\\frac{b}{n} \\forall k \\in\\{1,2, \\cdots, n\\} \\leftrightarrow \\\\\n\\left(a_{k}+\\frac{1}{\\sqrt{n}}\\right)^{2}\\left(a_{k}-b\\right)=0 \\forall k \\in\\{1,2, \\cdots, n\\} \\leftrightarrow a_{k} \\in\\left\\{-\\frac{1}{\\sqrt{n}}, b\\right\\} \\forall k \\in\\{1,2, \\cdots, n\\}\n\\end{gathered}\n$$\n\nWe'll prove that $b>0$. Indeed, if $b<0$ then $0=\\sum_{k=1}^{n} a_{k} \\leq n b<0$, which is absurd. If $b=0$, since $\\sum_{k=1}^{n} a_{k}=0$, then $a_{k}=0 \\forall k \\in\\{1,2, \\cdots, n\\} \\Rightarrow 1=\\sum_{k=1}^{n} a_{k}^{2}=0$, which is absurd.\nIn conclusion $b>0$.\nIf $a_{k}=-\\frac{1}{\\sqrt{n}} \\forall k \\in\\{1,2, \\cdots, n\\}$ then $\\sum_{k=1}^{n} a_{k}=-\\sqrt{n}<0$, which is absurd and similarly if\n$a_{k}=b \\forall k \\in\\{1,2, \\cdots, n\\}$ then $\\sum_{k=1}^{n} a_{k}=n b>0$, which is absurd. Hence $\\exists m \\in\\{1,2, \\cdots, n-1\\}$\nsuch that among the numbers $a_{k}$ we have $n-m$ equal to $-\\frac{1}{\\sqrt{n}}$ and $m$ equal to $b$. We get $\\left\\{\\begin{array}{l}-\\frac{n-m}{\\sqrt{n}}+m b=0 \\\\ \\frac{n-m}{n}+m b^{2}=1\\end{array}\\right.$.\nFrom here, $b=\\frac{n-m}{m \\sqrt{n}} \\Rightarrow \\frac{n-m}{n}+\\frac{(n-m)^{2}}{m n}=1 \\Rightarrow$\n$\\Rightarrow n-m=m \\Rightarrow m=\\frac{n}{2}$. Hence $n$ is even.\nConversely, for any even integer $n \\geq 2$ we get that there exist the real numbers $a_{k}, 1 \\leq k \\leq n$, such that\n\n$$\n\\sum_{k=1}^{n} a_{k}=0, \\sum_{k=1}^{n} a_{k}^{2}=1 \\text { and } \\sqrt{n} \\cdot\\left(\\sum_{k=1}^{n} a_{k}^{3}\\right)=2(b \\sqrt{n}-1), \\text { where } b=\\max _{1 \\leq k \\leq n}\\left\\{a_{k}\\right\\}\n$$\n\n(We may choose for example $a_{1}=\\cdots=a_{\\frac{n}{2}}=-\\frac{1}{\\sqrt{n}}$ and $a_{\\frac{n}{2}+1}=\\cdots=a_{n}=\\frac{1}{\\sqrt{n}}$ ).", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\nA7.", "solution_match": "\nSolution."}}
8
+ {"year": "2016", "tier": "T1", "problem_label": "A8", "problem_type": "Algebra", "problem": "Find all functions $f: \\mathbb{Z} \\rightarrow \\mathbb{Z}$ for which $f(g(n))-g(f(n))$ is independent on $n$ for any $g: \\mathbb{Z} \\rightarrow \\mathbb{Z}$.", "solution": "First observe that if $f(n)=n$, then $f(g(n))-g(f(n))=0$. Therefore the identity function satisfies the problem condition.\n\nIf there is $n_{0}$ with $f\\left(n_{0}\\right) \\neq n_{0}$, consider the characteristic function $g$ that is defined as $g\\left(f\\left(n_{0}\\right)\\right)=1$ and $g(n)=0$ for $n \\neq f\\left(n_{0}\\right)$. In this case, let $n \\neq f\\left(n_{0}\\right)$ be arbirtrary. One has $f(g(n))-g(f(n))=$ $f\\left(g\\left(n_{0}\\right)\\right)-g\\left(f\\left(n_{0}\\right)\\right) \\Rightarrow f(0)-g(f(n))=f(0)-g\\left(f\\left(n_{0}\\right)\\right) \\Rightarrow g(f(n))=1 \\Rightarrow f(n)=f\\left(n_{0}\\right)$.\n\nNow, consider the very similar function $g$ that is defined as $g\\left(f\\left(n_{0}\\right)\\right)=a$ and $g(n)=b$ for $n \\neq f\\left(n_{0}\\right)$, where $a, b$ are integers with $a \\neq b \\neq f\\left(n_{0}\\right)$. We have chosen $a, b$ so as to ensure that $f(a)=f\\left(n_{0}\\right)=f(b)$. Now, we find that $f\\left(g\\left(f\\left(n_{0}\\right)\\right)\\right)-g\\left(f\\left(f\\left(n_{0}\\right)\\right)\\right)=f\\left(g\\left(n_{0}\\right)\\right)-g\\left(f\\left(n_{0}\\right)\\right) \\Rightarrow f(a)-g\\left(f\\left(f\\left(n_{0}\\right)\\right)\\right)=f(b)-$ $g\\left(f\\left(n_{0}\\right)\\right) \\Rightarrow g\\left(f\\left(f\\left(n_{0}\\right)\\right)\\right)=g\\left(f\\left(n_{0}\\right)\\right)=a \\Rightarrow f\\left(f\\left(n_{0}\\right)\\right)=f\\left(n_{0}\\right)$.\n\nIn summary, $f(n)=f\\left(n_{0}\\right)$ for any $n \\neq f\\left(n_{0}\\right)$ and $f\\left(f\\left(n_{0}\\right)\\right)=f\\left(n_{0}\\right)$. Therefore $f$ is a constant function. Let us now see that a constant function indeed satisfies the problem condition: If $f(n)=c$ for all $n, f(g(n))-g(f(n))=c-g(c)$ is independent of $n$.\n\nThe answers are the identity function $f(n)=n$ and the constant functions $f(n)=c$.\n\n## Combinatorics", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\n## A8.", "solution_match": "\nSolution."}}
9
+ {"year": "2016", "tier": "T1", "problem_label": "C1", "problem_type": "Combinatorics", "problem": "Let positive integers $K$ and $d$ be given. Prove that there exists a positive integer $n$ and a sequence of $K$ positive integers $b_{1}, b_{2}, \\ldots, b_{K}$ such that the number $n$ is a $d$-digit palindrome in all number bases $b_{1}, b_{2}, \\ldots, b_{K}$.", "solution": "Let a positive integer $d$ be given. We shall prove that, for each large enough $n$, the number $(n!)^{d-1}$ is a $d$-digit palindrome in all number bases $\\frac{n!}{i}-1$ for $1 \\leqslant i \\leqslant n$. In particular, we shall prove that the digit expansion of $(n!)^{d-1}$ in the base $\\frac{n!}{i}-1$ is\n\n$$\n\\left\\langle i^{d-1}\\binom{d-1}{d-1}, i^{d-1}\\binom{d-1}{d-2}, i^{d-1}\\binom{d-1}{d-3}, \\ldots, i^{d-1}\\binom{d-1}{1}, i^{d-1}\\binom{d-1}{0}\\right\\rangle_{\\frac{n!}{i}-1}\n$$\n\nWe first show that, for each large enough $n$, all these digits are smaller than the considered base, that is, they are indeed digits in that base. It is enough to check this assertion for $i=n$, that is, to show the inequality $n^{d-1}\\binom{d-1}{j}<(n-1)$ ! -1 . However, since for a fixed $d$ the right-hand side clearly grows faster than the left-hand side, this is indeed true for all large enough $n$.\n\nEverything that is left is to evaluate:\n\n$$\n\\begin{aligned}\n\\sum_{j=0}^{d-1} i^{d-1}\\binom{d-1}{j}\\left(\\frac{n!}{i}-1\\right)^{j} & =i^{d-1} \\sum_{j=0}^{d-1}\\binom{d-1}{j}\\left(\\frac{n!}{i}-1\\right)^{j}=i^{d-1} \\sum_{j=0}^{d-1}\\binom{d-1}{j}\\left(\\frac{n!}{i}-1\\right)^{j} \\\\\n& =i^{d-1}\\left(\\frac{n!}{i}-1+1\\right)^{d-1}=(n!)^{d-1}\n\\end{aligned}\n$$\n\nwhich completes the proof.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\n## C1.", "solution_match": "\nSolution."}}
10
+ {"year": "2016", "tier": "T1", "problem_label": "C2", "problem_type": "Combinatorics", "problem": "There are 2016 costumers who entered a shop on a particular day. Every customer entered the shop exactly once. (i.e. the customer entered the shop, stayed there for some time and then left the shop without returning back.)\nFind the maximal $k$ such that the following holds:\nThere are $k$ customers such that either all of them were in the shop at a specific time instance or no two of them were both in the shop at any time instance.", "solution": "We show that the maximal $k$ is 45 .\nFirst we show that no larger $k$ can be achieved: We break the day at 45 disjoint time intervals and assume that at each time interval there were exactly 45 costumers who stayed in the shop only during that time interval (except in the last interval in which there were only 36 customers). We observe that there are no 46 people with the required property.\nNow we show that $k=45$ can be achieved: Suppose that customers $C_{1}, C_{2}, \\ldots, C_{2016}$ visited the shop in this order. (If two or more customers entered the shop at exactly the same time then we break ties arbitrarily.)\nWe define groups $A_{1}, A_{2}, \\ldots$ of customers as follows: Starting with $C_{1}$ and proceeding in order, we place customer $C_{j}$ into the group $A_{i}$ where $i$ is the smallest index such that $A_{i}$ contains no customer $C_{j^{\\prime}}$ with $j^{\\prime}<j$ and such that $C_{j^{\\prime}}$ was inside the shop once $C_{j}$ entered it.\nClearly no two customers who are in the same group were inside the shop at the exact same time. So we may assume that every $A_{i}$ has at most 45 customers. Since $44 \\cdot 45<2016$, by the pigeonhole principle there must be at least 45 (non-empty) groups.\nLet $C_{j}$ be a person in group $A_{45}$ and suppose that $C_{j}$ entered the shop at time $t_{j}$. Since we placed $C_{j}$ in group $A_{45}$ this means that for each $i<45$, there is a $j_{i}<j$ such that $C_{j_{i}} \\in A_{i}$ and $C_{j_{i}}$ is still inside the shop at time $t_{j}$.\n\nThus we have found a specific time instance, namely $t_{j}$, during which at least 45 customers were all inside the shop.\nNote: Instead of asking for the maximal $k$, an easier version is the following:\nShow that there are 45 customers such that either all of them were in the shop at a specific time instance or no two of them were both in the shop at any time instance.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\n## C2.", "solution_match": "\nSolution."}}
11
+ {"year": "2016", "tier": "T1", "problem_label": "C3", "problem_type": "Combinatorics", "problem": "The plane is divided into unit squares by means of two sets of parallel lines. The unit squares are coloured in 1201 colours so that no rectangle of perimeter 100 contains two squares of the same colour. Show that no rectangle of size $1 \\times 1201$ contains two squares of the same colour.", "solution": "Let the centers of the unit squares be the integer points in the plane, and denote each unit square by the coordinates of its center.\n\nConsider the set $D$ of all unit squares $(x, y)$ such that $|x|+|y| \\leq 24$. Any translate of $D$ is called a diamond.\n\nSince any two unit squares that belong to the same diamond also belong to some rectangle of perimeter 100, a diamond cannot contain two unit squares of the same colour. Since a diamond contains exactly $24^{2}+25^{2}=1201$ unit squares, a diamond must contain every colour exactly once.\nChoose one colour, say, green, and let $a_{1}, a_{2}, \\ldots$ be all green unit squares. Let $P_{i}$ be the diamond of center $a_{i}$. We will show that no unit square is covered by two $P$ 's and that every unit square is covered by some $P_{i}$.\n\nIndeed, suppose first that $P_{i}$ and $P_{j}$ contain the same unit square $b$. Then their centers lie within the same rectangle of perimeter 100, a contradiction.\n\nLet, on the other hand, $b$ be an arbitrary unit square. The diamond of center $b$ must contain some green unit square $a_{i}$. The diamond $P_{i}$ of center $a_{i}$ will then contain $b$.\n\nTherefore, $P_{1}, P_{2}, \\ldots$ form a covering of the plane in exactly one layer. It is easy to see, though, that, up to translation and reflection, there exists a unique such covering. (Indeed, consider two neighbouring diamonds. Unless they fit neatly, uncoverable spaces of two unit squares are created near the corners: see Fig. 1.)\n![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-15.jpg?height=681&width=551&top_left_y=1508&top_left_x=787)\n\nFigure 1:\nWithout loss of generality, then, this covering is given by the diamonds of centers $(x, y)$ such that $24 x+25 y$ is divisible by 1201. (See Fig. 2 for an analogous covering with smaller diamonds.) It follows from this that no rectangle of size $1 \\times 1201$ can contain two green unit squares, and analogous reasoning works for the remaining colours.\n![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-16.jpg?height=752&width=991&top_left_y=182&top_left_x=567)\n\nFigure 2:\n\nRemark(PSC): The number of the unit squares in a diamond can be evaluated alternatively with the formula\n\n$$\n2 \\times(1+3+5+\\ldots+47)+49=2 \\times 24^{2}+49=1201\n$$\n\n## Geometry", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\n## C3.", "solution_match": "\nSolution."}}
12
+ {"year": "2016", "tier": "T1", "problem_label": "G1", "problem_type": "Geometry", "problem": "The point $M$ lies on the side $A B$ of the circumscribed quadrilateral $A B C D$. The points $I_{1}, I_{2}$, and $I_{3}$ are the incenters of $\\triangle M B C, \\triangle M C D$, and $\\triangle M D A$. Show that the points $M, I_{1}, I_{2}$, and $I_{3}$ lie on a circle.\n![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-17.jpg?height=643&width=874&top_left_y=508&top_left_x=620)", "solution": "Lemma. Let $I$ be the incenter of $\\triangle A B C$ and let the points $P$ and $Q$ lie on the lines $A B$ and $A C$. Then the points $A, I, P$, and $Q$ lie on a circle if and only if\n\n$$\n\\overline{B P}+\\overline{C Q}=B C\n$$\n\nwhere $\\overline{B P}$ equals $|B P|$ if $P$ lies in the ray $B A \\rightarrow$ and $-|B P|$ if it does not, and similarly for $\\overline{C Q}$.\nProof of the lemma. We shall only consider the case when $P$ and $Q$ lie in the segments $A B$ and $A C$. All other cases are treated analogously.\n![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-17.jpg?height=789&width=887&top_left_y=1519&top_left_x=619)\n\nSuppose that $A, I, P$, and $Q$ lie on a circle. Let $D$ and $E$ be the contact points of the incircle of $\\triangle A B C$ with $A B$ and $A C$. We have that $\\angle P I Q=180^{\\circ}-\\alpha$, so $\\angle D I P=\\angle E I Q$ and, therefore, $\\triangle D I P \\simeq \\triangle E I Q$. This gives us $D P=E Q$ and $B P+C Q=B D+C E=B C$, as needed.\n\nThe converse is established by following the foregoing chain of inequalities in reverse.\n\nLet the circumcircle of $\\triangle M I_{1} I_{3}$ meet the lines $A B, C M$, and $D M$ for the second time at $P, Q$, and $R$. By the lemma, $\\overline{B P}+\\overline{C Q}=B C$ and $\\overline{D R}+\\overline{A P}=D A$. Therefore, $\\overline{C Q}+\\overline{D R}=B C+D A-\\overline{B P}-\\overline{A P}=$ $B C+D A-A B$. Since $A B C D$ is circumscribed, this is equal to $C D$, and, by the lemma, the proof is complete.\n![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-18.jpg?height=475&width=874&top_left_y=413&top_left_x=623)\n\nSecond solution. Let $\\omega_{1}, \\omega_{2}$, and $\\omega_{3}$ be the incircles of $\\triangle M B C, \\triangle M C D$, and $\\triangle M D A$.\nThe common internal tangent $t_{1}$ of $\\omega_{1}$ and $\\omega_{2}$ equals\n$\\left[\\right.$ tangent from $M$ to $\\left.\\omega_{2}\\right]-\\left[\\right.$ tangent from $M$ to $\\left.\\omega_{1}\\right]=\\frac{1}{2}(M C+M D-C D-M B-M C+B C)$.\nAnalogously, the common internal tangent $t_{2}$ of $\\omega_{2}$ and $\\omega_{3}$ equals\n$\\left[\\right.$ tangent from $M$ to $\\left.\\omega_{2}\\right]-\\left[\\right.$ tangent from $M$ to $\\left.\\omega_{3}\\right]=\\frac{1}{2}(M C+M D-C D-M D-M A+D A)$.\nFinally, the common external tangent $t_{3}$ of $\\omega_{1}$ and $\\omega_{3}$ equals\n$\\left[\\right.$ tangent from $M$ to $\\left.\\omega_{1}\\right]-\\left[\\right.$ tangent from $M$ to $\\left.\\omega_{3}\\right]=\\frac{1}{2}(M B+M C-B C+M D+M A-D A)$.\nSince $A B C D$ is circumscribed, we have $A B+C D=B C+D A$, and, therefore, $t_{1}+t_{2}=t_{3}$. It follows from this that $\\omega_{1}, \\omega_{2}$, and $\\omega_{3}$ have a common tangent $s$ (which separates $\\omega_{2}$ from $\\omega_{1}$ and $\\omega_{3}$ ).\n![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-18.jpg?height=651&width=876&top_left_y=1409&top_left_x=622)\n\nLet $\\triangle M K L$ be the triangle formed by the lines $M C, M D$, and $s$. Then, since $I_{1} I_{2}$ and $I_{2} I_{3}$ are external angle bisectors in it, we have $\\angle I_{1} I_{2} I_{3}=90^{\\circ}-\\frac{1}{2} \\angle K M L=180^{\\circ}-\\angle I_{1} M I_{3}$ and, therefore, $M I_{1} I_{2} I_{3}$ is cyclic.\n$\\operatorname{Remark}(\\mathbf{P S C}):$ In the first solution, the angle $\\alpha$ refers to the angle $\\angle B A C$.\n$\\operatorname{Remark}(\\mathbf{P S C})$ : Referring to solution 1 , the inequality $t_{3} \\leq t_{1}+t_{2}$ holds, the equality is possible if and only if the circles $\\omega_{1}, \\omega_{2}$, and $\\omega_{3}$ have a common tangent.\n\nRemark(PSC): This problem was selected as G1 relative to the other Geometry problems proposed. PSC thinks the difficulty level of this problem is medium.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\n## G1.", "solution_match": "\nSolution."}}
13
+ {"year": "2016", "tier": "T1", "problem_label": "G2", "problem_type": "Geometry", "problem": "Let $A B C D$ be a cyclic quadrilateral, with $A B<C D$, whose diagonals intersect at the point $F$ and $A D, B C$ intersect at the point $E$. Let also $K, L$ be the projections of $F$ onto the sides $A D, B C$ respectively, and $M, S, T$ be the midpoints of $E F, C F, D F$. Prove that the second intersection point of the circumcircles of the triangles $M K T, M L S$ lies on the side $C D$.", "solution": "Let $N$ be the midpoint of $C D$. We will prove that the circumcircles of the triangles $M K T, M L S$ pass through $N$.\nWe will prove first that the circumcircle of $M L S$ passes through $N$.\nLet $Q$ be the midpoint of $E C$. Note that the circumcircle of $M L S$ is the Euler circle of the triangle $E F C$, so it passes also through $Q .\\left(^{*}\\right)$\n![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-19.jpg?height=1001&width=1007&top_left_y=779&top_left_x=559)\n\nWe will prove that\n\n$$\n\\angle S L Q=\\angle Q N S\n$$\n\nIndeed, since $F L C$ is right-angled and $L S$ is its median, we have that $S L=S C$ and\n\n$$\n\\angle S L C=\\angle S C L=\\angle A B C\n$$\n\nIn addition, since $N, S$ are the midpoints of $D C, F C$ we have that $S N / / F D$.\nAnd finally, $Q, S$ are the midpoints of $E C, C D$, so $Q N / / E D$.\nIt follows that the angles $\\angle E D B$ and $\\angle Q N S$ have parallel sides, and since $A B<C D$, they are acute, and as a result we have that\n\n$$\n\\angle E D B=\\angle Q N S\n$$\n\nBut, from the cyclic quadrilateral $A B C D$, we get that\n\n$$\n\\angle E D B=\\angle A C B\n$$\n\nNow, from (2),(3) and (4) we obtain immediately (1), so $\\angle S L Q=\\angle Q N S$ and the quadrilateral $L N S Q$ is cyclic. Since from $\\left(^{*}\\right)$ this circle passes also through $M$, we get that the points $M, L, Q, S, N$ are co-cylic and this means that the circumcircle of $M L S$ passes through $N$.\n\nSimilarly, that the circumcircle of $M K T$ passes also through $N$ and we have the desired.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\nG2.", "solution_match": "\nSolution."}}
14
+ {"year": "2016", "tier": "T1", "problem_label": "G3", "problem_type": "Geometry", "problem": "Given that $A B C$ is a triangle where $A B<A C$. On the half-lines $B A$ and $C A$ we take points $F$ and $E$ respectively such that $B F=C E=B C$. Let $M, N$ and $H$ be the mid-points of the segments $B F, C E$ and $B C$ respectively and $K$ and $O$ be the circumcircles of the triangles $A B C$ and $M N H$ respectively. We assume that $O K$ cuts $B E$ and $H N$ at the points $A_{1}$ and $B_{1}$ respectively and that $C_{1}$ is the point of intersection of $H N$ and $F E$. If the parallel line from $A_{1}$ to $O C_{1}$ cuts the line $F E$ at $D$ and the perpendicular from $A_{1}$ to the line $D B_{1}$ cuts $F E$ at the point $M_{1}$, prove that $E$ is the orthocenter of the triangle $A_{1} O M_{1}$.", "solution": "The circumcenter of the triangle $\\triangle M N H$ coincides with the incentre of the triangle $\\triangle A B C$ because the triangles $\\triangle B M H$ and $\\triangle N H C$ are isosceles and therefore the perpendiculars of the $M H, H N$ are also the bisectors of the angles $\\angle A B C, \\angle A C B$, respectively.\n![](https://cdn.mathpix.com/cropped/2024_12_07_3d678d9c5978e897674eg-21.jpg?height=976&width=849&top_left_y=775&top_left_x=611)\n\nLet $G, I$ be the points of tangents of the incircle $(O, r)$ of the triangle $\\triangle A B C$ with the sides $A B$ and $A C$ respectively. Now if $a, b, c$ are the sides of the triangle $\\triangle A B C$ and $s$ the semiperimeter of the triangle , we have\n\n$$\nO F^{2}=O G^{2}+F G^{2}=r^{2}+(a-s+b)^{2}\n$$\n\nand\n\n$$\nO E^{2}=O I^{2}+E I^{2}=r^{2}+(a-s+c)^{2}\n$$\n\nThen\n\n$$\nO F^{2}-O E^{2}=\\alpha(b-c)\n$$\n\nApplying two times the theorem of Stewarts at the triangles $\\triangle K F B$ and $\\triangle K A C$ we get\n\n$$\nF A \\cdot K A^{2}+c \\cdot K F^{2}=a \\cdot K A^{2}+a c \\cdot F A \\quad \\text { or } \\quad K F^{2}=K A^{2}+a(a-c)\n$$\n\nand\n\n$$\nE A \\cdot K E^{2}+\\alpha \\cdot K A^{2}=b \\cdot K E^{2}+a b \\cdot E A \\quad \\text { or } \\quad K E^{2}=K A^{2}+a(b-a)\n$$\n\nFrom (2) and (3) we have\n\n$$\nK F^{2}-K E^{2}=a(a-c)-a(b-a)=\\alpha(b-c)\n$$\n\nFrom (1),(4), because $O F^{2}-O E^{2}=K F^{2}-K E^{2}$ we have that $F E \\perp O K$.\n\nLet $J$ the point of intersection of $F E, O K$.\nBecause $A_{1} D / / O C_{1}$ we have\n\n$$\n\\frac{J O}{J A_{1}}=\\frac{J C_{1}}{J D}\n$$\n\nAnd since $A_{1} E / / H N$ we get\n\n$$\n\\frac{J E}{J A_{1}}=\\frac{J C_{1}}{J B_{1}}\n$$\n\nTherefore, we have\n\n$$\n\\frac{J O}{J E}=\\frac{J B_{1}}{J D}\n$$\n\nThus, from the inverse of Thales theorem we have that $E O / / D B_{1}$, So\n\n$$\nA M_{1} \\perp E O\n$$\n\nConsequently, the point $E$ is the orthocenter of the triangle $\\triangle A_{1} O M_{1}$\nRemark(PSC): Here in the solution the side $B C$ has been referred as $\\alpha$ and $a$, which are equivalent.\n\n## Number theory", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\nG3.", "solution_match": "\nSolution."}}
15
+ {"year": "2016", "tier": "T1", "problem_label": "N1", "problem_type": "Number Theory", "problem": "Find all natural numbers $n$ for which $1^{\\phi(n)}+2^{\\phi(n)}+\\ldots+n^{\\phi(n)}$ is coprime with $n$.", "solution": "Consider the given expression $(\\bmod p)$ where $p \\mid n$ is a prime number. $p|n \\Rightarrow p-1| \\phi(n)$, thus for any $k$ that is not divisible by $p$, one has $k^{\\phi(n)} \\equiv 1(\\bmod p)$. There are $n-\\frac{n}{p}$ numbers among $1,2, \\ldots, n$ that are not divisible by $p$. Therefore\n\n$$\n1^{\\phi(n)}+2^{\\phi(n)}+\\ldots+n^{\\phi(n)} \\equiv-\\frac{n}{p} \\quad(\\bmod p)\n$$\n\nIf the given expression is coprime with $n$, it is not divisible by $p$, so $p \\nmid \\frac{n}{p} \\Rightarrow p^{2} X n$. This is valid for all prime divisors $p$ of $n$, thus $n$ must be square-free. On the other hand, if $n$ is square-free, one has $p^{2} \\nmid n \\Rightarrow p \\nmid \\frac{n}{p}$, hence the given expression is not divisible by $p$. Since this is valid for all prime divisors $p$ of $n$, the given two numbers are indeed coprime.\n\nThe answer is square-free integers.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\nN1.", "solution_match": "\nSolution."}}
16
+ {"year": "2016", "tier": "T1", "problem_label": "N2", "problem_type": "Number Theory", "problem": "Find all odd natural numbers $n$ such that $d(n)$ is the largest divisor of the number $n$ different from $n$ $(d(n)$ is the number of divisors of the number $n$ including 1 and $n$ ).", "solution": "From $d(n)\\left|n, \\frac{n}{d(n)}\\right| n$ one obtains $\\frac{n}{d(n)} \\leq d(n)$.\nLet $n=p_{1}^{\\alpha_{1}} p_{2}^{\\alpha_{2}} \\ldots p_{s}^{\\alpha_{s}}$ where $p_{i}, 1 \\leq i \\leq s$ are prime numbers. The number $n$ is odd from where we get $p_{i}>2,1 \\leq i \\leq s$. The multiplicativity of the function $d(n)$ implies $d(n)=\\left(1+\\alpha_{1}\\right) \\ldots\\left(1+\\alpha_{s}\\right)$.\nFrom Bernoulli inequality, for every $p_{i}>3$ from the factorization of $n$, one obtain\n\n$$\np_{i}^{\\frac{\\alpha_{i}}{2}}=\\left(1+\\left(p_{i}-1\\right)\\right)^{\\frac{\\alpha_{i}}{2}} \\geq 1+\\frac{\\alpha_{i}}{2}\\left(p_{i}-1\\right)>1+\\alpha_{i} \\quad \\text { and } \\quad 3^{\\frac{\\beta}{2}} \\geq 1+\\beta\n$$\n\nThe equality holds when $\\beta=0, \\beta=2$, and strict inequality for $\\beta>2$. If $\\beta=1$ and there is no prime number in the factorization of $n$, then $n=3, d(n)=2$, which is not a solution of the problem. If $\\beta=1$ and there exist another prime in the factorization of $n$, then $n=3 p_{2}^{\\alpha_{2}} \\ldots p_{s}^{\\alpha_{s}}>4\\left(1+\\alpha_{2}\\right)^{2} \\ldots\\left(1+\\alpha_{s}\\right)^{2}$. Indeed, if there is $p_{i} \\geq 7$ in the factorization, then $3 p_{i}^{\\alpha_{i}}>4\\left(1+\\alpha_{i}\\right)^{2}$ for every natural number $\\alpha_{i}$. If the power of 5 in the factorization is bigger than 1 , then $3 \\cdot p_{i}^{\\alpha_{i}}>4\\left(1+\\alpha_{i}\\right)^{2}$. Hence, if the power of 5 is 1 , then $n=3 \\cdot 5=15, d(n)=4$, which again is not a solution. The conclusion is that $\\beta \\neq 1$.\nFinaly, we obtain $\\sqrt{n} \\geq d(n)$ and equality holds when there is no $p_{i}>3$ in the factorization of $n$ and $n=3^{2}=9$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\nN2.", "solution_match": "\nSolution."}}
17
+ {"year": "2016", "tier": "T1", "problem_label": "N3", "problem_type": "Number Theory", "problem": "Find all the integer solutions $(x, y, z)$ of the equation\n\n$$\n(x+y+z)^{5}=80 x y z\\left(x^{2}+y^{2}+z^{2}\\right)\n$$", "solution": "We directly check the identity\n\n$$\n(x+y+z)^{5}-(-x+y+z)^{5}-(x-y+z)^{5}-(x+y-z)^{5}=80 x y z\\left(x^{2}+y^{2}+z^{2}\\right)\n$$\n\nTherefore, if integers $x, y$ and $z$ satisfy the equation from the statement, we then have\n\n$$\n(-x+y+z)^{5}+(x-y+z)^{5}+(x+y-z)^{5}=0\n$$\n\nBy Fermat's theorem at least one of the parenthesis equals 0 . Let, w.l.o.g., $x=y+z$. Then the previous equation reduces to $(2 z)^{5}+(2 y)^{5}=0$, which is equivalent to $y=-z$. Therefore, the solution set of the proposed equation is\n\n$$\n(x, y, z) \\in\\{(0, t,-t),(t, 0,-t),(t,-t, 0): t \\in \\mathbb{Z}\\}\n$$\n\nRemark(PSC): Due to the volume of calculations that are involved in the solution of this problem, a more simplified version can be:\n\nFind all the integer solutions $(x, y, z)$ of the equation\n\n$$\n(x+y+z)^{3}=24 x y z\n$$\n\nThe solution would be similar to the one proposed in the original problem using the identity\n\n$$\n(x+y+z)^{3}-(-x+y+z)^{3}-(x-y+z)^{3}-(x+y-z)^{3}=24 x y z\n$$", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\nN3.", "solution_match": "\nSolution."}}
18
+ {"year": "2016", "tier": "T1", "problem_label": "N4", "problem_type": "Number Theory", "problem": "Find all monic polynomials $f$ with integer coefficients satisfying the following condition:\nThere exists a positive integer $N$ such that for every prime $p>N, p$ divides $2(f(p))!+1$.", "solution": "From the divisibility relation $p \\mid 2(f(p))!+1$ we conclude that:\n\n$$\nf(p)<p, \\text { for all primes } p>N\n$$\n\nIn fact, if for some prime number $p$ we have $f(p) \\geq p$, then $p \\mid(f(p))$ ! and then $p \\mid 1$, which is absurd. Now suppose that $\\operatorname{deg} f=m>1$. Then $f(x)=x^{m}+Q(x), \\operatorname{deg} Q(x) \\leq m-1$ and so $f(p)=p^{m}+Q(p)$. Hence for some large enough prime number $p$ holds that $f(p)>p$, which contradicts $\\left({ }^{*}\\right)$. Therefore we must have $\\operatorname{deg} Q(x)=1$ and $Q(x)=x-a$, for some positive integer $a$. Thus the given condition becomes:\n\n$$\np \\mid 2(p-a)!+1\n$$\n\nBut we have (using Wilsons theorem)\n\n$$\n\\begin{gathered}\n2(p-3)!\\equiv-(p-3)!(p-2) \\equiv-(p-2)!\\equiv-1(\\bmod p) \\\\\n\\Rightarrow p \\mid 2(p-3)!+1\n\\end{gathered}\n$$\n\nFrom (1) and (2) we get $(p-3)!\\equiv(p-a)!(\\bmod p)$. Since $p-3<p$ and $p-a<p$, we conclude that $a=3$ and $f(p)=p-3$, for every prime $p>N$. Finally, since the number of all these primes is infinite we conclude that $f(x)=x-3$, for all $x$.\nRemark(PSC): There is a typo in the original solution received, the part of the solution $\\operatorname{deg} Q(x)=1$ and $Q(x)=x-a$ should be replaced with $\\operatorname{deg} f(x)=1$ and $f(x)=x-a$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\nN4.", "solution_match": "\nSolution."}}
19
+ {"year": "2016", "tier": "T1", "problem_label": "N5", "problem_type": "Number Theory", "problem": "A positive integer $n$ is downhill if its decimal representation $\\overline{a_{k} a_{k-1} \\ldots a_{0}}$ satisfies $a_{k} \\geq a_{k-1} \\geq \\ldots \\geq a_{0}$. A real-coefficient polynomial $P$ is integer-valued if $P(n)$ is an integer for all integer $n$, and downhill-integervalued if $P(n)$ is an integer for all downhill positive integers $n$. Is it true that every downhill-integer-valued polynomial is also integer-valued?", "solution": "No, it is not.\nA downhill number can always be written as $a-b_{1}-b_{2}-\\ldots-b_{9}$, where $a$ is of the form $99 \\ldots 99$ and each $b_{i}$ either equals 0 or is of the form $\\overline{11 \\ldots 11}$.\n\nLet $n$ be a positive integer. The numbers of the form $99 \\ldots 99$ yield at most $n$ different remainders upon division by $2^{n}$, as do the numbers of the form $11 \\ldots 11$. Therefore, downhill numbers yield at most $n(n+1)^{9}$ different remainders upon division by $2^{n}$.\n\nLet $n$ be so large that $n(n+1)^{9}<2^{n}$. ( $n=63$ works: $63 \\times 64^{9}<64^{10}=2^{60}<2^{63}$.) Let $0 \\leq r<2^{n}$ be such that no downhill number is congruent to $r$ modulo $2^{n}$.\n\nConsider the polynomial\n\n$$\nP(x)=\\frac{1}{2 \\times\\left(2^{n}-1\\right)!} \\prod_{1 \\leq i<2^{n}}(x-r+i) .\n$$\n\nWe have that $P(r)=\\frac{1}{2}$ is not an integer.\nLet, then, $x$ be a downhill number. The number $(x-r+1) \\ldots\\left(x-r+2^{n}-1\\right)$ is a multiple of $\\left(2^{n}-1\\right)$ ! (as a product of $2^{n}-1$ consecutive integers); therefore, $2 P(x)$ is an integer. On the other hand, the number $(x-r)(x-r+1) \\ldots\\left(x-r+2^{n}-1\\right)$ ia a multiple of $2^{n}$ ! (as a product of $2^{n}$ consecutive integers); therefore, $2(x-r) P(x)$ is an integer multiple of $2^{n}$. Since $x$ is downhill, $x-r$ is not divisible by $2^{n}$. Therefore, $2 P(x)$ is even and $P(x)$ is an integer.\n\nAlternative version. A positive integer $n$ is uphill if its decimal representation $\\overline{a_{k} a_{k-1} \\ldots a_{0}}$ satisfies $a_{k} \\leq a_{k-1} \\leq \\ldots \\leq a_{0}$. A real-coefficient polynomial $P$ is integer-valued if $P(n)$ is an integer for all integer $n$, and uphill-integer-valued if $P(n)$ is an integer for all uphill positive integers $n$. Is it true that every uphill-integer-valued polynomial is also integer-valued?", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\nN5.", "solution_match": "\nSolution."}}
20
+ {"year": "2016", "tier": "T1", "problem_label": "N5", "problem_type": "Number Theory", "problem": "A positive integer $n$ is downhill if its decimal representation $\\overline{a_{k} a_{k-1} \\ldots a_{0}}$ satisfies $a_{k} \\geq a_{k-1} \\geq \\ldots \\geq a_{0}$. A real-coefficient polynomial $P$ is integer-valued if $P(n)$ is an integer for all integer $n$, and downhill-integervalued if $P(n)$ is an integer for all downhill positive integers $n$. Is it true that every downhill-integer-valued polynomial is also integer-valued?", "solution": "First we show that no uphill number is congruent to 10 modulo 11.\nTo this end, notice that an uphill number can always be written as $b_{1}+b_{2}+\\ldots+b_{m}$, where $m \\leq 9$, $b_{1} \\leq b_{2} \\leq \\ldots \\leq b_{m}$, and each $b_{i}$ is of the form $11 \\ldots 11$. Since the remainder of each $b_{i}$ modulo 11 is either 0 or 1 , the remainder of $b_{1}+b_{2}+\\ldots+b_{m}$ modulo 11 is at most 9 , as required.\n\nConsider, then, the polynomial\n\n$$\nP(x)=\\frac{1}{11} x(x-1) \\cdots(x-9)\n$$\n\nIt value is an integer at every uphill number; however, $P(10)$ is not an integer.\nRemark(PSC): PSC believes the alternative version of this problem has medium as level of difficulty.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2016_bmo_shortlist.jsonl", "problem_match": "\nN5.", "solution_match": "\nSolution."}}
Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"year": "2017", "tier": "T1", "problem_label": "A1", "problem_type": "Algebra", "problem": "Let $a, b, c$ be positive real numbers such that $a b c=1$. Prove that\n\n$$\n\\frac{1}{a^{5}+b^{5}+c^{2}}+\\frac{1}{b^{5}+c^{5}+a^{2}}+\\frac{1}{c^{5}+a^{5}+b^{2}} \\leq 1 .\n$$", "solution": "First we remark that\n\n$$\na^{5}+b^{5} \\geq a b\\left(a^{3}+b^{3}\\right)\n$$\n\nIndeed\n\n$$\n\\begin{aligned}\na^{5}+b^{5} \\geq a b\\left(a^{3}+b^{3}\\right) & \\Leftrightarrow a^{5}-a^{4} b-a b^{4}+b^{5} \\geq 0 \\\\\n& \\Leftrightarrow a^{4}(a-b)-b^{4}(a-b) \\geq 0 \\\\\n(a-b)\\left(a^{4}-b^{4}\\right) \\geq 0 & \\Leftrightarrow(a-b)^{2}\\left(a^{2}+b^{2}\\right)(a+b) \\geq 0\n\\end{aligned}\n$$\n\nWe rewrite the inequality as\n\n$$\n\\frac{1}{a^{5}+b^{5}+a b c^{3}}+\\frac{1}{b^{5}+c^{5}+b c a^{3}}+\\frac{1}{c^{5}+a^{5}+c a b^{3}} \\leq 1 .\n$$\n\nOn the other hand the following inequality is true\n\n$$\na^{5}+b^{5}+a b c^{3} \\geq a b\\left(a^{3}+b^{3}+c^{3}\\right)\n$$\n\nand similar for the other two.\nFinally, using AM-GM we get:\n\n$$\n\\begin{aligned}\n\\frac{1}{a^{5}+b^{5}+c^{2}}+\\frac{1}{b^{5}+c^{5}+a^{2}}+\\frac{1}{c^{5}+a^{5}+b^{2}} & \\leq \\frac{1}{a^{3}+b^{3}+c^{3}}\\left(\\frac{1}{a b}+\\frac{1}{b c}+\\frac{1}{c a}\\right)=\\frac{a+b+c}{a^{3}+b^{3}+c^{3}} \\\\\n& \\leq \\frac{a+b+c}{\\frac{(a+b+c)^{3}}{9}}=\\frac{9}{(a+b+c)^{2}} \\leq \\frac{9}{(3 \\sqrt[3]{a b c})^{2}}=1\n\\end{aligned}\n$$", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## A1", "solution_match": "\n## Solution"}}
2
+ {"year": "2017", "tier": "T1", "problem_label": "A2", "problem_type": "Algebra", "problem": "Consider the sequence of rational numbers defned by $x_{1}=\\frac{4}{3}$ and $x_{n+1}=\\frac{x_{n}^{2}}{x_{n}^{2}-x_{n}+1}, n \\geq 1$.\nShow that the numerator of the lowest term expression of each sum $\\sum_{k=1}^{n} x_{k}$ is a perfect square.", "solution": "It is easily seen that the $x_{n}$ are all rational numbers greater than 1 . Rewrite the recurrence formula in the form $x_{n}=\\frac{1}{x_{n+1}-1}-\\frac{1}{x_{n}-1}, n \\geq 1$, to get\n\n$$\n\\sum_{k=1}^{n} x_{k}=\\frac{1}{x_{n+1}-1}-\\frac{1}{x_{1}-1}=\\frac{x_{n}^{2}-x_{n}+1}{x_{n}-1}-3=\\frac{\\left(x_{n}-2\\right)^{2}}{x_{n}-1}\n$$\n\nFinally, express the positive rational number $x_{n}-1$ in lowest terms, $x_{n}-1=\\frac{a}{b}$, to deduce that $\\frac{(a-b)^{2}}{a b}$ expresses $\\sum_{k=1}^{n} x_{k}$ the lowest terms.\nSince $\\operatorname{gcd}(a, b)=1 \\Rightarrow \\operatorname{gcd}(a-b, b)=1 \\Rightarrow \\operatorname{gcd}\\left((a-b)^{2}, b\\right)=1$. Similarly we can prove that $\\operatorname{gcd}\\left((a-b)^{2}, a\\right)=1$, which implies that $\\operatorname{gcd}\\left((a-b)^{2}, a b\\right)=1$.\nThe conclusion follows.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## A2", "solution_match": "\n## Solution"}}
3
+ {"year": "2017", "tier": "T1", "problem_label": "A3", "problem_type": "Algebra", "problem": "Find all the functions $f: \\mathbb{N} \\rightarrow \\mathbb{N}$ such that:\n\n$$\nn+f(m) \\mid f(n)+n f(m)\n$$\n\nfor any $m, n \\in \\mathbb{N}$", "solution": "We will consider 2 cases, whether the range of the functions is infinite or finite or in other words the function take infinite or finite values.\nCase 1. The Function has an infinite range. Let's fix a random natural number $n$ and let $m$ be any natural number. Then using (1) we have\n\n$$\nn+f(m)\\left|f(n)+n f(m)=f(n)-n^{2}+n(f(m)+n) \\quad \\Rightarrow \\quad n+f(m)\\right| f(n)-n^{2}\n$$\n\nSince $n$ is a fixed natural number, then $f(n)-n^{2}$ is as well a fixed natural number, and since the above results is true for any $m$ and the function $f$ has an infinite range, we can choose $m$ such that $n+f(m)>\\left|f(n)-n^{2}\\right|$. This implies that $f(n)=n^{2}$ for any natural number $n$. We now check that it is a solution. Since\n\n$$\nn+f(m)=n+m^{2}\n$$\n\nand\n\n$$\nf(n)+n f(m)=n^{2}+n m^{2}=n\\left(n+m^{2}\\right)\n$$\n\nit is straightforward that $n+f(m) \\mid f(n)+n f(m)$\nCase 2. The Function has a finite range. Since the function takes finite values, then it exists a natural number $k$ such that $\\mathrm{I} \\leq f(n) \\leq k$ for any natural number $n$. It is clear that it exists at least one natural number $s$ (where $1 \\leq s \\leq k$ ) such that $f(n)=s$ for infinite natural numbers $n$. Let $m, n$ be any natural numbers such that $f(m)=f(n)=s$. Using (1) we have\n\n$$\nn+s\\left|s+n s=s-s^{2}+s(n+s) \\Rightarrow n+s\\right| s^{2}-s\n$$\n\nSince this is true for any natural number $n$ such that $f(n)=s$ and since exist infinite natural numbers $n$ such that $f(n)=s$, we can choose the natural number $n$ such that $n+s>s^{2}-s$, which implies that $s^{2}=s \\Rightarrow s=1$, or in other words $f(n)=1$ for an infinite natural number n\nLet's fix a random natural number $m$ and let $n$ be any natural number $f(n)=1$. Then using (1) we have\n\n$$\nn+f(m)\\left|1+n f(m)=1-(f(m))^{2}+f(m)(n+f(m)) \\Rightarrow n+f(m)\\right|(f(m))^{2}-1\n$$\n\nSince $m$ is a fixed a random natural number, then $(f(m))^{2}-1$ is a fixed non-negative integer and since $n$ is any natural nummber such that $f(n)=1$ and since exist infinite numbers $n$ such that $f(n)=1$, we can choose the the natural number $n$ such that $n+f(m)>(f(m))^{2}-1$. This implies $f(m)=1$ for any natural number $m$. We now check that it is a solution. Since\n\n$$\nn+f(m)=n+1\n$$\n\nand\n\n$$\nf(n)+n f(m)=1+n\n$$\n\nit is straightforward that $n+f(m) \\mid f(n)+n f(m)$.\nSo, all the functions that satisfy the given condition are $f(n)=n^{2}$ for any $n \\in \\mathbb{N}$ or $f(n)=1$ for any $n \\in \\mathbb{N}$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## A3", "solution_match": "\n## Solution"}}
4
+ {"year": "2017", "tier": "T1", "problem_label": "A4", "problem_type": "Algebra", "problem": "Let $M=\\left\\{(a, b, c) \\in \\mathbb{R}^{3}: 0<a, b, c<\\frac{1}{2}\\right.$ with $\\left.a+b+c=1\\right\\}$ and $f: M \\rightarrow \\mathbb{R}$ given as\n\n$$\nf(a, b, c)=4\\left(\\frac{1}{a}+\\frac{1}{b}+\\frac{1}{c}\\right)-\\frac{1}{a b c}\n$$\n\nFind the best (real) bounds $\\alpha$ and $\\beta$ such that\n\n$$\nf(M)=\\{f(a, b, c):(a, b, c) \\in M\\} \\subseteq[\\alpha, \\beta]\n$$\n\nand determine whether any of them is achievable.", "solution": "Let $\\forall(a, b, c) \\in M, \\alpha \\leq f(a, b, c) \\leq \\beta$ and supose that there are no better bounds, i.e. $\\alpha$ is the largest possible and $\\beta$ is the smallest possible. Now,\n\n$$\n\\begin{aligned}\n\\alpha \\leq f(a, b, c) \\leq \\beta & \\Leftrightarrow \\alpha a b c \\leq 4(a b+b c+c a)-1 \\leq \\beta a b c \\\\\n& \\Leftrightarrow(\\alpha-8) a b c \\leq 4(a b+b c+c a)-8 a b c-1 \\leq(\\beta-8) a b c \\\\\n& \\Leftrightarrow(\\alpha-8) a b c \\leq 1-2(a+b+c)+4(a b+b c+c a)-8 a b c \\leq(\\beta-8) a b c \\\\\n& \\Leftrightarrow(\\alpha-8) a b c \\leq(1-2 a)(1-2 b)(1-2 c) \\leq(\\beta-8) a b c\n\\end{aligned}\n$$\n\nFor $\\alpha<8$, we have\n\n$$\n(1-2 a)(1-2 b)(1-2 c) \\geq 0>(\\alpha-8) a b c .\n$$\n\nSo $\\alpha \\geq 8$. But if we take $\\varepsilon>0$ small and $a=b=\\frac{1}{4}+\\varepsilon, c=\\frac{1}{2}-2 \\varepsilon$, we'll have:\n\n$$\n(\\alpha-8)\\left(\\frac{1}{4}+\\varepsilon\\right)\\left(\\frac{1}{4}+\\varepsilon\\right)\\left(\\frac{1}{2}-2 \\varepsilon\\right) \\leq\\left(\\frac{1}{2}-2 \\varepsilon\\right)\\left(\\frac{1}{2}-2 \\varepsilon\\right) 4 \\varepsilon\n$$\n\nTaking $\\varepsilon \\rightarrow 0^{+}$, we get $\\alpha-8 \\leq 0$. So $\\alpha=8$ and it can never be achieved. For the right side, note that there is a triangle whose side-lengths are $a, b, c$. For this triangle, denote $p=\\frac{1}{2}$ the half-perimeter, $S$ the area and $r, R$ respectively the radius of incircle,outcircle. Using the relations $R=\\frac{a b c}{4 S}$ and $S=p r$, we will have:\n\n$$\n\\begin{aligned}\n(1-2 a)(1-2 b)(1-2 c) \\leq(\\beta-8) a b c & \\Leftrightarrow(p-a)(p-b)(p-c) \\leq \\frac{(\\beta-8) a b c}{8} \\\\\n& \\Leftrightarrow \\frac{S^{2}}{p} \\leq \\frac{(\\beta-8) a b c}{8} \\\\\n& \\Leftrightarrow 2 \\frac{S}{p} \\leq \\frac{(\\beta-8) a b c}{4 S} \\\\\n& \\Leftrightarrow \\frac{R}{r} \\geq 2(\\beta-8)^{-1}\n\\end{aligned}\n$$\n\nSince the least value of $\\frac{R}{r}$ is 2 (this is a well-known classic inequality), and it is achievable at $a=b=c=\\frac{1}{3}$, we must have $\\beta=9$.\nAnswer: $\\alpha=8$ not achievable and $\\beta=9$ achievable.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\nA4", "solution_match": "\n## Solution"}}
5
+ {"year": "2017", "tier": "T1", "problem_label": "A5", "problem_type": "Algebra", "problem": "Consider integers $m \\geq 2$ and $n \\geq 1$. Show that there is a polynomial $P(x)$ of degree equal to $n$ with integer coefficients such that $P(0), P(1), \\ldots, P(n)$ are all perfect powers of $m$.", "solution": "Let $a_{0}, a_{1}, \\ldots, a_{n}$ be integers to be chosen later, and consider the polynomial $P(x)=\\frac{1}{n!} Q(x)$ where\n\n$$\nQ(x)=\\sum_{k=0}^{n}(-1)^{n-k}\\binom{n}{k} a_{k} \\prod_{\\substack{0 \\leq i \\leq n \\\\ i \\neq k}}(x-i) .\n$$\n\nObserve that for $l \\in\\{0,1, \\ldots, n\\}$ we have\n\n$$\n\\begin{aligned}\nP(l) & =\\frac{1}{n!}(-1)^{n!}(\\stackrel{n}{l}) a_{l} \\prod_{\\substack{0 \\leq i \\leq n \\\\\ni \\neq 1}}(l-i) \\\\\n& =\\frac{1}{n!}(-1)^{n-1}\\binom{n}{l} a_{l} l!(-1)^{n-l}(n-l)! \\\\\n& =a_{l}\n\\end{aligned}\n$$\n\nSo $P(x)$ is the unique polynomial of degree at most $n$ such that $P(l)=a_{l}$. (Any two polynomials of degree at most $n$ agreeing on $n+1$ distinct values are equal.) Note in particular that\n\n$$\n\\sum_{k=0}^{n}(-1)^{n-k}\\binom{n}{k} \\prod_{\\substack{0 \\leq i \\leq n \\\\ i \\neq k}}(x-i)=n!\n$$\n\nIf $p$ is a prime dividing $n$ !, we let $r_{p}$ be maximal such that $p^{r_{p}}$ divides $\\boldsymbol{n}$ !. If $p$ divides $\\boldsymbol{m}$, then there is an integer $d_{p}$ such that $m^{d_{p}} \\approx 0\\left(\\bmod p^{r_{p}}\\right)$, for example $d_{p}=r_{p}$ will do. If $p$ does not divide $m$, then there is an integer $d_{p}$ such that $m^{d_{p}} \\equiv 1\\left(\\bmod p^{r_{p}}\\right)$, for example, by Euler's theorem, $d_{p}=\\varphi\\left(p^{r_{p}}\\right)$ will do. Let $d=d_{1} d_{2} \\ldots d_{p}$ and observe that for every positive integer $t$ we have $m^{\\prime d} \\equiv 0\\left(\\bmod p^{r_{p}}\\right)$ if $p \\mid m$ and $m^{t d} \\equiv 1\\left(\\bmod p^{r_{p}}\\right)$ if $p \\nmid m$.\nNow let $t_{0}, \\ldots, t_{n}$ be positive integers to be chosen later and define $a_{k}=m^{t_{k} d}$. We will show that the polynomial $P(x)$ has integer coefficients. We will also show that there is an appropriate choice of $t_{0}, \\ldots, t_{n}$ such that $P(x)$ has degree exactly equal to $n$.\nTo show that $P(x)$ has integer coefficients it is enough to show that for every $\\boldsymbol{p}$ dividing $\\boldsymbol{n !}$, all coefficients of $Q(x)$ are multiples of $p^{r_{p}}$. This is immediate if $p$ divides $m$ as all $a_{k}$ 's are multiples of $p^{r_{p}}$. If $p$ does not divide $m$ then we have $a_{k} \\equiv 1\\left(\\bmod p^{r_{p}}\\right)$ for every $0 \\leq k \\leq n$ and so by (*)\n\n$$\nQ(x) \\equiv \\sum_{k=0}^{n}(-1)^{n-k}\\binom{n}{k} \\prod_{\\substack{0 \\leq i \\leq n \\\\ i \\neq k}}(x-i) \\equiv n!\\equiv 0\\left(\\bmod p^{r_{p}}\\right)\n$$\n\nThis shows that all coefficients of $Q(x)$ are indeed multiples of $p^{r_{p}}$. It remains to show that there is a choice of $t_{0}, \\ldots, t_{n}$ guarantecing that the degree of $P(x)$ is exactly equal to $n$. One such choice is $t_{0}=2$ and $t_{1}=\\ldots=t_{n}=1$. This works because if $P(x)$ had degree less than $n$, then looking at the values $P(1), \\ldots, P(n)$ we would get that $P(x)$ is constant. But this is impossible as $P(0) \\neq P(1)$.\nNote. Looking at the coefficient of $x^{n}$ in the definition of $P(x)$ it is not difficult to see that if we fix any $t_{1}, \\ldots, t_{n}$ and pick $t_{0}$ large enough we will get that this coefficient is non-zero. In particular, we can additionally guarantee that $P(0), P(1), \\ldots, P(n)$ are distinct perfect powers of $m$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## A5", "solution_match": "\n## Solution"}}
6
+ {"year": "2017", "tier": "T1", "problem_label": "A6", "problem_type": "Algebra", "problem": "Find all functions $f: \\mathbb{R} \\rightarrow \\mathbb{R}$ satisfying\n\n$$\nf\\left(x+y f\\left(x^{2}\\right)\\right)=f(x)+x f(x y)\n$$\n\nfor all real numbers $x$ and $y$.", "solution": "Let $P(x, y)$ be the assertion $f\\left(x+y f\\left(x^{2}\\right)\\right)=f(x)+x f(x y) . P(1,0)$ yields $f(0)=0$. If there exists $x_{0} \\neq 0$ satisfying $f\\left(x_{0}^{2}\\right)=0$, then considering $P\\left(x_{0}, y\\right)$, we get $f\\left(x_{0} y\\right)=0$ for all $y \\in \\mathbb{R}$. In this case, since $x_{0} \\neq 0$, we can write any real number $c$ in the form $x_{0} y$ for some $y$ and hence we conclude that $f(c)=0$. It is clear that the zero function satisfies the given equation. Now assume that $f\\left(x^{2}\\right) \\neq 0$ for all $x \\neq 0$.\nBy $P(1, y)$ we have\n\n$$\nf(1+y f(1))=f(1)+f(y)\n$$\n\nIf $f(1) \\neq 1$, there exists a real number $y$ satisfying $1+y f(1)=y$ which means that $f(1)=0$ which is a contradiction since $f\\left(x^{2}\\right) \\neq 0$ for all $x \\neq 0$. Therefore we get $f(1)=1$. Considering $P\\left(x,-x / f\\left(x^{2}\\right)\\right.$ ) for $x \\neq 0$, we obtain that\n\n$$\nf(x)=-x f\\left(-\\frac{x^{2}}{f\\left(x^{2}\\right)}\\right) \\quad \\forall x \\in \\mathbb{R} \\backslash\\{0\\} .\n$$\n\nReplacing $x$ by $-x$ in (1), we obtain $f(x)=-f(-x)$ for all $x \\neq 0$. Since $f(0)=0$, we have $f(x)=-f(-x)$ for all $x \\in \\mathbb{R}$. Since $f$ is odd, $P(x,-y)$ implies\n\n$$\nf\\left(x-y f\\left(x^{2}\\right)\\right)=f(x)-x f(x y)\n$$\n\nand hence by adding $P(x, y)$ and $P(x,-y)$, we get\n\n$$\nf\\left(x+y f\\left(x^{2}\\right)\\right)+f\\left(x-y f\\left(x^{2}\\right)\\right)=2 f(x) \\forall x, y \\in \\mathbb{R}\n$$\n\nPutting $y=x / f\\left(x^{2}\\right)$ for $x \\neq 0$ we get\n\n$$\nf(2 x)=2 f(x) \\quad \\forall x \\in \\mathbb{R}\n$$\n\nand hence we have\n\n$$\nf\\left(x+y f\\left(x^{2}\\right)\\right)+f\\left(x-y f\\left(x^{2}\\right)\\right)=f(2 x) \\forall x, y \\in \\mathbb{R}\n$$\n\nIt is clear that for any two real numbers $u$ and $v$ with $u \\neq-v$, we can choose\n\n$$\nx=\\frac{u+v}{2} \\text { and } y=\\frac{v-u}{\\left.2 f\\left(\\frac{u+v}{2}\\right)^{2}\\right)}\n$$\n\nyielding\n\n$$\nf(u)+f(v)=f(u+v)\n$$\n\nSince $f$ is odd, (2) is also true for $u=-v$ and hence we obtain that\n\n$$\nf(x)+f(y)=f(x+y) \\quad \\forall x, y \\in \\mathbb{R} .\n$$\n\nTherefore, $P(x, y)$ implies\n\n$$\nf\\left(y f\\left(x^{2}\\right)\\right)=x f(x y) \\quad \\forall x, y \\in \\mathbb{R}\n$$\n\nHence we have\n\n$$\nf\\left(f\\left(x^{2}\\right)\\right)=x f(x) \\quad \\forall x \\in \\mathbb{R}\n$$\n\nand\n\n$$\nf\\left(x f\\left(x^{2}\\right)\\right)=x f\\left(x^{2}\\right) \\forall x \\in \\mathbb{R}\n$$\n\nUsing (2) and (3), we get\n\n$$\n\\begin{aligned}\nx f(x)+y f(y)+x f(y)+y f(x) & =(x+y)(f(x)+f(y)) \\\\\n& =f\\left(f\\left((x+y)^{2}\\right)\\right) \\\\\n& =f\\left(f\\left(x^{2}+2 x y+y^{2}\\right)\\right) \\\\\n& =f\\left(f\\left(x^{2}\\right)+f\\left(y^{2}\\right)+f(2 x y)\\right) \\\\\n& =f\\left(f\\left(x^{2}\\right)\\right)+f\\left(f\\left(y^{2}\\right)\\right)+f(f(2 x y)) \\\\\n& =x f(x)+y(f(y))+f(f(2 x y)) \\\\\n& =x f(x)+y(f(y))+2 f(f(x y))\n\\end{aligned}\n$$\n\nand hence\n\n$$\n2 f(f(x y))=x f(y)+y f(x) \\forall x, y \\in \\mathbb{R} .\n$$\n\nUsing (5), we have\n\n$$\n2 f(f(x))=x+f(x) \\quad \\forall x \\in \\mathbb{R} .\n$$\n\nUsing (3) and (6), we obtain that\n\n$$\n2 x f(x)=2 f\\left(f\\left(x^{2}\\right)\\right)=x^{2}+f\\left(x^{2}\\right) \\forall x \\in \\mathbb{R} .\n$$\n\nPutting $y=f\\left(x^{2}\\right)$ in (5) yields\n\n$$\n2 f\\left(f\\left(x f\\left(x^{2}\\right)\\right)\\right)=x f\\left(f\\left(x^{2}\\right)\\right)+f\\left(x^{2}\\right) f(x) \\forall x \\in \\mathbb{R}\n$$\n\nUsing (4), we get $f\\left(f\\left(x f\\left(x^{2}\\right)\\right)\\right)=x f\\left(x^{2}\\right)$ and by (3) and (8) we have\n\n$$\n2 x f\\left(x^{2}\\right)=2 f\\left(f\\left(x f\\left(x^{2}\\right)\\right)\\right)=x f\\left(f\\left(x^{2}\\right)\\right)+f\\left(x^{2}\\right) f(x)=x^{2} f(x)+f\\left(x^{2}\\right) f(x) \\forall x \\in \\mathbb{R}\n$$\n\nNow using (7), write $f\\left(x^{2}\\right)=2 x f(x)-x^{2}$ in (9) to obtain that\n\n$$\n2 x\\left(2 x f(x)-x^{2}\\right)=x^{2} f(x)+\\left(2 x f(x)-x^{2}\\right) f(x)\n$$\n\nwhich is equivalent to\n\n$$\n2 x(x-f(x))^{2}=0 \\quad \\forall x \\in \\mathbb{R}\n$$\n\nThis shows that $f(x)=x \\quad \\forall x \\in \\mathbb{R}$ which satisfies the original equation. Therefore all solutions are $f(x)=0 \\quad \\forall x \\in \\mathbb{R}$ and $f(x)=x \\quad \\forall x \\in \\mathbb{R}$.\n\n## NUMBER THEORY", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\nA6", "solution_match": "\n## Solution"}}
7
+ {"year": "2017", "tier": "T1", "problem_label": "NT1", "problem_type": "Number Theory", "problem": "Find all pairs $(x, y)$ of positive integers such that\n\n$$\nx^{3}+y^{3}=x^{2}+42 x y+y^{2}\n$$", "solution": "Let $d=(x, y)$ be the greatest common divisor of positive integers $x$ and $y$.\nSo, $x=a d, y=b d$, where $d \\in \\mathbb{N},(a, b)=1, a, b \\in \\mathbb{N}$. We have\n\n$$\n\\begin{aligned}\nx^{3}+y^{3}=x^{2}+42 x y+y^{2} & \\Leftrightarrow d^{3}\\left(a^{3}+b^{3}\\right)=d^{2}\\left(a^{2}+42 a b+b^{2}\\right) \\\\\n& \\Leftrightarrow d(a+b)\\left(a^{2}-a b+b^{2}\\right)=a^{2}+42 a b+b^{2} \\\\\n& \\Leftrightarrow(d a+d b-1)\\left(a^{2}-a b+b^{2}\\right)=43 a b\n\\end{aligned}\n$$\n\nIf we denote $c=d a+d b-1 \\in \\mathbb{N}$, then the equality $a^{2} c-a b c+b^{2} c=43 a b$ implies the relations\n\n$$\n\\begin{aligned}\n\\left.\\begin{array}{rl}\nb\\left|c a^{2} \\Rightarrow b\\right| c \\\\\na\\left|c b^{2} \\Rightarrow a\\right| c\n\\end{array}\\right\\} & \\Rightarrow(a b) \\mid c \\\\\n& \\Leftrightarrow c=m a b, m \\in \\mathbb{N}^{+} \\\\\n& \\Rightarrow m\\left(a^{2}-a b+b^{2}\\right)=43 \\\\\n& \\Rightarrow\\left(a^{2}-a b+b^{2}\\right) \\mid 43 \\\\\n& \\Leftrightarrow a^{2}-a b+b^{2}=1 \\text { or } a^{2}-a b+b^{2}=43 .\n\\end{aligned}\n$$\n\nIf $a^{2}-a b+b^{2}=1$, then $(a-b)^{2}=1-a b \\geq 0 \\Rightarrow a=b=1,2 d=44,(x, y)=(22,22)$.\nIf $a^{2}-a b+b^{2}=43$, then, by virtue of simmetry, we suppose that $x \\geq y \\Rightarrow a \\geq b$. We obtain that $43=a^{2}-a b+b^{2} \\geq a b \\geq b^{2} \\Rightarrow b \\in\\{1,2,3,4,5,6\\}$.\nIf $b=1$, then $a=7, d=1,(x, y)=(7,1)$ or $(x, y)=(1,7)$.\nIf $b=6$, then $a=7, d=\\frac{43}{13} \\notin \\mathbb{N}$.\nFor $b \\in\\{2,3,4,5\\}$ there no positive integer solutions for $a$.\nFinally, we have $(x, y) \\in\\{(1,7),(7,1),(22,22)\\}$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## NT1", "solution_match": "\n## Solution"}}
8
+ {"year": "2017", "tier": "T1", "problem_label": "NT2", "problem_type": "Number Theory", "problem": "Find all functions $f: \\mathbf{Z}_{>0} \\rightarrow \\mathbb{Z}_{>0}$ such that the number $x f(x)+f^{2}(y)+2 x f(y)$ is a perfect square for all positive integers $x, y$.", "solution": "Let $p$ be a prime number. Then for $x=y=p$ the given condition gives us that the number $f^{2}(p)+3 p f(p)$ is a perfect square. Then, $f^{2}(p)+3 p f(p)=k^{2}$ for some positive integer $k$. Completing the square gives us that $(2 f(p)+3 p)^{2}-9 p^{2}=4 k^{2}$, or\n\n$$\n(2 f(p)+3 p-2 k)(2 f(p)+3 p+2 k)=9 p^{2} .\n$$\n\nSince $2 f(p)+3 p+3 k>3 p$, we have the following 4 cases.\n\n$$\n\\begin{aligned}\n& \\left\\{\\begin{array} { l } \n{ 2 f ( p ) + 3 p + 2 k = 9 p } \\\\\n{ 2 f ( p ) + 3 p - 2 k = p }\n\\end{array} \\text { or } \\left\\{\\begin{array}{l}\n2 f(p)+3 p+2 k=p^{2} \\\\\n2 f(p)+3 p-2 k=9\n\\end{array}\\right.\\right. \\text { or } \\\\\n& \\left\\{\\begin{array} { l } \n{ 2 f ( p ) + 3 p + 2 k = 3 p ^ { 2 } } \\\\\n{ 2 f ( p ) + 3 p - 2 k = 3 }\n\\end{array} \\text { or } \\left\\{\\begin{array}{l}\n2 f(p)+3 p+2 k=9 p^{2} \\\\\n2 f(p)+3 p-2 k=1\n\\end{array}\\right.\\right.\n\\end{aligned}\n$$\n\nSolving the systems, we have the following cases for $f(p)$.\n\n$$\nf(p)=p \\text { or } f(p)=\\left(\\frac{p-3}{2}\\right)^{2} \\text { or } f(p)=\\frac{3 p^{2}-6 p-3}{4} \\text { or } f(p)=\\left(\\frac{3 p-1}{2}\\right)^{2} .\n$$\n\nIn all cases, we see that $f(p)$ can be arbitrary large whenever $p$ grows.\nNow fix a positive integer $x$. From the given condition we have that\n\n$$\n(f(y)+x)^{2}+x f(x)-x^{2}\n$$\n\nis a perfect square. Since for $y$ being a prime, let $y=q, f(q)$ can be arbitrary large and $x f(x)-x^{2}$ is fixed, it means that $x f(x)-x^{2}$ should be zero, since the difference of $(f(q)+x+1)^{2}$ and $(f(q)+x)^{2}$ can be arbitrary large.\nAfter all, we conclude that $x f(x)=x^{2}$, so $f(x)=x$, which clearly satisfies the given condition.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## NT2", "solution_match": "\n## Solution"}}
9
+ {"year": "2017", "tier": "T1", "problem_label": "NT3", "problem_type": "Number Theory", "problem": "Prove that for all positive integer $n$, there is a positive integer $m$, that $7^{n} \\mid 3^{m}+5^{m}-1$.", "solution": "We prove this by induction on $\\boldsymbol{n}$. The case $\\boldsymbol{n}=1$ is indeed trivial for $\\boldsymbol{m}=1$. Assume that the statement of the problem holds true for $n$, and we have $3^{m}+5^{m}-1=7^{n} l$ for some positive integer $l$ which is not divisible by 7 (if not we are done). Since $3^{6} \\equiv 1(\\bmod 7)$ and $5^{6} \\equiv 1(\\bmod 7)$ we conclude that,\n\n$$\n3^{6 \\cdot 7^{n-1}} \\equiv 1\\left(\\bmod 7^{n}\\right), 5^{6 \\cdot 7^{n-1}} \\equiv 1\\left(\\bmod 7^{n}\\right) .\n$$\n\nSince\n\n$$\nv_{7}\\left(3^{6.7^{n-1}}-1\\right)=v_{7}\\left(3^{6}-1\\right)+v_{7}\\left(7^{n-1}\\right)=n \\text { and } v_{7}\\left(5^{6.7^{n-1}}-1\\right)=v_{7}\\left(5^{6}-1\\right)+v_{7}\\left(7^{n-1}\\right)=n\n$$\n\nThus we can say that: $3^{6.7^{n-1}}=1+7^{n} r, 5^{6.7^{n-1}}=1+7^{n} s$ for some positive integers $r, s$. We find the reminder of $r, s$ module 7 . Note that:\n\n$$\n\\frac{y^{7^{k}}-1}{7^{k+1}}=\\frac{y-1}{7} \\cdot \\frac{1+y+\\ldots+y^{6}}{7} \\cdot \\ldots \\cdot \\frac{1+y^{7^{x-1}}+\\ldots+y^{67^{k-1}}}{7}\n$$\n\nWe use the above identity for $y=3^{6}, 5^{6}$. Note that in both cases $y=1(\\bmod 7)$. Now we use the following lemma\nLemma. Let $p$ be an odd prime such that $p \\mid a-1$ then $\\frac{a^{p}-1}{a-1} \\equiv p\\left(\\bmod p^{2}\\right)$.\nProof. Take $a-1=b$, then $p \\mid b$ now\n\n$$\n\\frac{a^{p}-1}{a-1}=\\frac{(b+1)^{p}-1}{b}=b^{p-1}+\\ldots+\\binom{p}{2} b+p \\equiv p\\left(\\bmod p^{2}\\right)\n$$\n\nsince all the binomial coefficients is divisible by $p$. So our proof is complete.\nThen by use of the lemma repeatedly we find that all the terms of the above identity ( ${ }^{*}$ ) except the first term is congruent to 1 modulo 7 . Thus we can find that :\n\n$$\n\\frac{y^{7^{k}}-1}{7^{k+1}} \\equiv \\frac{y-1}{7}(\\bmod 7)\n$$\n\nSince\n\n$$\n\\frac{3^{6}-1}{7}=104 \\equiv-1, \\frac{5^{6}-1}{7} \\equiv 2232 \\equiv-1(\\bmod 7)\n$$\n\nwe find that $r \\equiv s \\equiv-I(\\bmod 7)$, and by use of binomial theorem, we can easily find that\n\n$$\n3^{6 l \\cdot 7^{n-1}}=1+7^{n} r t\\left(\\bmod 7^{n+1}\\right), \\quad 5^{6 i \\cdot 7^{n-1}}=1+7^{n} s t\\left(\\bmod 7^{n+1}\\right)\n$$\n\nfor all positive integers $t$.\nNow take $\\boldsymbol{m}+\\boldsymbol{t r} \\cdot 7^{\\boldsymbol{n - 1}}$ instead of $\\boldsymbol{m}$,(while we will specify the number $t$ later) we can find that:\n\n$$\n3^{m+6 t \\cdot 7^{n-1}}+5^{m+6 r \\cdot 7^{n-1}}-1=3^{m} \\cdot 3^{6 r} \\cdot 7^{n-1}+5^{m} \\cdot 5^{61 \\cdot 7^{n-1}}-1\n$$\n\nTaking modulo $7^{n+1}$ we can find that, the above expression is reduced to\n\n$$\n\\begin{aligned}\n3^{m}\\left(1+7^{n} r t\\right)+5^{m}\\left(1+7^{n} s t\\right)-1 & \\equiv 3^{m}+5^{m}-1+5^{m} \\cdot 7^{n} s t+3^{m} \\cdot 7^{n} r t \\\\\n& \\equiv 7^{n}\\left(l+\\left(5^{m} s+3^{m} r\\right) t\\right)\\left(\\bmod 7^{n+1}\\right)\n\\end{aligned}\n$$\n\nNow, the problem reduced to finding a positive integer $t$ such that\n\n$$\nl+\\left(5^{m} s+3^{m} \\cdot r\\right) t \\equiv 0(\\bmod 7)\n$$\n\nsince\n\n$$\n5^{m} s+3^{m} r \\equiv-5^{m}-3^{m} \\equiv 1(\\bmod 7) .\n$$\n\nSince $3^{m}+5^{m}-1 \\equiv 0(\\bmod 7)$ whence, we find that $\\operatorname{gcd}\\left(5^{m} s+3^{m} r, 7\\right)=1$. Thus such integer $t$ exists, so we are done!", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## NT3", "solution_match": "\n## Solution"}}
10
+ {"year": "2017", "tier": "T1", "problem_label": "NT4", "problem_type": "Number Theory", "problem": "Find all pairs of positive integers $(x, y)$, such that $x^{2}$ is divisible by $2 x y^{2}-y^{3}+1$.", "solution": "If $y=1$, then $2 x \\mid x^{2} \\Leftrightarrow x=2 n, n \\in \\mathbb{N}$. So, the pairs $(x, y)=(2 n, 1), n \\in \\mathbb{N}$ satisfy the required divizibility.\nLet $y>1$ such, that $x^{2}$ is divisible by $2 x y^{2}-y^{3}+1$. There exist $m \\in \\mathbb{N}$ such that\n\n$$\nx^{2}=m\\left(2 x y^{2}-y^{3}+1\\right), \\text { e.t. } x^{2}-2 m y^{2} x+\\left(m y^{3}-m\\right)=0\n$$\n\nThe discriminant of last quadratic equation is equal to $\\Delta=4 m^{2} y^{4}-4 m y^{3}+4 m$. Denote\n\n$$\nA=4 m\\left(y^{2}-1\\right)+(y-1)^{2}, \\quad B=4 m\\left(y^{2}+1\\right)-(y+1)^{2}\n$$\n\nFor $y>1, y \\in \\mathbb{N}$ and $m \\in \\mathbb{N}$ we have\n\n$$\nA>0, \\quad B=4 m\\left(y^{2}+1\\right)-(y+1)^{2}>2\\left(y^{2}+1\\right)-(y+1)^{2}=(y-1)^{2} \\geq 0 \\Rightarrow B>0\n$$\n\nWe obtain the following estimations for the discriminant $\\Delta$ :\n\n$$\n\\begin{aligned}\n& \\Delta+A=\\left(2 m y^{2}-y+1\\right)^{2} \\geq 0 \\Rightarrow \\Delta<\\left(2 m y^{2}-y+1\\right)^{2} ; \\\\\n& \\Delta-B=\\left(2 m y^{2}-y-1\\right)^{2} \\geq 0 \\Rightarrow \\Delta>\\left(2 m y^{2}-y-1\\right)^{2} .\n\\end{aligned}\n$$\n\nBecause the discriminant $\\Delta$ must be a perfect square, we obtain the equalities:\n\n$$\n\\Delta=4 m^{2} y^{4}-4 m y^{3}+4 m=\\left(2 m y^{2}-y\\right)^{2} \\Leftrightarrow y^{2}=4 m \\Rightarrow y=2 k, k \\in \\mathbb{N}, m=k^{2}, k \\in \\mathbb{N}\n$$\n\nThe equation $x^{2}-8 k^{4} x+k\\left(8 k^{4}-k\\right)=0$ has the solutions $x=k$ and $x=8 k^{4}-k$, where $k \\in \\mathbb{N}$.\nFinaly, we obtain that all pairs of positive integers $(x, y)$, such that $x^{2}$ is divisible by $2 x y^{2}-y^{3}+1$, are equal to $(x, y) \\in\\left\\{(2 k, 1),(k, 2 k),\\left(8 k^{4}-k, 2 k\\right) \\mid k \\in \\mathbb{N}\\right\\}$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## NT4", "solution_match": "\n## Solution"}}
11
+ {"year": "2017", "tier": "T1", "problem_label": "NT5", "problem_type": "Number Theory", "problem": "Given a positive odd integer $n$, show that the arithmetic mean of fractional parts $\\left\\{\\frac{k^{2 n}}{p}\\right\\}$, $k=1, \\ldots, \\frac{p-1}{2}$, is the same for infinitely many primes $p$.", "solution": "We show that the arithmetic mean in question is $\\frac{1}{2}$ for infinitely many primes congruent to 1 modulo 4.\nNotice that $\\left\\{\\frac{k^{2 n}}{p}\\right\\}=\\frac{r_{k}}{p}$, where $r_{k}$ is the remainder $k^{2 n}$ leaves upon division by $p$. Clearly, the $r_{k}$ are quadratic residues modulo $p$.\nIf $p$ is prime, and $p-1$ and $n$ are relatively prime, then the $r_{k}, k=1, \\ldots, \\frac{p-1}{2}$, are pairwise distinct, since the $k^{2 n}, k=1, \\ldots, \\frac{p-1}{2}$, are pairwise distinct modulo $p$, by Fermat's little theorem. In this case, the $r_{k}, k=1, \\ldots, \\frac{p-1}{2}$, form the set $R$ of all $\\frac{p-1}{2}$ quadratic residues modulo $p$ in the range 1 through $p-1$.\nIf, in addition, $p$ is congruent to 1 modulo 4 , then -1 is a quadratic residue modulo $p$, and the assignment $r \\mapsto p-r, r \\in R$, defines a permutation of $R$. In this case,\n\n$$\n\\sum_{r \\in R} r=\\sum_{r \\in R}(p-r)=\\frac{p(p-1)}{2}-\\sum_{r \\in R} r\n$$\n\nso\n\n$$\n\\sum_{r \\in R} r=\\frac{p(p-1)}{4},\n$$\n\nand the arithmetic mean in question is $\\frac{1}{2}$.\nFinally, since $n$ is odd, infinitely many primes congruent to 1 modulo 4 are also congruent to 2 modulo $n$, by Dirichlet's theorem on arithmetic sequences of integers; for such a prime $p$, the numbers $p-1$ and $n$ are clearly relatively prime. This completes the proof.\n\n## GEOMETRY", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## NT5", "solution_match": "\n## Solution"}}
12
+ {"year": "2017", "tier": "T1", "problem_label": "G1", "problem_type": "Geometry", "problem": "Let $A B C$ be an acute triangle. Variable points $E$ and $F$ are on sides $A C$ and $A B$ respectively such that $B C^{2}=B A \\cdot B F+C E \\cdot C A$. As $E$ and $F$ vary prove that the circumcircle of $A E F$ passes through a fixed point other than $A$.", "solution": "1\n\nLet $H$ be the ortocenter of $A B C$ and $K, L, M$ be the feet of perpendiculars respectively from $A, B, C$ to their opposite sides of $A B C$. Also let $D$ be the intersection point of lines $B E$ and $C F$. From power of point we have\n\n$$\nB A \\cdot B M=B C \\cdot B K\n$$\n\nand\n\n$$\nC A \\cdot C L=C B \\cdot C K\n$$\n\nAdding (1) and (2) we have:\n\n$$\nC A \\cdot C L+B A \\cdot B M=B C \\cdot B K+C B \\cdot C K=B C(B K+C K)=B C^{2}\n$$\n\nCombining (3) with the problem statement $B C^{2}=B A \\cdot B F+C E \\cdot C A$ we have:\n\n$$\n\\begin{aligned}\n& B A \\cdot B F-B A \\cdot B M=C A \\cdot C L-C E \\cdot C A \\\\\n& B A(B F-B M)=C A(C L-C E) \\\\\n& B A \\cdot F M=C A \\cdot L E \\\\\n& \\quad \\frac{L E}{F M}=\\frac{A B}{A C}=\\frac{B L}{C M}\n\\end{aligned}\n$$\n\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-20.jpg?height=2007&width=2070&top_left_y=2829&top_left_x=791)\n\nWhere the last equality follows from $\\triangle A M C \\sim \\triangle A L B$. Now since $\\frac{L E}{F M}=\\frac{B L}{C M}$ and $\\angle F M C=\\angle E L B=90^{\\circ}$ we get that triangles $\\triangle F M C \\sim \\triangle E L B$. From this similarity we get\n\n$$\n\\measuredangle A E D=\\measuredangle A E B=\\angle L E B=\\measuredangle M F C=180^{\\circ}-\\angle A F C=180-\\angle A F D,\n$$\n\nmeaning points $A, D, E, F$ are concylic.\nSince both pairs $\\{E, F\\}$ and $\\{M, L\\}$ satisfy the problem condition, we must have this fixed point we are looking for is the second intersection of the circumcircles around $A F D E$ and AMHL. Let this point be $X$. We now prove that $X$ is fixed on the circumcircle of $A M H L$ (which would imply $X$ is fixed).\nFrom the concylicity we have\n\n$$\n\\angle X L E=180^{\\circ}-\\measuredangle X L A=\\measuredangle X M A=\\angle X M F \\text { and } \\measuredangle X E L=\\measuredangle X E A=180-\\measuredangle X F A=\\measuredangle X F M\n$$\n\nand from here we get $\\triangle X L E \\sim \\triangle X M F$. This similarity gives us\n\n$$\n\\frac{X L}{X M}=\\frac{L E}{M F} .\n$$\n\nNow combining (4) and (5) we get $\\frac{X L}{X M}=\\frac{A B}{A C}$ which is a fixed quantity. Since points $M, L$, the circumcircle of $A M L$, and ratio $\\frac{X L}{X M}$ are fixed, this implies that point $X$ is fixed.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## G1", "solution_match": "\n## Solution"}}
13
+ {"year": "2017", "tier": "T1", "problem_label": "G1", "problem_type": "Geometry", "problem": "Let $A B C$ be an acute triangle. Variable points $E$ and $F$ are on sides $A C$ and $A B$ respectively such that $B C^{2}=B A \\cdot B F+C E \\cdot C A$. As $E$ and $F$ vary prove that the circumcircle of $A E F$ passes through a fixed point other than $A$.", "solution": "2\n\nLet the $D$ be the intersection of $B E$ and $C F$ and let circumcircle of triangle $C F A$ intersect $B C$ at point $G$. From power of point we have\n\n$$\nB G \\cdot B C=B F \\cdot B A\n$$\n\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-21.jpg?height=2102&width=2597&top_left_y=2595&top_left_x=548)\n\nCombining (6) with the problem statement we get\n\n$$\nB C^{2}=B A \\cdot B F+C E \\cdot C A=B G \\cdot B C+C E \\cdot C A\n$$\n\nand from here we get\n\n$$\nC E \\cdot C A=B C(B C-B G)=B C \\cdot C G\n$$\n\n(7) implies that $E, A, B, G$ are concyclic as well.\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-22.jpg?height=1863&width=2194&top_left_y=817&top_left_x=780)\n\nThis gives us\n\n$$\n\\measuredangle G A C=\\measuredangle G A E=\\measuredangle G B E=\\measuredangle C B D\n$$\n\nand\n\n$$\n\\measuredangle B A C-\\measuredangle G A C=\\measuredangle G A B=\\measuredangle G A F=\\measuredangle G C F=\\measuredangle B C D .\n$$\n\nAdding these two equalities gives us\n\n$$\n\\measuredangle B A C=\\measuredangle C B D+\\measuredangle B C D=180^{\\circ}-\\measuredangle B D C .\n$$\n\nThis implies that $A, E, D, F$ are concyclic. Now let the second intersection of the circumcircles of $B D C$ and $A F D E$ be $X$. We have\n\n$$\n\\angle X A B=\\angle X A F=\\angle X D F=180^{\\circ}-\\angle X D C=\\angle X B C\n$$\n\nand\n\n$$\n\\measuredangle X A C=\\angle X A E=180^{\\circ}-\\measuredangle X D E=\\angle X D B=\\measuredangle X C B\n$$\n\n(8) and (9) imply that $B C$ is tangent to the circumcircles of $\\triangle X A B$ and $\\triangle X A C$ respectively. Let $A X$, the radical axis of the two circumcircles, intersect $B C$ at $Q$. Now we have by power of point\n\n$$\nQ B^{2}=Q X \\cdot Q A=Q C^{2}\n$$\n\ngiving up that $A X$ bisects $B C$. So $X$ is the point on the median from $A$ to side $B C$ such that $\\measuredangle B X C=180-\\measuredangle B A C$. This point is unique and we have proven that it is always on the circumcircle of $A E D F$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## G1", "solution_match": "\n## Solution"}}
14
+ {"year": "2017", "tier": "T1", "problem_label": "G2", "problem_type": "Geometry", "problem": "Let $A B C$ be an acute triangle and $D$ a variable point on side $A C$. Point $E$ is on $B D$ such that $B E=\\frac{B C^{2}-C D \\cdot C A}{B D}$. As $D$ varies on side $A C$ prove that the circumcircle of $A D E$ passes through a fixed point other than $A$.", "solution": "Let the circumcircle of triangle $C E D$ intersect $B C$ at point $G$. From power of point we have\n\n$$\nB G \\cdot B C=B E \\cdot B D .\n$$\n\nCombining (1) with the problem statement we get\n\n$$\n\\frac{B C \\cdot B C}{B D}=B E=\\frac{B C^{2}-C D \\cdot C A}{B D}\n$$\n\nand from here we get\n\n$$\nC D \\cdot C A=B C(B C-B G)=B C \\cdot C G .\n$$\n\n(2) implies that $D, A, B, G$ are concyclic as well. This gives us\n\n$$\n\\angle B E C=\\measuredangle B G D=180^{\\circ}-\\measuredangle B A D=180-\\measuredangle C A B .\n$$\n\nNow let the circumcircle of $A D E$ and $B E C$ intersect again at $X$. Since\n\n$$\n\\angle X C B=\\angle X E B=180^{\\circ}-\\measuredangle X E D=\\angle X A D=\\angle X A C\n$$\n\nand\n\n$$\n\\angle B X C=\\angle B E C=180^{\\circ}-\\angle B A C\n$$\n\nwe have that $X$ is on the unique circle through $A$ and $C$ tangent to side $B C$ at point $C$ and circumcircle of $B H C$ where $H$ is the ortocenter of triangle $A B C$. This intersection is unique and we are done.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\nG2", "solution_match": "\n## Solution"}}
15
+ {"year": "2017", "tier": "T1", "problem_label": "G3", "problem_type": "Geometry", "problem": "Let $A B C$ be a triangle with $A B<A C$ inscribed into a circle $c$. The tangent of $c$ at the point $C$ meets the parallel from $B$ to $A C$ at the point $D$. The tangent of $c$ at the point $B$ meets the parallel from $C$ to $A B$ at the point $E$ and the tangent of $c$ at the point $C$ at the point $L$. Suppose that the circumcircle $c_{1}$ of the triangle $B D C$ meets $A C$ at the point $T$ and the circumcircle $c_{2}$ of the triangle $B E C$ meets $A B$ at the point $S$. Prove that the lines $S T, B C, A L$ are concurrent.", "solution": "We will prove first that the circle $c_{1}$ is tangent to $A B$ at the point $B$. In order to prove this, we have to prove that $\\measuredangle B D C=\\measuredangle A B C$. Indeed, since $B D \\| A C$, we have that $\\measuredangle D B C=\\measuredangle A C B$. Additionally, $\\angle B C D=\\measuredangle B A C$ (by chord and tangent), which means that the triangles $A B C, B D C$ have two equal angles and so the third ones are also equal. It follows that $\\angle B D C=\\measuredangle A B C$, so $c_{1}$ is tangent to $A B$ at the point $B$.\n\nSimilarly, the circle $c_{2}$ is tangent to $A C$ at the point $C$.\nAs a consequence, $\\measuredangle A B T=\\measuredangle A C B$ (by chord and tangent) and also $\\measuredangle B S C=\\measuredangle A C B$.\nBy the above, we have that $\\measuredangle A B T=\\measuredangle B S C$, so the lines $B T, S C$ are parallel.\nNow, let $S T$ intersect $B C$ at the point $K$. It suffice to prove that $K$ belongs to $A L$. From the trapezoid $B T C S$ we get that\n\n$$\n\\frac{B K}{K C}=\\frac{B T}{S C}\n$$\n\nand from the similar triangles $A B T, A S C$, we have that\n\n$$\n\\frac{B T}{S C}=\\frac{A B}{A S}\n$$\n\nBy (1), (2) we get that\n\n$$\n\\frac{B K}{K C}=\\frac{A B}{A S}\n$$\n\nFrom the power of point theorem, we have that\n\n$$\nA C^{2}=A B \\cdot A S \\Rightarrow A S=\\frac{A C^{2}}{A B}\n$$\n\nGoing back into (3), it gives that\n\n$$\n\\frac{B K}{K C}=\\frac{A B^{2}}{A C^{2}}\n$$\n\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-24.jpg?height=1362&width=958&top_left_y=2691&top_left_x=2262)\n\nFrom the last one, it follows that $K$ belongs to the symmedian of the triangle $A B C$.\nFinally, recall that the well known fact that since $L B$ and $L C$ are tangents, it follows that $A L$ is the symmedian of the triangle $A B C$, so $K$ belongs to $A L$, as needed.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## G3", "solution_match": "\n## Solution"}}
16
+ {"year": "2017", "tier": "T1", "problem_label": "G4", "problem_type": "Geometry", "problem": "The acuteangled triangle $A B C$ with circumcenter $O$ is given. The midpoints of the sides $B C$, $C A$ and $A B$ are $D, E$ and $F$ respectivelly. An arbitrary point $M$ on the side $B C$, different of $D$, is choosen. The straight lines $A M$ and $E F$ intersects at the point $N$ and the straight line $O N$ cut again the circumscribed circle of the triangle $O D M$ at the point $P$. Prove that the reflection of the point $M$ with respect to the midpoint of the segment $D P$ belongs on the nine points circle of the triangle $A B C$.", "solution": "The straight lines $D O, E O$ and $F O$ are the perpendicular bisectors of the sides $B C, C A$ and $A B$ respectively. It follows that $[O M]$ is the diameter of the circumscribed circle of the triangle $O D M$ and $M P \\perp O N$. The point $O$ is the ortocenter of the triangle $D E F$ (see the picture)\nLet $O_{1}$ be the circumcenter of the triangle $D E F$ and $H$ be the diametrically opposite point of $D$. The circumscribed circle of the triangle $D E F$ is the nine points circle of the triangle $A B C$. It follows that $E H \\perp D E, F H \\perp F D$ and $E D\\|A F, D F\\| A E$. So, the point $H$ is the ortocenter of the triangle $A E F$.\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-25.jpg?height=2313&width=2556&top_left_y=2071&top_left_x=579)\n\nLet $A D \\cap E F=\\{I\\}$ and $R$ is the reflection of the point N with respect to the point $I$, i.e. $R \\in(E F), N I=R I$. The point $I$ is the simmetry center of the parallelogram $A E D F$. It follows that the point $I$ is the midpoint of the segment $[O H]$ and the quadrilaterals $A E D F$, $A N D R, H N O R$ are all parallelograms.\n\nLet $Q$ be the reflection of the point $M$ with respect to the midpoint of the segment $D P$. It follows that the quadrilaterals $P Q D M$ and $M N R D$ are the parallelograms, which imply that the quadrilateral $P Q R N$ is a parallelogram. So, $N O\\|H R, N P\\| R Q$, which imply that the points $H, R$ and $Q$ are collinear. We obtain that $m(\\angle D Q H)=90^{\\circ}$, i.e. the point $Q$ belongs on the nine points circle of the triangle $A B C$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## G4", "solution_match": "\n## Solution."}}
17
+ {"year": "2017", "tier": "T1", "problem_label": "G5", "problem_type": "Geometry", "problem": "Let $A B C$ be an acute angled triangle with ortocenter $H$, centroid $G$ and circumcircle $\\omega$. Let $D$ and $M$ respectively be the intersection of lines $A H$ and $A G$ with side $B C$. Rays $M H$ and $D G$ interect $\\omega$ again at $P$ and $Q$ respectively. Prove that $P D$ and $Q M$ intersect on $\\omega$.", "solution": "1\n\nNote that it is enough to prove that $\\angle D P A+\\angle M Q A=180^{\\circ}$.\nWithout loss of generality assume that $A B<A C$. Let the reflection of $H$ in point $M$ be $H^{\\prime}$. Since $B H C H^{\\prime}$ is a paralelogram we get\n\n$$\n\\measuredangle B H^{\\prime} C=\\angle B H C=180^{\\circ}-\\measuredangle B A C\n$$\n\nwhich means $H^{\\prime}$ lies on $\\omega$. Also we get\n\n$$\n\\angle A B H^{\\prime}=\\angle A B C+\\angle C B H^{\\prime}=\\angle A B C+\\angle B C H=90^{\\circ}\n$$\n\nsince $C H \\perp A B$. This mean $A H^{\\prime}$ is the diameter of $\\omega$. This means $\\measuredangle M P A=\\angle H^{\\prime} P A=90^{\\circ}$. Since $\\angle M P A=\\angle M D A=90^{\\circ}$ we get that $M, D, P, A$ are concyclic.\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-27.jpg?height=2395&width=2582&top_left_y=2071&top_left_x=540)\n\nThis gives us $\\angle D P A+\\angle A M D=180^{\\circ}$. So now it is enough to prove that $\\measuredangle A M B=\\angle M Q A$.\nTaking the homothety with center $G$ and factor -2 (the homothety taking the 9 point circle to the circumcircle of $A B C$ ), we get that $Q$ and $A$ are images of $D$ and $M$ respectively.\n\nThis means $A Q \\| D M$ giving $A Q \\| B C$. Since $A Q \\| B C$ and $A, B, C, Q$ are concyclic this means $A B C Q$ is an iscoseles trapezoid.\nThis means $M$ lies on the perpendicular bisector of $A Q$. This gives us $M A=M Q$. Since $A Q \\| B C$ this gives us $\\angle A Q M=\\angle Q A M=\\angle A M B$ which concludes our problem.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## G5", "solution_match": "\n## Solution"}}
18
+ {"year": "2017", "tier": "T1", "problem_label": "G5", "problem_type": "Geometry", "problem": "Let $A B C$ be an acute angled triangle with ortocenter $H$, centroid $G$ and circumcircle $\\omega$. Let $D$ and $M$ respectively be the intersection of lines $A H$ and $A G$ with side $B C$. Rays $M H$ and $D G$ interect $\\omega$ again at $P$ and $Q$ respectively. Prove that $P D$ and $Q M$ intersect on $\\omega$.", "solution": "2\n\nWe prove that $M, D, P, A$ are concyclic same as in solution 1. Let $P D$ intersect $\\omega$ again at $S$ We see that this gives us $\\measuredangle S A H^{\\prime}=\\measuredangle S P H^{\\prime}=\\measuredangle D P M=\\measuredangle D A M$. Combining this with $\\measuredangle B A H^{\\prime}=\\measuredangle C A D$ we get:\n\n$$\n\\measuredangle S A H^{\\prime}+\\measuredangle S A B=\\measuredangle H^{\\prime} A B=\\measuredangle C A D=\\measuredangle D A M+\\measuredangle M A C\n$$\n\n## Giving us\n\n$$\n\\measuredangle S A B=\\measuredangle M A C\n$$\n\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-28.jpg?height=2556&width=2251&top_left_y=1804&top_left_x=778)\n\nCombining (*) with $\\angle A S B=\\measuredangle A C B=\\measuredangle A C M$ we get triangles $A S B$ and $A C M$ are similar. This gives us\n\n$$\n\\frac{A B}{A M}=\\frac{S B}{C M} .\n$$\n\nAnalogously we get triangles $A S C$ and $A B M$ are similar. This gives us\n\n$$\n\\frac{A C}{A M}=\\frac{S C}{B M} .\n$$\n\nCombining ( ${ }^{* *}$ ) and ( $\\left.{ }^{(* *}\\right)$ we get\n\n$$\n\\frac{A B}{A C}=\\frac{S B}{S C}\n$$\n\nsince $B M=C M$. Let $S M$ intersect $\\omega$ again at $Q^{\\prime}$. Let $Q^{\\prime} D$ intersect $A M$ at $G^{\\prime}$. We wish to prove that $Q^{\\prime} \\equiv Q$ and $G^{\\prime} \\equiv G$. It is enough to prove that $A G^{\\prime}=2 G^{\\prime} M$.\nSince triangles SMB and $C M Q^{\\prime}$ are similar we get\n\n$$\n\\frac{S B}{S M}=\\frac{C Q}{C M} .\n$$\n\nAnalogously SMC and BMQ' are similar and we get\n\n$$\n\\frac{S M}{S C^{\\prime}}=\\frac{B M}{B Q^{\\prime}} .\n$$\n\nMultiplying (2) and (3) we get $\\frac{S B}{S C}=\\frac{C Q^{\\prime}}{B Q^{\\prime}}$. Combining that with (1) we get\n\n$$\n\\frac{A B}{A C}=\\frac{C Q^{\\prime}}{B Q^{\\prime}} .\n$$\n\nSince $Q^{\\prime}$ and $A$ are on the same side of $B C$ (4) gives us $A Q^{\\prime} \\| B C$. This means that $A B C Q^{\\prime}$ is an isosceles trapezoid.\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-29.jpg?height=2582&width=2111&top_left_y=2319&top_left_x=698)\n\nLet $Q^{\\prime} S$ intersect $A D$ at point $T$. Since $M D \\| A Q^{\\prime}, M A=M Q^{\\prime}$ and $\\angle T A Q^{\\prime}=90^{\\circ}$ we get that $M$ is center of the circumcircle of the right triangle TAQ'.\n\nApplying Menelaus' theorem on $D-G^{\\prime}-Q^{\\prime}$ and triangle $A M T$ we get\n\n$$\n\\frac{A G^{\\prime}}{M G^{\\prime}} \\cdot \\frac{M Q^{\\prime}}{T Q^{\\prime}} \\cdot \\frac{T D}{A D}=1\n$$\n\nSince $M A=M T$ and $M D \\perp A T$ this means\n\n$$\nD A=D T .\n$$\n\nAlso since $M$ is the circumcenter of triangle $T A Q^{\\prime}$ we get\n\n$$\n2 M Q^{\\prime}=T Q^{\\prime} .\n$$\n\nCombining (5) with (6) and (7) we get $2 M G^{\\prime}=A G^{\\prime}$. This gives us $G^{\\prime} \\equiv G$ and $Q^{\\prime} \\equiv Q$, thus proving the problem statement.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## G5", "solution_match": "\n## Solution"}}
19
+ {"year": "2017", "tier": "T1", "problem_label": "G6", "problem_type": "Geometry", "problem": "Construct outside the acute-angled triangle $A B C$ the isosceles triangles $A B A_{B}, A B B_{A}$, $A C A_{C}, A C C_{A}, B C B_{C}$ and $B C C_{B}$, so that\n\n$$\nA B=A B_{A}=B A_{B}, A C=A C_{A}=C A_{C}, B C=B C_{B}=C B_{C}\n$$\n\nand\n\n$$\n\\measuredangle B A B_{A}=\\measuredangle A B A_{B}=\\measuredangle C A C_{A}=\\measuredangle A C A_{C}=\\measuredangle B C B_{C}=\\measuredangle C B C_{B}=\\alpha<90^{\\circ} .\n$$\n\nProve that the perpendiculars from $A$ to $B_{A} C_{A}$, from $B$ to $A_{B} C_{B}$ and from $C$ to $A_{C} B_{C}$ are concurrent.", "solution": "Lemma. If $B C D$ is the isoceles triangle which is outside the triangle $A B C$ and has\n\n$$\n\\measuredangle C B D=\\measuredangle B C D=90^{\\circ}-\\alpha: \\stackrel{\\text { not }}{=} \\beta,\n$$\n\nthen $A D \\perp B_{A} C_{A}$.\nProof of the lemma. Construct an isosceles triangle $A B E$ outside the triangle $A B C$, so that $\\measuredangle A B E=\\measuredangle A E B=\\beta$.\nThen $A E=A B=A B_{A}$ and $\\measuredangle E A B_{A}=\\alpha$, so a rotation of center $A$ and angle $\\alpha$ sends $C_{A}$ to $C$ and $B_{A}$ to $E$, hence $\\Varangle\\left(\\overrightarrow{B_{A} C_{A}}, \\overrightarrow{E C}\\right)=\\alpha$ (the angle between vectors is considered oriented). Also triangles $E B A$ and $B C D$ are similar, so a rotation of center $B$ and angle $\\beta$, followed by\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-31.jpg?height=1113&width=1412&top_left_y=1978&top_left_x=1973)\na dilation of ratio $\\frac{E B}{A B}=\\frac{B C}{B D}$ sends $E$ to $A$ and $C$ to $D$, hence $\\measuredangle(\\overrightarrow{E C}, \\overrightarrow{A D})=\\beta$ (also oriented angle).\nThis shows that\n\n$$\n\\measuredangle\\left(\\overrightarrow{B_{A} C_{A}}, \\overrightarrow{A D}\\right)=\\measuredangle\\left(\\overrightarrow{B_{A} C_{A}}, \\overrightarrow{E C}\\right)+\\measuredangle(\\overrightarrow{E C}, \\overrightarrow{A D})=\\alpha+\\beta=90^{\\circ} .\n$$\n\nReturning to the solution of the problem, denote $A^{\\prime}$ the intersection of $B C$ with the perpendicular from $A$ to $B_{A} C_{A}$. Then $A^{\\prime}$ belongs to the segment $B C$ and\n\n$$\n\\frac{A^{\\prime} B}{A^{\\prime} C}=\\frac{A B \\sin (B+\\beta)}{A C \\sin (C+\\beta)}\n$$\n\nSince similar relations are true for the intersections $B^{\\prime}, C^{\\prime}$ of the other two perpendiculars with the opposite sides, this yields\n\n$$\n\\frac{A^{\\prime} B}{A^{\\prime} C} \\cdot \\frac{B^{\\prime} C}{B^{\\prime} A} \\cdot \\frac{C^{\\prime} A}{C^{\\prime} B}=\\frac{A B \\sin (B+\\beta)}{A C \\sin (C+\\beta)} \\cdot \\frac{B C \\sin (C+\\beta)}{B A \\sin (A+\\beta)} \\cdot \\frac{C A \\sin (A+\\beta)}{C B \\sin (B+\\beta)}=1\n$$\n\nwhence the conclusion.\nRemark. The conditions 'acute-angled' and ' $\\alpha<90^{\\circ}$ ' are not essential, but without them there are cases when $A^{\\prime}$ does not belong to the segment $B C$, or the perpendiculars become parallel.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## G6", "solution_match": "\n## Solution."}}
20
+ {"year": "2017", "tier": "T1", "problem_label": "G7", "problem_type": "Geometry", "problem": "Let $A B C$ be an acute triangle with $A B \\neq A C$ and circumcirle $\\Gamma$. The angle bisector of $B A C$ intersects $B C$ and $\\Gamma$ at $D$ and $E$ respectively. Circle with diameter $D E$ intersects $\\Gamma$ again at $F \\neq E$. Point $P$ is on $A F$ such that $P B=P C$ and $X$ and $Y$ are feet of perpendiculars from $P$ to $A B$ and $A C$ respectively. Let $H$ and $H^{\\prime}$ be the ortocenters of $A B C$ and $A X Y$ respectively. $A H$ meets $\\Gamma$ again at $Q$. If $A H^{\\prime}$ and $H H^{\\prime}$ intersect the circle with diameter $A H$ again at points $S$ and $T$, respectively, prove that the lines $A T, H S$ and $F Q$ are concurrent.", "solution": "WLOG, assume $A B<A C$. Let $M$ be the midpoint of side $B C$ and let the circumcircle of $D F E$ intersect $A F$ again at $K$. Since\n\n$$\n90^{\\circ}+\\measuredangle M E D=180^{\\circ}-\\measuredangle M D E=\\measuredangle A B C+\\frac{\\measuredangle B A C}{2}=\\measuredangle A F E=\\angle D F E+\\angle A F D=90+\\angle A F D\n$$\n\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-32.jpg?height=2489&width=1749&top_left_y=1817&top_left_x=382)\n$\\measuredangle M^{\\prime} C E=\\measuredangle E C P$. From the angle bisector theorem we get\n\n$$\n\\frac{M^{\\prime} E}{P E}=\\frac{C M^{\\prime}}{C P}=\\frac{M^{\\prime} L}{P L}\n$$\n\nMultiplying (1) and (2) we get $\\frac{M E}{L M}=\\frac{M^{\\prime} E}{M^{\\prime} L}$ adding 1 on both sides we get $L M=L M^{\\prime}$ from which it follows that $M \\equiv M^{\\prime}$ and thus $C E$ and $C L$ are the bisectors of $\\measuredangle M C P$.\nNow we have\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-33.jpg?height=2318&width=1811&top_left_y=770&top_left_x=398)\n\nSince $X$ and $Y$ are perpendicular to $A B$ and $A C$ we have $B X P M$ and $C Y P M$ are concyclic. Here we get\n\n$$\n\\angle M Y C=\\angle M P C=90^{\\circ}-\\angle B A C\n$$\n\nand it follows that $Y M \\perp A X$ Similarily we get $X M \\perp A Y$ and so $M$ is the ortocentar of $\\triangle A X Y$ giving us $M \\equiv H^{\\prime}$.\nSince ATHS and ATQF are both concyclic it is enough to prove that $H S F Q$ is concyclic. Since\n\n$$\n\\begin{aligned}\n\\triangle B Q C & =180^{\\circ}-\\angle B A C \\\\\n& =\\angle B H C\n\\end{aligned}\n$$\n\nand $H Q \\perp B C$ it follows that $B C$ is the perpendicular bisector of $H Q$. It is enough to prove that $B C$ is the perpendicular bisector of $S F$. Let $A M$ and $T H$ meet $\\Gamma$ again at points $A^{\\prime}$ and $N$ respec-\ntively. Since $H N$ passes through the midpoint of side $B C$ and\n\n$$\n\\angle B H C=180-\\angle B A C=\\angle B N C\n$$\n\nit follows that $B N C H$ is a paralelogram. From here we get that\n\n$$\n\\angle N C B=\\angle H B C=90^{\\circ}-\\angle A C B\n$$\n\ngiving us $\\measuredangle N C A=90^{\\circ}$ and similarily $\\measuredangle N B A=90^{\\circ}$. This means $A N$ is the diameter of $\\Gamma$, so\n\n$$\n\\begin{aligned}\n\\angle N A^{\\prime} S & =\\angle N A^{\\prime} A=90^{\\circ} \\\\\n& =\\angle H S A=\\angle H S A^{\\prime}\n\\end{aligned}\n$$\n\nand from here we have $H S \\| A^{\\prime} N$. Now since $H S \\| A^{\\prime} N$ and $M$ is the midpoint of $H N$ (because $B H C N$ is a paralelogram) we get\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-33.jpg?height=1777&width=1734&top_left_y=3130&top_left_x=1600)\nthat $H S N A$ is a paralelogram. Since\n\n$$\n\\measuredangle F A E=\\measuredangle E A M=\\measuredangle E A A^{\\prime}\n$$\n\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-34.jpg?height=1661&width=1821&top_left_y=649&top_left_x=403)\nwe get that $F A^{\\prime} B C$ is an isocelese trapezoid which means that $M E$ is the perpendicular bisector of $F A^{\\prime}$ (since it is the perpendicular bisector of $B C$ ).\nThis gives us $B F=C A^{\\prime}=B S$ and $C F=B A^{\\prime}=C S$ giving us that $S B F C$ is a deltoid, meaning that $B C$ is the perpendicular bisector of FS. This means that $H S F Q$ is an isoceles trapezoid. Now from the radical axis theorem of the circumcircles of HSFQ, HSAT and $A T Q F$ we get that $Q F$,\n$H S, A T$ are concurrent.\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-34.jpg?height=2499&width=2117&top_left_y=2381&top_left_x=819)", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\nG7", "solution_match": "\n## Solution"}}
21
+ {"year": "2017", "tier": "T1", "problem_label": "G8", "problem_type": "Geometry", "problem": "Given an acute triangle $\\triangle A B C(A C \\neq A B)$ and let $(C)$ be its circumcircle. The excircle $\\left(C_{1}\\right)$ corresponding to the vertex $A$, of center $I_{a}$, tangents to the side $B C$ at the point $D$ and to the extensions of the sides $A B, A C$ at the points $E, Z$ respectively. Let $I$ and $L$ are the intersection points of the circles $(C)$ and $\\left(C_{1}\\right), H$ the orthocenter of the triangle $\\triangle E D Z$ and $N$ the midpoint of segment $E Z$. The parallel line through the point $I_{a}$ to the line $H L$ meets the line $H I$ at the point $G$. Prove that the perpendicular line ( $e$ ) through the point $N$ to the to the line $B C$ and the parallel line $(\\delta)$ through the point $G$ to the line $I L$ meet each other on the line $\\mathrm{HI}_{a}$", "solution": "![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-35.jpg?height=2527&width=2264&top_left_y=1669&top_left_x=875)\n\nWe have $(e) \\perp B C$ and $I_{a} D \\perp B C$, so $(e) \\| I_{a} D$. Let $T$. $S$ be the midpoints of the segments $H I_{a}, H D$ respectively and $Y$ the point of intersection of the lines $H D, E Z$ Then, $T S \\| I_{a} D$. $T S \\perp B C$ and $S Y \\perp E Z$\nThe Euler circle ( $\\omega$ ) of the triangle EDZ passes through the points $N, Y, S$. Therefore, the segment $S N$ is a diameter of the circle $(\\omega)$. Thus, the center of $(\\omega)$, let $T^{\\prime}$, is the midpoint of the segment $S N$\n\nOn the other hand, we know that the center of Euler circle ( $\\omega$ ) is the midpoint $T$ of $\\mathrm{HI}_{a}$. So $T \\equiv T^{\\prime}$. Therefore, the line ( $e$ ) passes through the points $T, S$.\nTherefore, we get that the quadrilateral $H S I_{a} N$ is parallelogram and its diagonals meet each other at the point $T$.\nWe consider the inversion $I\\left(I_{a}, I_{a} Z^{2}\\right)$. As $I_{a} Z^{2}=I_{a} A \\cdot I_{a} N$ we have $I(N)=A$. Similarly, if $M_{1}, M_{2}$ the midpoints of the segments $D E, D Z$ respectively, we get. $I\\left(M_{1}\\right)=B$ and $I\\left(M_{2}\\right)=C$.\nTherefore, the circumcircle ( $C$ ) of the triangle $A B C$ is the image of the circle ( $\\omega$ ) under the inversion $I$ and the points of the intersection of the circles and ( $\\omega$ ) are invariant under this inversion. But it is well known that the circle of inversion passes through the points of the intersection of the circles $(C)$ and ( $\\omega$ ). Thus, the Euler circle ( $\\omega$ ) passes through the points I,L.\n\nAlso, we consider the inversion $J\\left(H, r^{2}\\right)$ with\n\n$$\nr^{2}=H X \\cdot H Z=H D \\cdot H Y=H W \\cdot H E\n$$\n\nwhere $X, W, Y$ the traces of the altitudes of the triangle $E D Z$ on its sides. Then, $J(Z)=X$, $J(D)=Y$ and $J(E)=W$. Therefore, the circumcircle $\\left(C_{1}\\right)$ of the triangle $A B C$ is the image of the circle $(\\omega)$ under the inversion $J$. Thus, the circle of inversion $J$ passes through the points $I, L$.\nWe conclude that $H I=H L$ and $H I_{a} \\perp I L$ and since $(\\delta) \\| I L$, we have $H I_{a} \\perp(\\delta)$.\nIf, $R$ is the point of intersection of the lines $(\\delta), H L$, we get that quadrilateral $H R I_{a} G$ is parallelogram and its diagonals meet each other at the point $T$. So, the perpendicular line (e) through the point $N$ to the to the line $B C$ and the parallel line $(\\delta)$ through the point $G$ to the line $I L$, meet each other on the line $H I_{a}$.\n\n## COMBINATORICS", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\nG8", "solution_match": "\n## Solution"}}
22
+ {"year": "2017", "tier": "T1", "problem_label": "C1", "problem_type": "Combinatorics", "problem": "A grasshopper is sitting at an integer point in the Euclidean plane. Each second it jumps to another integer point in such a way that the jump vector is constant. A hunter that knows neither the starting point of the grasshopper nor the jump vector (but knows that the jump vector for each second is constant) wants to catch the grasshopper. Each second the hunter can choose one integer point in the plane and, if the grasshopper is there, he catches it. Can the hunter always catch the grasshopper in a finite amount of time?", "solution": "The hunter can catch the grasshopper. Here is the strategy for him. Let $f$ be any bijection between the set of positive integers and the set $\\{((x, y),(u, v)): x, y, u, v \\in \\mathbb{Z}\\}$, and denote\n\n$$\nf(t)=\\left(\\left(x_{t}, y_{t}\\right),\\left(u_{t}, v_{t}\\right)\\right) .\n$$\n\nIn the second $t$, the hunter should hunt at the point $\\left(x_{t}+t u_{t}, y_{t}+t v_{t}\\right)$. Let us show that this strategy indeed works.\nAssume that the grasshopper starts at the point ( $x^{\\prime}, y^{\\prime}$ ) and that the jump vector is ( $u^{\\prime}, v^{\\prime}$ ). Then in the second $t$ the grasshopper is at the point $\\left(x^{\\prime}+t u^{\\prime}, y^{\\prime}+t v^{\\prime}\\right)$. Let\n\n$$\nt^{\\prime}=f^{-1}\\left(\\left(x^{\\prime}, y^{\\prime}\\right),\\left(u^{\\prime}, v^{\\prime}\\right)\\right)\n$$\n\nThe hunter's strategy dictates that in the second $t^{\\prime}$ he searches for the grasshopper at the point $\\left(x_{t^{\\prime}}+t^{\\prime} u_{t^{\\prime}}, y_{t^{\\prime}}+t^{\\prime} v_{t^{\\prime}}\\right)$, which is actually $\\left(x^{\\prime}+t^{\\prime} u^{\\prime}, y^{\\prime}+t^{\\prime} v^{\\prime}\\right)$, and this is precisely the point where the grasshopper is in the second $t^{\\prime}$. This completes the proof.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## C1", "solution_match": "\n## Solution"}}
23
+ {"year": "2017", "tier": "T1", "problem_label": "C2", "problem_type": "Combinatorics", "problem": "Let $n, a, b, c$ be natural numbers. Every point on the coordinate plane with integer coordinates is colored in one of $n$ colors. Prove there exists $c$ triangles whose vertices are colored in the same color, which are pairwise congruent, and which have a side whose lenght is divisible by $a$ and a side whose lenght is divisible by $b$.", "solution": "Let the colors be $d_{1}, d_{2}, d_{3} \\ldots, d_{n}$. Look at the coordinates\n\n$$\n(k, 0+(n+1) a b r),(k, a b+(n+1) a b r),(k, 2 a b+(n+1) a b r), \\ldots,(k, n a b+(n+1) a b r)\n$$\n\nfor integers $k$ and $r$. By the pigeonhole principle there are two points of the same color. For every pair ( $k, r$ ) we say the color $d_{i}$ is $(k, r)$-good if at least two coordinates\n\n$$\n(k, 0+(n+1) a b r),(k, a b+(n+1) a b r),(k, 2 a b+(n+1) a b r), \\ldots,(k, n a b+(n+1) a b r)\n$$\n\nare colored by color $d_{i}$. Fixing $r$ and taking $k=0, a b, 2 a b, \\ldots, n^{2} a b$ get that some color, say $d_{1}$, was $(k, r)$-good for at least $n+1$.\nAmong the $n+1$ pairs $(x, y)$ there exists two which share the same $x$ cordinate. We call such quadruple $r$-great. In every $r$-great quadruple there are two triangle whose vertecies are all the same color and whose two sides are divisible by $a b$. Taking\n\n$$\nr=0.1,2, \\ldots, n\\left(c\\left(\\left(^{(n+1)\\left(n^{2}+1\\right)} 3{ }^{3}\\right)+1\\right)+1\\right)+1\n$$\n\nwe get that there is one color which is in a $r$-great quadruple for at least\n\n$$\nc\\left(\\left(^{(n+1)\\left(n^{2}+1\\right)} 3-1\\right)+1\\right.\n$$\n\ndifferent values of $r$. Let this color be $d_{1}$. Since there are less than $\\binom{\\left.(n+1) n^{2}+1\\right)}{3}$ possible triangles in any $r$-great quadruple (among $c\\left(\\left(^{(n+1)\\left(n^{2}+1\\right)}\\right)+1\\right)+1 \\quad r$-great quadruples with the color $d_{1}$ ) we get that there are $c+1$ triangles which are the same and the same color $d_{1}$ and with two sides divisible by $a b$. This concludes the problem.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\nC2", "solution_match": "\n## Solution"}}
24
+ {"year": "2017", "tier": "T1", "problem_label": "C3", "problem_type": "Combinatorics", "problem": "Let $n \\geq 4$ points in the plane, no three of them are collinear. Prove that the number of parallelograms of area 1 , formed by these points, is at most $\\frac{n^{2}-3 n}{4}$.", "solution": "Fix a direction in the plane. We cannot have three points in the same line parallel to the direction so suppose that in that direction there are $k$ pairs of points, each pair belonging to a parallel line to the fixed direction. Then there are at most $k-1$ parallelograms of area 1 formed by these $k$ pairs of points.\nSumming over all directions we get that the number of parallelograms of area 1 are at most $\\binom{n}{2}-s$ where $s$ is the number of different directions. But in that way we count every parallelogram two times, so the that the number of parallelograms of area 1 is at most $\\frac{\\binom{n}{2}-s}{2}$. We will prove that $s \\geq n$. Indeed, taking the convex hull of the $n$ points, let $x$ be a point on the boundary of the convex hull. Because the convex hull has at least three points on its boundary, we can take two points which are neighbors of $x$ in the convex hull, say $y, z$ these points. Then every segment starting from $x$ has different direction from $y z$. So we have at least $n-1+1=n$ different directions. So the number of parallelograms is at most $\\frac{\\binom{n}{2}-n}{2}=\\frac{n^{2}-3 n}{4}$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\nC3", "solution_match": "\n## Solution"}}
25
+ {"year": "2017", "tier": "T1", "problem_label": "C4", "problem_type": "Combinatorics", "problem": "For any set of points $A_{1}, A_{2}, \\ldots, A_{n}$ on the plane, one defines $r\\left(A_{1}, A_{2}, \\ldots, A_{n}\\right)$ as the radius of the smallest circle that contains all of these points. Prove that if $n \\geq 3$, there are indices $i, j, k$ such that\n\n$$\nr\\left(A_{1}, A_{2}, \\ldots, A_{n}\\right)=r\\left(A_{1}, A_{,}, A_{k}\\right)\n$$", "solution": "We start with a lemma.\nLemma. If the triangle $A B C$ is acute, $r(A, B, C)$ is its circumradius and if it is obtuse. $r(A, B, C)$ is half the length of its longest side.\n\n## Proof.\n\nLet us do the acute case first. The circumcircle contains the vertices, so $r(A, B, C)$ is not greater than the circumradius. Now, let us prove that no smaller circle contains all three vertices. If there is a smaller circle, let its center be $P$. Further, let the circumcenter be $O$\n\nSince $A B C$ is acute, $O$ is in the interior. Consider the line that passes through $O$ and is parallel to $B C$. Let us call it $l_{A}$ and define $l_{B}$ and $l_{C}$. similarly. Now, consider the set of points that are on the opposite side of $I_{A}$ with respect to\n$A$. Call this set $S_{A}$ and define $S_{B}$ and\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-40.jpg?height=1470&width=1548&top_left_y=1644&top_left_x=1750)\n$S_{C}$ similarly. It is easily seen (by geometry) that $S_{A} \\cap S_{B} \\cap S_{C} \\cdot=\\varnothing$. As such, assume $P \\notin S_{A}$ without loss of generality. That is to say, $P$ is on the same side of $I_{A}$ as $A$. Now. consider the perpendicular bisector of $B C$ and assume that $P$, w.lo.g, is on the same side of this line as $C$. Under these circumstances, $|P B| \\geqslant|O B|$. Thus, the smaller circle centered at $P$ must exclude $B$.\nIn the obtuse case, let $\\measuredangle B A C \\geq 90^{\\circ}$. Then $B C$ is the longest side. The circle with diameter $B C$ contains all three vertices. Therefore. $r(A, B, C)$ is not greater than $\\frac{1}{2}|B C|$. But any smaller circle will clearly exclude at least one of $B$ and $C$.\nNow, let us return to the original problem. Note that there must be points $A, B, C$ among $A_{1}, A_{2}, \\ldots, A_{n}$ such that the circumcircle of $A B C$ contains all $n$ points. One can see this as follows: First start with a large circle that contains all $n$ points. Then shrink it while keeping the center fixed, until one of the $n$ points is on the circle and call this point $A$. Then shrink it keeping the point $A$ in place and moving the center closer to $A$. until another point $B$ is on the circle. Then keep the line $A B$ fixed while moving the center toward it or away from it so\nthat another $C$ among the $n$ points appears on the circle. It is easy to see that this procedure is doable.\nConsider all such triples $A, B, C$ such that the circumcircle of $A B C$ contains all of $A_{1}, A_{2}, \\ldots, A_{n}$. Now choose the one among them with the smallest circumradius and let it be $A_{i}, A_{j}, A_{k}$. If $A_{i} A_{j} A_{k}$ is an acute triangle, any smaller circle will exclude one of $A_{1}, A_{j}, A_{k}$ by the lemma above. Therefore,\n\n$$\nr\\left(A_{1}, A_{2}, \\ldots, A_{n}\\right)=\\text { circumradius of } A_{i} A_{j} A_{k}=r\\left(A_{i}, A_{j}, A_{k}\\right)\n$$\n\nIf $A_{i} A_{j} A_{k}$ is an obtuse triangle, let $A_{l}$ be its obtuse angle. We wish to prove that the circle with diameter $A_{j} A_{k}$ contains all $n$ points. This will mean that\n\n$$\nr\\left(A_{1}, A_{2}, \\ldots, A_{n}\\right)=\\frac{1}{2}\\left|A_{j} A_{k}\\right|=r\\left(A_{i}, A_{j}, A_{k}\\right)\n$$\n\nand we will be done. If there are no points on the opposite side of $A_{j} A_{k}$ w.r.t. $A_{i}$, then this assertion is clear. If there are some points on that side, choose the one $X$ such that $\\measuredangle A_{j} X A_{k}$ is smallest possible. Then the circumcircle of $A_{j} X A_{k}$ contains all $n$ points. However, by the choice of $A_{i}$, the circumradius of $A_{j} X A_{k}$ cannot be less than that of $A_{i} A_{j} A_{k}$. Thus, $\\measuredangle A_{j} X A_{k} \\geq \\measuredangle A_{j} A_{i} A_{k} \\geq 90^{\\circ}$. As such, the circle with diameter $A_{j} A_{k}$ contains all $n$ points.\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-41.jpg?height=1289&width=1641&top_left_y=2386&top_left_x=1062)\n\nFigure 1: The circumcircles of $A_{i} A_{j} A_{k}$ and $A_{j} X A_{k}$ as well as the circle with diameter $A_{j} A_{k}$ are shown.\n\nRemark. The problem selection committee recommended formulation of the task to improve.\n\n## C 5\n\nWe have $n$ students sitting at a round table. Initially each student is given one candy. At each step each student having candies either picks one of its candies and gives it to one of its neighbouring students, or distributes all of its candies to its neighbouring students in any way he wishes. A distribution of candies is called legal if it can be reached from the initial distribution via a sequence of steps.\nDetermine the number of legal distributions. (All the candies are udentical.)", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## C4", "solution_match": "\n## Solution."}}
26
+ {"year": "2017", "tier": "T1", "problem_label": "C4", "problem_type": "Combinatorics", "problem": "For any set of points $A_{1}, A_{2}, \\ldots, A_{n}$ on the plane, one defines $r\\left(A_{1}, A_{2}, \\ldots, A_{n}\\right)$ as the radius of the smallest circle that contains all of these points. Prove that if $n \\geq 3$, there are indices $i, j, k$ such that\n\n$$\nr\\left(A_{1}, A_{2}, \\ldots, A_{n}\\right)=r\\left(A_{1}, A_{,}, A_{k}\\right)\n$$", "solution": "The answer turns out to be $\\binom{2 n-1}{n}$ if $n$ is odd and $\\binom{2 n-1}{n}-2\\left(\\begin{array}{c}\\frac{3 n}{2}-1\\end{array}\\right)$ if $n$ is even.\nCase 1. Suppose $n$ is odd, say $n=2 m+1$. In this case we will show that any distribution of candies is legal. Thus the number of legal distributions is indeed ( $\\left.\\begin{array}{c}2 n-1 \\\\ n\\end{array}\\right)$.\nIn this case we can achieve the above claim by letting each student to always distribute all of its candies to its two neighbouring students in some way. Thus at each step each candy will move either one position clockwise or one anticlockwise.\nWe now look at the initial distribution of candies and the required final distribution. We specify arbitrarily for each candy in the initial distribution, the position we wish this candy to end up in the required final distribution. Because $n$ is odd, either the clockwise distance or the anticlockwise distance between the initial position of the candy and the required final position is even and at most $m$.\nThus after an even number of steps (at most $m$ ) we can move each candy to its required final position. (Note that if the candy reaches the required position earlier. we can move it back and forth until all candies reach their required position.) This completes the proof of our claim in this case.\nCase 2. Suppose $n$ is even, say $n=2 m$. Let $x_{1} \\ldots \\ldots x_{2 m}$ be the students in this cyclic order. Observe that initially the students with even indices (even students) have at least one candy in total, and so do the students with odd indices (odd students). This property is preserved after each step.\nWe will show that every distribution in which the even students have at least one candy in total and the odd students also have at least one candy in total is legal.\nLet us suppose that the required final distribution has $a$ candies in odd positions and $b$ candies in even positions. (Where $a, b \\geq 1$.) It will be enough to reach any position with $a$ candies in even positions and $b$ candies in odd positions as then we can follow the same approach as in Case 1.\nTo achieve this we will first move all candies to students $x_{1}$ and $x_{2}$. This is easy by specifying that at each step $x_{1}$ moves all of its candies to $x_{2}$ while for $1 \\leq r \\leq 2 m-1$ student $x_{r+1}$ moves all of its candies to $x_{r}$.\nSuppose that we now have $a+k$ candies at $x_{1}$ and $b-k$ candies at $x_{2}$ where without loss of generality $k \\geq 0$. If $k=0$ we have reached our target. If not, in the next step $x_{1}$ moves a candy to $x_{2}$ and $x_{2}$ moves a candy to $x_{3}$. In the next step $x_{1}$ (it still has $a+k-1 \\geq a>0$\ncandies) moves a candy to $x_{2}, x_{2}$ moves a candy to $x_{1}$ and $x_{3}$ moves a candy to $x_{2}$. We now have $a+k-1$ candies in $x_{1}$ and $b+1-k$ in $x_{2}$. Repeating this process another $k-1$ times we end up with $a$ candies in $x_{1}$ and $b$ candies in $x_{2}$ as required.\nIt remains to count the total number of legal configurations in this case. This is indeed equal to\n\n$$\n\\binom{2 n-1}{n}-2\\binom{\\frac{3 n}{2}-1}{n}\n$$\n\nas $\\binom{2 n-1}{n}$ counts the total number of configurations while $\\binom{\\frac{3 n}{2}-1}{n}$ counts the number of illegal configurations where either all $n$ candies belong to the $\\frac{n}{2}$ odd positions or all $n$ candies belong to the $\\frac{n}{2}$ even positions.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\n## C4", "solution_match": "\n## Solution"}}
27
+ {"year": "2017", "tier": "T1", "problem_label": "C6", "problem_type": "Combinatorics", "problem": "What is the least positive integer $k$ such that, in every convex 101 -gon, the sum of any $k$ diagonals is greater than or equal to the sum of the remaining diagonals?", "solution": "Let $P Q=1$. Consider a convex 101 -gon such that one of its vertices is at $P$ and the remaining 100 vertices are within $\\varepsilon$ of $Q$ where $\\varepsilon$ is an arbitrarily small positive real. Let $k+l$ equal the total number $\\frac{101.98}{2}=4949$ of diagonals. When $k \\leq 4851$. the sum of the $k$ shortest diagonals is arbitrarily small. When $k \\geq 4851$, the sum of the $k$ shortest diagonals is arbitrarily close to $k-4851=98-l$ and the sum of the remaining diagonals is arbitrarily close to $l$. Therefore, we need to have $l \\leq 49$ and $k \\geq 4900$.\nWe proceed to show that $k=4900$ works. To this end, colour all $l=49$ remaining diagonals green. To each green diagonal $A B$, apart from, possibly, the last one, we will assign two red diagonals $A C$ and $C B$ so that no green diagonal is ever coloured red and no diagonal is coloured red twice.\nSuppose that we have already done this for $0 \\leq i \\leq 48$ green diagonals (thus forming $i$ red-red-green triangles) and let $A B$ be up next. Let $D$ be the set of all diagonals emanating from $A$ or $B$ and distinct from $A B$ : we have $|D|=2 \\cdot 97=194$. Every red-red-green triangle formed thus far has at most two sides in $D$. Therefore, the subset $E$ of all as-of-yetuncoloured diagonals in $D$ contains at least 194-2i elements.\nWhen $i \\leq 47,194-2 i \\geq 100$. The total number of endpoints distinct from $A$ and $B$ of diagonals in $D$. however, is 99 . Therefore, two diagonals in $E$ have a common endpoint $C$ and we can assign $A C$ and $C B$ to $A B$. as needed.\nThe case $i=48$ is slightly more tricky: this time, it is possible that no two diagonals in $E$ have a common endpoint other than $A$ and $B$. but, if so, then there are two diagonals in $E$ that intersect in a point interior to both. Otherwise, at least one (say, $a$ ) of the two vertices adjacent to $A$ is cut off from $B$ by the diagonals emanating from $A$ and at least one (say, $b$ ) of the two vertices adjacent to $B$ is cut off from $A$ by the diagonals emanating from $B$ (and $a \\neq b$ ). This leaves us with at most 97 suitable endpoints and at least 98 diagonals in $E$. a contradiction.\nBy the triangle inequality, this completes the solution.\n\n## $\\mathbb{O}_{1}^{2}$ $R_{1}$\n\n## Union of Mathematicians of Macedonia\n\nSponsored by\n![](https://cdn.mathpix.com/cropped/2024_12_07_5ed02c65c310265e18a7g-48.jpg?height=229&width=519&top_left_y=4473&top_left_x=1530)\n\nHomisinan", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2017_bmo_shortlist.jsonl", "problem_match": "\nC6", "solution_match": "\n## Solution"}}
Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"year": "2018", "tier": "T1", "problem_label": "A1", "problem_type": "Algebra", "problem": "Let $a, b, c$ be positive real numbers such that $a b c=\\frac{2}{3}$. Prove that\n\n$$\n\\frac{a b}{a+b}+\\frac{b c}{b+c}+\\frac{c a}{c+a} \\geqslant \\frac{a+b+c}{a^{3}+b^{3}+c^{3}}\n$$\n\n(FYR Macedonia)", "solution": "By the AH mean inequality, we have\n\n$$\n\\frac{a b}{a+b}+\\frac{b c}{b+c}+\\frac{c a}{c+a}=\\frac{2}{3(a c+b c)}+\\frac{2}{3(a b+a c)}+\\frac{2}{3(a b+a c)} \\geqslant \\frac{3}{a b+a c+b c}\n$$\n\nso it only remains to prove that $\\frac{3}{a b+a c+b c} \\geqslant \\frac{a+b+c}{a^{3}+b^{3}+c^{3}}$, or equivalently\n\n$$\n3\\left(a^{3}+b^{3}+c^{3}\\right) \\geqslant(a+b+c)(a b+a c+b c)\n$$\n\nThe last inequality easily follows by summing $a^{3}+b^{3} \\geqslant a b(a+b), a^{3}+c^{3} \\geqslant a c(a+c)$, $b^{3}+c^{3} \\geqslant b c(b+c)$ and $a^{3}+b^{3}+c^{3} \\geqslant 3 a b c$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nA1.", "solution_match": "\n## Solution."}}
2
+ {"year": "2018", "tier": "T1", "problem_label": "A2", "problem_type": "Algebra", "problem": "Two ants start at the same point in the plane. Each minute they choose whether to walk due north, east, south or west. They each walk 1 meter in the first minute. In each subsequent minute the distance they walk is multiplied by a rational number $q>0$. They meet after a whole number of minutes, but have not taken exactly the same route within that time. Determine all possible values of $q$.\n(United Kingdom)", "solution": "Answer: $q=1$.\nLet $x_{A}^{(n)}$ (resp. $x_{B}^{(n)}$ ) be the $x$-coordinates of the first (resp. second) ant's position after $n$ minutes. Then $x_{A}^{(n)}-x_{A}^{(n-1)} \\in\\left\\{q^{n},-q^{n}, 0\\right\\}$, and so $x_{A}^{(n)}, x_{B}^{(n)}$ are given by polynomials in $q$ with coefficients in $\\{-1,0,1\\}$. So if the ants meet after $n$ minutes, then\n\n$$\n0=x_{A}^{(n)}-x_{B}^{(n)}=P(q)\n$$\n\nwhere $P$ is a polynomial with degree at most $n$ and coefficients in $\\{-2,-, 1,0,1,2\\}$. Thus if $q=\\frac{a}{b}(a, b \\in \\mathbb{N})$, we have $a \\mid 2$ and $b \\mid 2$, i.e. $q \\in\\left\\{\\frac{1}{2}, 1,2\\right\\}$.\nIt is clearly possible when $q=1$.\nWe argue that $q=\\frac{1}{2}$ is not possible. Assume that the ants diverge for the first time after the $k$ th minute, for $k \\geqslant 0$. Then\n\n$$\n\\left|x_{B}^{(k+1)}-x_{A}^{(k+1)}\\right|+\\left|y_{B}^{(k+1)}-y_{A}^{(k+1)}\\right|=2 q^{k}\n$$\n\nBut also $\\left|x_{A}^{(\\ell+1)}-x_{A}^{(\\ell)}\\right|+\\left|y_{A}^{(\\ell+1)}-y_{A}^{(\\ell)}\\right|=q^{\\ell}$ for each $l \\geqslant k+1$, and so\n\n$$\n\\left|x_{A}^{(n)}-x_{A}^{(k+1)}\\right|+\\left|y_{A}^{(n)}-y_{A}^{(k+1)}\\right| \\leqslant q^{k+1}+q^{k+2}+\\ldots+q^{n-1}\n$$\n\nand similarly for the second ant. Combining (1) and (2) with the triangle inequality, we obtain for any $n \\geqslant k+1$\n\n$$\n\\left|x_{B}^{(n)}-x_{A}^{(n)}\\right|+\\left|y_{B}^{(n)}-y_{A}^{(n)}\\right| \\geqslant 2 q^{k}-2\\left(q^{k+1}+q^{k+2}+\\ldots+q^{n-1}\\right),\n$$\n\nwhich is strictly positive for $q=\\frac{1}{2}$. So for any $n \\geqslant k+1$, the ants cannot meet after $n$ minutes. Thus $q \\neq \\frac{1}{2}$.\nFinally, we show that $q=2$ is also not possible. Suppose to the contrary that there is a pair of routes for $q=2$, meeting after $n$ minutes. Now consider rescaling the plane by a factor $2^{-n}$, and looking at the routes in the opposite direction. This would then be an example for $q=1 / 2$ and we have just shown that this is not possible.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nA2.", "solution_match": "\n## Solution."}}
3
+ {"year": "2018", "tier": "T1", "problem_label": "A2", "problem_type": "Algebra", "problem": "Two ants start at the same point in the plane. Each minute they choose whether to walk due north, east, south or west. They each walk 1 meter in the first minute. In each subsequent minute the distance they walk is multiplied by a rational number $q>0$. They meet after a whole number of minutes, but have not taken exactly the same route within that time. Determine all possible values of $q$.\n(United Kingdom)", "solution": "2.\n\nConsider the ants' positions $\\alpha_{k}$ and $\\beta_{k}$ after $k$ steps in the complex plane, assuming that their initial positions are at the origin and that all steps are parallel to one of the axes. We have $\\alpha_{k+1}-\\alpha_{k}=a_{k} q^{k}$ and $\\beta_{k+1}-\\beta_{k}=b_{k} q^{k}$ with $a_{k}, b_{k} \\in\\{1,-1, i,-i\\}$. If $\\alpha_{n}=\\beta_{n}$ for some $n>0$, then\n\n$$\n\\sum_{k=0}^{n-1}\\left(a_{k}-b_{k}\\right) q^{k}=0, \\quad \\text { where } \\quad a_{k}-b_{k} \\in\\{0, \\pm 1 \\pm i, \\pm 2, \\pm 2 i\\}\n$$\n\nNote that the coefficient $a_{k}-b_{k}$ is always divisible by $1+i$ in Gaussian integers: indeed,\n\n$$\nc_{k}=\\frac{a_{k}-b_{k}}{1+i} \\in\\{0, \\pm 1, \\pm i, \\pm 1 \\pm i\\}\n$$\n\nCanceling $1+i$, we obtain $c_{0}+c_{1} q+\\cdots+c_{n-1} q^{n-1}=0$. Therefore if $q=\\frac{a}{b}(a, b \\in \\mathbb{N})$, we have $a \\mid c_{0}$ and $b \\mid c_{n-1}$ in Gaussian integers, which is only possible if $a=b=1$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nA2.", "solution_match": "\n## Solution"}}
4
+ {"year": "2018", "tier": "T1", "problem_label": "A3", "problem_type": "Algebra", "problem": "Show that for every positive integer $n$ we have:\n\n$$\n\\sum_{k=0}^{n}\\left(\\frac{2 n+1-k}{k+1}\\right)^{k}=\\left(\\frac{2 n+1}{1}\\right)^{0}+\\left(\\frac{2 n}{2}\\right)^{1}+\\cdots+\\left(\\frac{n+1}{n+1}\\right)^{n} \\leqslant 2^{n}\n$$", "solution": "We shall prove that\n\n$$\n\\binom{n}{k} \\geqslant\\left(\\frac{2 n+1-k}{k+1}\\right)^{k} \\quad \\text { for all } \\quad k=0,1, \\ldots, n\n$$\n\nThe result will follow immediately, as $\\sum_{k=0}^{n}\\binom{n}{k}=2^{n}$.\nNote that $(*)$ is trivial for $k=0$ and $k=n$. For $0<k<n$, by Hölder's inequality we have\n\n$$\n\\binom{n}{k}=\\left(1+\\frac{n-k}{k}\\right) \\cdot\\left(1+\\frac{n-k}{k-1}\\right) \\cdots\\left(1+\\frac{n-k}{1}\\right) \\geqslant\\left(1+\\frac{n-k}{\\sqrt[k]{k!}}\\right)^{k} .\n$$\n\nHence, it is enough to prove that\n\n$$\n1+\\frac{n-k}{\\sqrt[k]{k!}} \\geqslant \\frac{2 n+1-k}{k+1}\n$$\n\nThis is equivalent to $\\sqrt[k]{k!} \\leqslant \\frac{k+1}{2}$, which follows from $\\sqrt[k]{k!} \\leqslant \\frac{1+2+\\cdots+k}{k}=\\frac{k+1}{2}$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nA3.", "solution_match": "\n## Solution."}}
5
+ {"year": "2018", "tier": "T1", "problem_label": "A3", "problem_type": "Algebra", "problem": "Show that for every positive integer $n$ we have:\n\n$$\n\\sum_{k=0}^{n}\\left(\\frac{2 n+1-k}{k+1}\\right)^{k}=\\left(\\frac{2 n+1}{1}\\right)^{0}+\\left(\\frac{2 n}{2}\\right)^{1}+\\cdots+\\left(\\frac{n+1}{n+1}\\right)^{n} \\leqslant 2^{n}\n$$", "solution": "2.\n\nAs in the previous solution, it is enough to prove (*).\nFirst, we prove that\n\n$$\n(n-i+1)(n-k+i)(k+1)^{2} \\geqslant i(k-i+1)(2 n+1-k)^{2} \\quad \\text { for all } i=1,2, \\ldots, k\n$$\n\nLet us denote the left hand side of the previous inequality with $L$ and the left hand side with $R$. Then\n\n$$\n\\begin{aligned}\n& L=(n+1)^{2}(k+1)^{2}-(n+1)(k+1)^{3}+i(k-i+1)(k+1)^{2} \\\\\n& R=4 i(k-i+1)(n+1)^{2}-4 i(k-i+1)(n+1)(k+1)+i(k-i+1)(k+1)^{2}\n\\end{aligned}\n$$\n\nSo, it is enough to prove that\n\n$$\n(n-k)(k+1)^{2} \\geqslant 4 i(k-i+1)(n-k),\n$$\n\nwhich follows from\n\n$$\n(k+1)^{2}-4 i(k-i+1)=(k+1-2 i)^{2} \\geqslant 0 .\n$$\n\nNow, by ( $\\#$ ) we have\n\n$$\n\\binom{n}{k}^{2}=\\prod_{i=1}^{k} \\frac{(n-i+1)(n-k+i)}{i(k-i+1)} \\geqslant \\prod_{i=1}^{k}\\left(\\frac{2 n+1-k}{k+1}\\right)^{2}=\\left(\\frac{2 n+1-k}{k+1}\\right)^{2 k}\n$$\n\nwhich completes our proof.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nA3.", "solution_match": "\n## Solution"}}
6
+ {"year": "2018", "tier": "T1", "problem_label": "A4", "problem_type": "Algebra", "problem": "Let $a, b, c$ be positive real numbers such that $a b c=1$. Prove that the following inequality holds:\n\n$$\n2\\left(a^{2}+b^{2}+c^{2}\\right)\\left(\\frac{1}{a^{2}}+\\frac{1}{b^{2}}+\\frac{1}{c^{2}}\\right) \\geqslant 3(a+b+c+a b+b c+c a)\n$$\n\n(Romania)", "solution": "First, we show that\n\n$$\n\\frac{a}{b}+\\frac{b}{c}+\\frac{c}{a} \\geqslant a b+b c+c a \\quad \\text { and } \\quad \\frac{a}{b}+\\frac{b}{c}+\\frac{c}{a} \\geqslant a+b+c\n$$\n\nBy AG inequality, we have\n\n$$\n\\begin{aligned}\n\\frac{a}{b}+\\frac{b}{c}+\\frac{c}{a} & =\\frac{1}{3}\\left(\\frac{a}{b}+\\frac{a}{b}+\\frac{c}{a}\\right)+\\frac{1}{3}\\left(\\frac{b}{c}+\\frac{b}{c}+\\frac{a}{b}\\right)+\\frac{1}{3}\\left(\\frac{c}{a}+\\frac{c}{a}+\\frac{b}{c}\\right) \\\\\n& \\geqslant \\frac{\\sqrt[3]{a c}}{\\sqrt[3]{b^{2}}}+\\frac{\\sqrt[3]{b a}}{\\sqrt[3]{c^{2}}}+\\frac{\\sqrt[3]{c b}}{\\sqrt[3]{a^{2}}}=\\frac{\\sqrt[3]{a b c}}{b}+\\frac{\\sqrt[3]{a b c}}{c}+\\frac{\\sqrt[3]{a b c}}{a} \\\\\n& =a b+b c+c a\n\\end{aligned}\n$$\n\nSimilarly, we have\n\n$$\n\\begin{aligned}\n\\frac{a}{b}+\\frac{b}{c}+\\frac{c}{a} & =\\frac{1}{3}\\left(\\frac{a}{b}+\\frac{a}{b}+\\frac{b}{c}\\right)+\\frac{1}{3}\\left(\\frac{b}{c}+\\frac{b}{c}+\\frac{c}{a}\\right)+\\frac{1}{3}\\left(\\frac{c}{a}+\\frac{c}{a}+\\frac{a}{b}\\right) \\\\\n& \\geqslant \\frac{\\sqrt[3]{a^{2}}}{\\sqrt[3]{b c}}+\\frac{\\sqrt[3]{b^{2}}}{\\sqrt[3]{c a}}+\\frac{\\sqrt[3]{c^{2}}}{\\sqrt[3]{a b}}=\\frac{a}{\\sqrt[3]{a b c}}+\\frac{b}{\\sqrt[3]{a b c}}+\\frac{c}{\\sqrt[3]{a b c}} \\\\\n& =a+b+c\n\\end{aligned}\n$$\n\nwhich completes our proof of ( $\\dagger$ ).\nBy Cauchy-Schwarz inequality we have\n\n$$\n\\left(a^{2}+b^{2}+c^{2}\\right)\\left(\\frac{1}{b^{2}}+\\frac{1}{c^{2}}+\\frac{1}{a^{2}}\\right) \\geqslant\\left(\\frac{a}{b}+\\frac{b}{c}+\\frac{c}{a}\\right)^{2}\n$$\n\nwhich together with $\\left(a^{2}+b^{2}+c^{2}\\right)\\left(1 / a^{2}+1 / b^{2}+1 / c^{2}\\right) \\geqslant 9$ leads to\n\n$$\n2\\left(a^{2}+b^{2}+c^{2}\\right)\\left(\\frac{1}{a^{2}}+\\frac{1}{b^{2}}+\\frac{1}{c^{2}}\\right) \\geqslant\\left(\\frac{a}{b}+\\frac{b}{c}+\\frac{c}{a}\\right)^{2}+9 \\geqslant 6\\left(\\frac{a}{b}+\\frac{b}{c}+\\frac{c}{a}\\right)\n$$\n\nNow, the desired inequality follows from ( $\\dagger$ ).", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nA4.", "solution_match": "\n## Solution."}}
7
+ {"year": "2018", "tier": "T1", "problem_label": "A4", "problem_type": "Algebra", "problem": "Let $a, b, c$ be positive real numbers such that $a b c=1$. Prove that the following inequality holds:\n\n$$\n2\\left(a^{2}+b^{2}+c^{2}\\right)\\left(\\frac{1}{a^{2}}+\\frac{1}{b^{2}}+\\frac{1}{c^{2}}\\right) \\geqslant 3(a+b+c+a b+b c+c a)\n$$\n\n(Romania)", "solution": "2.\n\nSet $a=x^{3}, b=y^{3}, c=z^{3}$ and denote $T_{p, q, r}=\\sum_{s y m} x^{p} y^{q} z^{r}=x^{p} y^{q} z^{r}+y^{p} x^{q} z^{r}+\\cdots$. The given inequality is expanded into\n\n$$\n4 T_{12,6,0}+2 T_{6,6,6} \\geqslant 3 T_{8,5,5}+3 T_{7,7,4}\n$$\n\nApplying the Schur inequality on triples $\\left(x^{4} y^{2}, y^{4} z^{2}, z^{4} x^{2}\\right)$ and $\\left(x^{2} y^{4}, y^{2} z^{4}, z^{2} x^{4}\\right)$ and summing them up yields\n\n$$\nT_{12,6,0}+T_{6,6,6} \\geqslant T_{10,4,4}+T_{8,8,2}\n$$\n\nOn the other hand, by the Muirhead inequality we have\n\n$$\nT_{12,6,0} \\geqslant T_{6,6,6}, \\quad T_{10,4,4} \\geqslant T_{8,5,5}, \\quad T_{8,8,2} \\geqslant T_{7,7,4} .\n$$\n\nThe four inequalities in (1) and (2) imply the desired inequality.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nA4.", "solution_match": "\n## Solution"}}
8
+ {"year": "2018", "tier": "T1", "problem_label": "A5", "problem_type": "Algebra", "problem": "Let $f: \\mathbb{R} \\rightarrow \\mathbb{R}$ be a concave function and let $g: \\mathbb{R} \\rightarrow \\mathbb{R}$ be continuous. Given that\n\n$$\nf(x+y)+f(x-y)-2 f(x)=g(x) y^{2}\n$$\n\nfor all $x, y \\in \\mathbb{R}$, prove that $f$ is a quadratic function.\n(Bulgaria)", "solution": "We plug in the pairs $(a, x),(a, 2 x),(a+x, x)$ and $(a-x, x)$ to get\n\n$$\n\\begin{aligned}\nf(a+x)+f(a-x)-2 f(a) & =g(a) x^{2} \\\\\nf(a+2 x)+f(a-2 x)-2 f(a) & =4 g(a) x^{2} \\\\\nf(a+2 x)+f(a)-2 f(a+x) & =g(a+x) x^{2} \\\\\nf(a-2 x)+f(a)-2 f(a-x) & =g(a-x) x^{2}\n\\end{aligned}\n$$\n\nrespectively. Combining these equations in the form $2 E_{1}-E_{2}+E_{3}+E_{4}$ the left hand side vanishes, yielding an equation in $g:(g(a+x)+g(a-x)-2 g(a)) x^{2}=0$, i.e.\n\n$$\ng(a)=\\frac{g(a+x)+g(a-x)}{2}\n$$\n\nSince $g$ is continuous, it must be linear, i.e. $g(x)=c_{1} x+c_{0}$. However, the original equation for $x=y$ together with the concavity condition now gives us\n\n$$\n0 \\geqslant f(2 x)+f(0)-2 f(x)=\\left(x c_{1}+c_{0}\\right) x^{2}\n$$\n\nfor all $x$, which is only possible if $c_{1}=0$. Thus $g(x) \\equiv c_{0}=2 A$ is constant and\n\n$$\nf(x+y)+f(x-y)-2 f(x)=2 A y^{2}\n$$\n\nThis suggests that $f$ is a quadratic function, so we can set $f(x)=A x^{2}+f_{1}(x)$. Then $(*)$ becomes $f_{1}(x+y)+f_{1}(x-y)-2 f_{1}(x)=0$, so an easy induction gives us\n\n$$\nf_{1}(n x)-f_{1}(0)=n\\left(f_{1}(x)-f_{1}(0)\\right) \\quad \\text { for all } \\quad n \\in \\mathbb{Z}\n$$\n\nBy setting $f_{1}(0)=C$ and $f_{1}(1)=B+C$ we obtain $f_{1}(x)=B x+C$ and $f(x)=$ $A x^{2}+B x+C$ for all $x \\in \\mathbb{Q}$. By concavity of $f$ we conclude that $f(x)=A x^{2}+B x+C$ for all real $x$.\n\n## Remark.\n\nIn fact, $(*)$ implies that the second derivative of $f$ is constant by taking $y \\rightarrow 0$ and the problem is solved. The solution presented here avoids use of derivatives.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nA5.", "solution_match": "\n## Solution."}}
9
+ {"year": "2018", "tier": "T1", "problem_label": "A6", "problem_type": "Algebra", "problem": "Let $n$ be a positive integer and let $x_{1}, \\ldots, x_{n}$ be real numbers. Show that\n\n$$\n\\sum_{i=1}^{n} x_{i}^{2} \\geqslant \\frac{1}{n+1}\\left(\\sum_{i=1}^{n} x_{i}\\right)^{2}+\\frac{12\\left(\\sum_{i=1}^{n} i x_{i}\\right)^{2}}{n(n+1)(n+2)(3 n+1)}\n$$", "solution": "Let $S=\\frac{1}{n+1} \\sum_{i=1}^{n} x_{i}$, and $y_{i}=x_{i}-S$ for $1 \\leqslant i \\leqslant n$. Then we have\n\n$$\n\\sum_{i=1}^{n} i x_{i}=\\sum_{i=1}^{n} i y_{i}+\\frac{n(n+1)}{2} S\n$$\n\nand\n\n$$\n\\sum_{i=1}^{n} y_{i}^{2}=\\sum_{i=1}^{n} x_{i}^{2}-2 S \\sum_{i=1}^{n} x_{i}+n S^{2}=\\sum_{i=1}^{n} x_{i}^{2}-\\frac{1}{n+1}\\left(\\sum_{i=1}^{n} x_{i}\\right)^{2}-S^{2}\n$$\n\nNow, by the Cauchy-Schwarz inequality\n\n$$\n\\begin{aligned}\n\\left(\\sum_{i=1}^{n} i x_{i}\\right)^{2} & =\\left(\\sum_{i=1}^{n} i y_{i}+\\frac{n(n+1)}{2} S\\right)^{2} \\\\\n& \\leqslant\\left(\\sum_{i=1}^{n} i^{2}+\\frac{n^{2}(n+1)^{2}}{4}\\right)\\left(\\sum_{i=1}^{n} y_{i}^{2}+S^{2}\\right) \\\\\n& =\\frac{n(n+1)(n+2)(3 n+1)}{12} \\cdot\\left(\\sum_{i=1}^{n} x_{i}^{2}-\\frac{1}{n+1}\\left(\\sum_{i=1}^{n} x_{i}\\right)^{2}\\right)\n\\end{aligned}\n$$\n\nwhich completes our proof.\n\n## Remark.\n\nIt can be checked that equality holds if and only if $x_{i}=c(n(n+1)+2 i)$ for $1 \\leqslant i \\leqslant n$ and some $c \\in \\mathbb{R}$.\n\n## Combinatorics", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nA6.", "solution_match": "\n## Solution."}}
10
+ {"year": "2018", "tier": "T1", "problem_label": "C1", "problem_type": "Combinatorics", "problem": "Let $N \\geqslant 3$ be an odd integer. $N$ tennis players take part in a league. Before the league starts, a committee ranks the players in some order based on perceived skill. During the league, each pair of players plays exactly one match, and each match has one winner. A match is considered an upset if the winner had a lower initial ranking than the loser. At the end of the league, the players are ranked according to number of wins, with the initial ranking used to rank players with the same number of wins. It turns out that the final ranking is the same as the initial ranking. What is the largest possible number of upsets?\n(United Kingdom)", "solution": "Answer: $\\frac{(N-1)(3 N-1)}{8}$.\nSuppose the players are ranked $1,2, \\ldots, N=2 n+1$, where 1 is the highest ranking.\nFor $k \\leqslant n$, the player ranked $k$ could have beaten at most $k-1$ players with a higher ranking. Thus the top $n$ players could have made at most $\\sum_{k=1}^{n}(k-1)=\\frac{n(n-1)}{2}$ upsets. On the other hand, the average score of all $2 n+1$ players is $n$, so the average score of the bottom $n+1$ players is not more than $n$, which implies that these $n+1$ players have at most $n(n+1)$ wins in total. Hence the total number of upsets is at most\n\n$$\n\\frac{n(n-1)}{2}+n(n+1)=\\frac{n(3 n+1)}{2}=\\frac{(N-1)(3 N-1)}{8} .\n$$\n\nAn example can be constructed as follows. Suppose that, for $1 \\leqslant i \\leqslant 2 n+1$, the player ranked $i$ beats the players ranked $i-1, i-2, \\ldots, i-n$ (the rankings are counted modulo $N)$ and loses to the rest of the players. Thus each player has exactly $n$ wins. The player ranked $i$ for $i \\leqslant n$ made $i-1$ upsets, whereas the player ranked $i$ for $i>n$ made $n$ upsets, so the total number of upsets is exactly $\\sum_{i=1}^{n}(i-1)+(n+1) n=\\frac{n(3 n+1)}{2}$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nC1.", "solution_match": "\n## Solution."}}
11
+ {"year": "2018", "tier": "T1", "problem_label": "C1", "problem_type": "Combinatorics", "problem": "Let $N \\geqslant 3$ be an odd integer. $N$ tennis players take part in a league. Before the league starts, a committee ranks the players in some order based on perceived skill. During the league, each pair of players plays exactly one match, and each match has one winner. A match is considered an upset if the winner had a lower initial ranking than the loser. At the end of the league, the players are ranked according to number of wins, with the initial ranking used to rank players with the same number of wins. It turns out that the final ranking is the same as the initial ranking. What is the largest possible number of upsets?\n(United Kingdom)", "solution": "2.\n\nWrite $N=2 n+1$. We only prove the upper bound.\nConsider a tournament $\\mathbb{T}$ with correct final ranking, but where not everyone won $n$ matches. Let $A$ be the worst-ranked player with the maximal number of wins, and let $B$ be the best-ranked player with minimal wins. Clearly, $A$ was ranked above $B$.\nAssume $A$ beat $B$. Consider the tournament $\\mathbb{T}^{\\prime}$ obtained from $\\mathbb{T}$ by reversing this result, and keeping all others the same. So $B$ beat $A$, which is an upset. $A$ is now the bestranked player with the second-most number of wins; $B$ is now the worst-ranked player with the second-least number of wins, and so the final ranking of $\\mathbb{T}^{\\prime}$ is still correct, but with one more upset than in $\\mathbb{T}$.\nAlternatively, assume $B$ beat $A$. Then there must have been a player $C$ such that $A$ beat $C$ and $C$ beat $B$. These are upsets if, respectively, $C$ was ranked above $A$, or\nbelow $B$. It therefore cannot be the case that both of the matches involving $C$ and $\\{A, B\\}$ were upsets. Consider the tournament $\\mathbb{T}^{\\prime}$ obtained from $\\mathbb{T}$ by reversing these two matches. $C$ 's number of wins stays fixed, while as before $A$ is now the best-ranked player with the second-most wins, and similar for $B$. Thus in $\\mathbb{T}^{\\prime}$ the final ranking is still correct, with either the same number of upsets as $\\mathbb{T}$, or two more upsets than $\\mathbb{T}$.\nIf we iterate this procedure, we eventually obtain a tournament $\\overline{\\mathbb{T}}$ where everyone won exactly $n$ matches, and with at least as many upsets as in the original tournament $\\mathbb{T}$. We now bound the number of upsets in such a tournament $\\overline{\\mathbb{T}}$. Suppose the player ranked $i \\leqslant \\frac{N+1}{2}$ beat $K$ higher ranked players. Obviously $K \\leqslant i-1$. Then the number of upsets involving $i$ is\n\n$$\n2 K+\\frac{N+1}{2}-i \\leqslant 2(i-1)+\\frac{N+1}{2}-i=\\frac{N-1}{2}+i-1 .\n$$\n\nSimilarly, for $i \\geqslant \\frac{N+1}{2}$ one proves that the number of upsets involving $i$ is at most $\\frac{N-1}{2}+i-1$.\nFinally, summing over all values of $i$ and dividing by 2 we obtain the desired result.\n\n## Remark.\n\nWe demand $N$ odd to avoid candidates providing a case distinction, rather than because the construction or the bounding argument is significantly different.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nC1.", "solution_match": "\n## Solution"}}
12
+ {"year": "2018", "tier": "T1", "problem_label": "C2", "problem_type": "Combinatorics", "problem": "Alice and Bob play the following game: They start with two non-empty piles of coins. Taking turns, with Alice playing first, they choose a pile with an even number of coins and move half of the coins of this pile to the other pile. The game ends if a player cannot move, or if we reach a previously reached position. In the first case, the player who cannot move loses. In the second case, the game is declared a draw.\nDetermine all pairs $(a, b)$ of positive integers such that if initially the two piles have $a$ and $b$ coins respectively, then Bob has a winning strategy.\n(Cyprus)", "solution": "By $v_{2}(n)$ we denote the largest nonnegative integer $r$ such that $2^{r} \\mid n$.\nA position $(a, b)$ (i.e. two piles of sizes $a$ and $b$ ) is said to be $k$-happy if $v_{2}(a)=v_{2}(b)=k$ for some integer $k \\geqslant 0$, and $k$-unhappy if $\\min \\left\\{v_{2}(a), v_{2}(b)\\right\\}=k<\\max \\left\\{v_{2}(a), v_{2}(b)\\right\\}$. We shall prove that Bob has a winning strategy if and only if the initial position is $k$-happy for some even $k$.\n\n- Given a 0-happy position, the player in turn is unable to play and loses.\n- Given a $k$-happy position $(a, b)$ with $k \\geqslant 1$, the player in turn will transform it into one of the positions $\\left(a+\\frac{1}{2} b, \\frac{1}{2} b\\right)$ and $\\left(b+\\frac{1}{2} a, \\frac{1}{2} a\\right)$, both of which are ( $k-1$ )-happy because $v_{2}\\left(a+\\frac{1}{2} b\\right)=v_{2}\\left(\\frac{1}{2} b\\right)=v_{2}\\left(b+\\frac{1}{2} a\\right)=v_{2}\\left(\\frac{1}{2} a\\right)=k-1$.\nTherefore, if the starting position is $k$-happy, after $k$ moves they will get stuck at a 0 -happy position, so Bob will win if and only if $k$ is even.\n- Given a $k$-unhappy position $(a, b)$ with $k$ odd and $v_{2}(a)=k<v_{2}(b)=\\ell$, Alice can move to position $\\left(\\frac{1}{2} a, b+\\frac{1}{2} a\\right)$. Since $v_{2}\\left(\\frac{1}{2} a\\right)=v_{2}\\left(b+\\frac{1}{2} a\\right)=k-1$, this position is ( $k-1$ )-happy with $2 \\mid k-1$, so Alice will win.\n- Given a $k$-unhappy position $(a, b)$ with $k$ even and $v_{2}(a)=k<v_{2}(b)=\\ell$, Alice must not play to position $\\left(\\frac{1}{2} a, b+\\frac{1}{2} a\\right)$, because the new position is $(k-1)$-happy and will lead to Bob's victory. Thus she must play to position $\\left(a+\\frac{1}{2} b, \\frac{1}{2} b\\right)$. We claim that this position is also $k$-unhappy. Indeed, if $\\ell>k+1$, then $v_{2}\\left(a+\\frac{1}{2} b\\right)=$ $k<v_{2}\\left(\\frac{1}{2} b\\right)=\\ell-1$, whereas if $\\ell=k+1$, then $v_{2}\\left(a+\\frac{1}{2} b\\right)>v_{2}\\left(\\frac{1}{2} b\\right)=k$.\n\nHence a $k$-unhappy position is winning for Alice if $k$ is odd, and drawing if $k$ is even.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nC2.", "solution_match": "\n## Solution."}}
13
+ {"year": "2018", "tier": "T1", "problem_label": "C3", "problem_type": "Combinatorics", "problem": "An open necklace can contain rubies, emeralds and sapphires. At every step we can perform any of the following operations:\n$\\left(1^{\\circ}\\right)$ We can replace two consecutive rubies with an emerald and a sapphire, where the emerald is on the left of the sapphire.\n$\\left(2^{\\circ}\\right)$ We can replace three consecutive emeralds with a sapphire and a ruby, where the sapphire is on the left of the ruby.\n(3 ) If we find two consecutive sapphires then we can remove them.\n(4 ) If we find consecutively and in this order a ruby, an emerald, and a sapphire, then we can remove them.\n\nFurthermore we can also reverse all of the above operations. For example, by reversing $\\left(3^{\\circ}\\right)$ we can put two consecutive sapphires on any position we wish.\nInitially the necklace has one sapphire (and no other precious stones). Decide, with proof, whether there is a finite sequence of steps such that at the end of this sequence the necklace contains one emerald (and no other precious stones).\nRemark. A necklace is open if its precious stones are on a line from left to right. We are not allowed to move a precious stone from the rightmost position to the leftmost as we would be able to do if the necklace was closed.\n(Cyprus)", "solution": "For each precious stone on the necklace, we define its value as $(-1)^{r} \\cdot s$, where $r$ denotes the number of emeralds and sapphires preceding it, and $s$ equals $-2,1$ or -1 for a ruby, emerald or sapphire, respectively.\nThe value of the necklace is equal to the sum of the values of its precious stones. We claim that the value of the necklace is invariant modulo 6 .\nSuppose for example that we remove two consecutive rubies, and suppose there is an even number of emeralds and sapphires preceding them. The value of each ruby is -2 so by removing them we increase the value of the necklace by 4 . The emerald that we add had an even number of emeralds and sapphires preceding it, so its value is 1 . The sapphire that we add has an odd number of emeralds and sapphires preceding it (accounting for the added emerald), so its value is 1 . No other precious stone changes value, so the total increase of the value of the necklace is 6 .\nSimilarly we can check that all of the other operations and their inverses also leave the value of the necklace invariant modulo 6 .\nSince the necklace containing just one sapphire has value -1 , whereas the necklace containing just one emerald has value 1 , there is no desired sequence of steps.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nC3.", "solution_match": "\n## Solution."}}
14
+ {"year": "2018", "tier": "T1", "problem_label": "C3", "problem_type": "Combinatorics", "problem": "An open necklace can contain rubies, emeralds and sapphires. At every step we can perform any of the following operations:\n$\\left(1^{\\circ}\\right)$ We can replace two consecutive rubies with an emerald and a sapphire, where the emerald is on the left of the sapphire.\n$\\left(2^{\\circ}\\right)$ We can replace three consecutive emeralds with a sapphire and a ruby, where the sapphire is on the left of the ruby.\n(3 ) If we find two consecutive sapphires then we can remove them.\n(4 ) If we find consecutively and in this order a ruby, an emerald, and a sapphire, then we can remove them.\n\nFurthermore we can also reverse all of the above operations. For example, by reversing $\\left(3^{\\circ}\\right)$ we can put two consecutive sapphires on any position we wish.\nInitially the necklace has one sapphire (and no other precious stones). Decide, with proof, whether there is a finite sequence of steps such that at the end of this sequence the necklace contains one emerald (and no other precious stones).\nRemark. A necklace is open if its precious stones are on a line from left to right. We are not allowed to move a precious stone from the rightmost position to the leftmost as we would be able to do if the necklace was closed.\n(Cyprus)", "solution": "2.\n\nWrite $a, b$ and $c$ respectively for a ruby, emerald and sapphire. Each necklace corresponds to an element of a group $G$ containing elements $a, b, c$. If we impose the conditions $a^{2}=b c, b^{3}=c a, c^{2}=1$ and $a b c=1$, the allowed operations will preserve this element. In this group we have $c=a b$ (since $c^{2}=a b c$ ), i.e. $b=a^{-1} c$ and using this relation we obtain $a^{3}=c^{2}=\\left(a^{-1} c\\right)^{4}=1$. Thus we can take $G=\\mathbb{S}_{4}, a=(1,2,3)$, $c=(1,4)$ and $b=a^{-1} c=(1,4,3,2)$. The initial and final necklaces should correspond to elements $c$ and $b$, respectively, so the desired sequence of operations does not exist.\n\n## Geometry", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nC3.", "solution_match": "\n## Solution"}}
15
+ {"year": "2018", "tier": "T1", "problem_label": "G1", "problem_type": "Geometry", "problem": "In an acute triangle $A B C$, the midpoint of the side $B C$ is $M$ and the centers of the excircles relative to $M$ of the triangles $A M B$ and $A M C$ are $D$ and $E$ respectively. The circumcircle of the triangle $A B D$ meets line $B C$ at $B$ and $F$. The circumcircle of the triangle $A C E$ meets line $B C$ at $C$ and $G$. Prove that $B F=C G$.\n(Romania)", "solution": "We have $\\varangle A D B=90^{\\circ}-\\frac{1}{2} \\varangle A M B$ and $\\varangle A E C=90^{\\circ}-\\frac{1}{2} \\varangle A M C$.\nLet the circles $A D B$ and $A E C$ respectively meet the line $A M$ again at points $P$ and $P^{\\prime}$. Note that $M$ lies outside the circles $A B D$ and $A C E$ because $\\varangle A D B+\\varangle A M B<180^{\\circ}$ and $\\varangle A E C+\\varangle A M C<180^{\\circ}$, so $P$ and $P^{\\prime}$ lie on the ray $M A$. Moreover, $\\varangle B P M=$ $\\varangle B D A=90^{\\circ}-\\frac{1}{2} \\varangle P M B$, implying that $\\triangle B P M$ is isosceles with $M P=M B$. Similarly, $M P^{\\prime}=M C=M B$, so $P^{\\prime} \\equiv P$.\nNow it follows from the power of point $P$ that $M B \\cdot M F=M P \\cdot M A=M C \\cdot M G$, i.e. $M F=M G=M A$ and hence $B F=C G$.\n![](https://cdn.mathpix.com/cropped/2024_12_07_39733bbc834091c7a45dg-22.jpg?height=527&width=849&top_left_y=1390&top_left_x=609)", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nG1.", "solution_match": "\n## Solution."}}
16
+ {"year": "2018", "tier": "T1", "problem_label": "G2", "problem_type": "Geometry", "problem": "Let $A B C$ be a triangle inscribed in circle $\\Gamma$ with center $O$ and let $H$ its orthocenter and $K$ be the midpoint of $O H$. The tangent of $\\Gamma$ at $B$ meets the perpendicular bisector of $A C$ meets at $L$ and the tangent of $\\Gamma$ at $C$ meets the perpendicular bisector of $A B$ at $M$. Prove that $A K \\perp L M$.\n(Greece)", "solution": "The polar of $L$ with respect to $\\Gamma$ is the line $\\ell_{B}$ through $B$ parallel to $A C$, and the polar of $M$ with respect to $\\Gamma$ is the line $\\ell_{C}$ through $C$ parallel to $A B$. Therefore the pole of the line $L M$ is the intersection $A^{\\prime}$ of $\\ell_{B}$ and $\\ell_{C}$. It follows that $O A^{\\prime} \\perp L M$, so it remains to show that $O D \\| A K$.\nConsider the reflection $O^{\\prime}$ of $O$ in the midpoint $D$ of $B C$. Since $A^{\\prime}$ is the reflection of $A$ in $D, A O A^{\\prime} O^{\\prime}$ is a parallelogram. Moreover, $A H O^{\\prime} O$ is a parallelogram because $\\overrightarrow{O O^{\\prime}}=2 \\overrightarrow{O D}=\\overrightarrow{A H}$. It follows that $\\overrightarrow{O A^{\\prime}}=\\overrightarrow{A O^{\\prime}}=2 \\overrightarrow{A K}$, so $O A^{\\prime} \\| A K$.\n![](https://cdn.mathpix.com/cropped/2024_12_07_39733bbc834091c7a45dg-23.jpg?height=892&width=830&top_left_y=1025&top_left_x=613)", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nG2.", "solution_match": "\n## Solution."}}
17
+ {"year": "2018", "tier": "T1", "problem_label": "G2", "problem_type": "Geometry", "problem": "Let $A B C$ be a triangle inscribed in circle $\\Gamma$ with center $O$ and let $H$ its orthocenter and $K$ be the midpoint of $O H$. The tangent of $\\Gamma$ at $B$ meets the perpendicular bisector of $A C$ meets at $L$ and the tangent of $\\Gamma$ at $C$ meets the perpendicular bisector of $A B$ at $M$. Prove that $A K \\perp L M$.\n(Greece)", "solution": "2.\n\nWe introduce the complex plane such that $\\Gamma$ is the unit cycle. Also, let the lower-case letters denote complex numbers corresponding to the points denoted by capital letters. First, note that $o=0, \\bar{a}=1 / a, \\bar{b}=1 / b$ and $\\bar{c}=1 / c$.\nSince $B L \\perp B O$, we have\n\n$$\n\\frac{b-l}{\\bar{b}-\\bar{l}}=-\\frac{b-o}{\\bar{b}-\\bar{o}}=-\\frac{b}{\\bar{b}}=-b^{2}, \\quad \\text { and hence } \\quad \\bar{l}=\\frac{2 b-l}{b^{2}}\n$$\n\nSince $L O \\perp A C$, we have\n\n$$\n\\frac{l}{\\bar{l}}=\\frac{l-o}{\\bar{l}-\\bar{o}}=-\\frac{a-c}{\\bar{a}-\\bar{c}}=a c, \\quad \\text { and hence } \\quad \\bar{l}=\\frac{l}{a c} .\n$$\n\nCombining $(\\dagger)$ and $(\\ddagger)$ we get $l=\\frac{2 a b c}{b^{2}+a c}$. By symmetry, $m=\\frac{2 a b c}{c^{2}+a b}$ and hence\n\n$$\nl-m=\\frac{2 a b c(c-b)(b+c-a)}{\\left(b^{2}+a c\\right)\\left(c^{2}+a b\\right)} \\quad \\text { and } \\quad \\bar{l}-\\bar{m}=\\frac{2(b-c)(a b+a c-b c)}{\\left(b^{2}+a c\\right)\\left(c^{2}+a b\\right)}\n$$\n\nBy Hamilton's formula $a+b+c=h-o=h$, and hence $k=\\frac{h+o}{2}=\\frac{a+b+c}{2}$. So,\n\n$$\na-k=\\frac{b+c-a}{2} \\quad \\text { and } \\quad \\bar{a}-\\bar{k}=\\frac{a b+a c-b c}{2 a b c}\n$$\n\nand hence\n\n$$\n\\frac{l-m}{\\bar{l}-\\bar{m}}=-\\frac{a-k}{\\bar{a}-\\bar{k}}\n$$\n\nwhich implies $L M \\perp A K$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nG2.", "solution_match": "\n## Solution"}}
18
+ {"year": "2018", "tier": "T1", "problem_label": "G3", "problem_type": "Geometry", "problem": "Let $P$ be a point inside a triangle $A B C$ and let $a, b, c$ be the side lengths and $p$ the semi-perimeter of the triangle. Find the maximum value of\n\n$$\n\\min \\left(\\frac{P A}{p-a}, \\frac{P B}{p-b}, \\frac{P C}{p-c}\\right)\n$$\n\nover all possible choices of triangle $A B C$ and point $P$.", "solution": "If $A B C$ is an equilateral triangle and $P$ its center, then $\\frac{P A}{p-a}=\\frac{P B}{p-b}=\\frac{P C}{p-c}=\\frac{2}{\\sqrt{3}}$.\nWe shall prove that $\\frac{2}{\\sqrt{3}}$ is the required value. Suppose without loss of generality that $\\varangle A P B \\geqslant 120^{\\circ}$. Then\n\n$$\nA B^{2} \\geqslant P A^{2}+P B^{2}+P A \\cdot P B \\geqslant \\frac{3}{4}(P A+P B)^{2}\n$$\n\ni.e. $P A+P B \\leqslant \\frac{2}{\\sqrt{3}} A B=\\frac{2}{\\sqrt{3}}((p-a)+(p-b))$, so at least one of the ratios $\\frac{P A}{p-a}$ and $\\frac{P B}{p-b}$ does not exceed $\\frac{2}{\\sqrt{3}}$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nG3.", "solution_match": "\n## Solution."}}
19
+ {"year": "2018", "tier": "T1", "problem_label": "G4", "problem_type": "Geometry", "problem": "A quadrilateral $A B C D$ is inscribed in a circle $k$, where $A B>C D$ and $A B$ is not parallel to $C D$. Point $M$ is the intersection of the diagonals $A C$ and $B D$ and point $H$ is the foot of the perpendicular from $M$ to $A B$. Given that $\\varangle M H C=\\varangle M H D$, prove that $A B$ is a diameter of $k$.", "solution": "Let the line through $M$ parallel to $A B$ meet the segments $A D, D H, B C, C H$ at points $K, P, L, Q$, respectively. Triangle $H P Q$ is isosceles, so $M P=M Q$. Now from\n\n$$\n\\frac{M P}{B H}=\\frac{D M}{D B}=\\frac{K M}{A B} \\quad \\text { and } \\quad \\frac{M Q}{A H}=\\frac{C M}{C A}=\\frac{M L}{A B}\n$$\n\nwe obtain $A H / H B=K M / M L$.\nLet the lines $A D$ and $B C$ meet at point $S$ and let the line $S M$ meet $A B$ at $H^{\\prime}$. Then $A H^{\\prime} / H^{\\prime} B=K M / M L=A H / H B$, so $H^{\\prime} \\equiv H$, i.e. $S$ lies on the line $M H$.\nThe quadrilateral $A B C D$ is not a trapezoid, so $A H \\neq B H$. Consider the point $A^{\\prime}$ on the ray $H B$ such that $H A^{\\prime}=H A$. Since $\\varangle S A^{\\prime} M=\\varangle S A M=\\varangle S B M$, quadrilateral $A^{\\prime} B S M$ is cyclic and therefore $\\varangle A B C=\\varangle A^{\\prime} B S=\\varangle A^{\\prime} M H=\\varangle A M H=90^{\\circ}-\\varangle B A C$, which implies that $\\varangle A C B=90^{\\circ}$.\n![](https://cdn.mathpix.com/cropped/2024_12_07_39733bbc834091c7a45dg-26.jpg?height=835&width=795&top_left_y=1287&top_left_x=633)", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nG4.", "solution_match": "\n## Solution."}}
20
+ {"year": "2018", "tier": "T1", "problem_label": "G5", "problem_type": "Geometry", "problem": "Let $A B C$ be an acute-angled triangle with $A B<A C<B C$ and let $D$ be an arbitrary point on the extension of $B C$ beyond $C$. The circle $\\gamma(A, A D)$ intersects the rays $A C$, $A B, C B$ at points $E, F, G$, respectively. The circumcircle $\\omega_{1}$ of triangle $A F G$ intersects the lines $F E, B C, G E, D F$ again at points $J, H, H^{\\prime}, J^{\\prime}$. The circumcircle $\\omega_{2}$ of triangle $A D E$ intersects the lines $F E, B C, G E, D F$ again at points $I, K, K^{\\prime}, I^{\\prime}$. Prove that the quadrilaterals $H I J K$ and $H^{\\prime} I^{\\prime} J^{\\prime} K^{\\prime}$ are cyclic and that their circumcenters coincide.\n(Greece)", "solution": "From $\\varangle F A H=\\varangle F G H=\\varangle F G D=\\frac{1}{2} \\varangle F A D=90^{\\circ}-\\varangle A F D$ we deduce that $A H \\perp$ $D F$. Similarly, $\\varangle D A I=180^{\\circ}-\\varangle D E I=180^{\\circ}-\\varangle D E F=\\varangle D G F=\\frac{1}{2} \\varangle D A F$, so we also have $A I \\perp D F$. Therefore, points $A, H, I$ are collinear. Analogously, we find that the triples of points $(A, K, J),\\left(A, H^{\\prime}, I^{\\prime}\\right)$ and $\\left(A, K^{\\prime}, J^{\\prime}\\right)$ are collinear.\nQuadrilateral $H I J K$ is cyclic because $\\varangle A I K=\\varangle A D K=\\varangle A G H=\\varangle A J H$. Analogously, quadrilateral $H^{\\prime} I^{\\prime} J^{\\prime} K^{\\prime}$ is cyclic.\nFinally, since $\\varangle H^{\\prime} J H=\\varangle H^{\\prime} G H=\\varangle E G D=\\varangle E F D=\\varangle J F J^{\\prime}=\\varangle J H J^{\\prime}$, quadrilateral $H J J^{\\prime} H^{\\prime}$ is an isosceles trapezoid with $H J \\| H^{\\prime} J^{\\prime}$, so the perpendicular bisectors of $H J$ and $H^{\\prime} J^{\\prime}$ coincide. Analogously, the perpendicular bisectors of $I K$ and $I^{\\prime} K^{\\prime}$ coincide. Therefore the circumcenters of $H I J K$ and $H^{\\prime} I^{\\prime} J^{\\prime} K^{\\prime}$ coincide.\n![](https://cdn.mathpix.com/cropped/2024_12_07_39733bbc834091c7a45dg-27.jpg?height=666&width=1052&top_left_y=1312&top_left_x=499)", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nG5.", "solution_match": "\n## Solution."}}
21
+ {"year": "2018", "tier": "T1", "problem_label": "G6", "problem_type": "Geometry", "problem": "In a triangle $A B C$ with $A B=A C, \\omega$ is the circumcircle and $O$ its center. Let $D$ be a point on the extension of $B A$ beyond $A$. The circumcircle $\\omega_{1}$ of triangle $O A D$ intersects the line $A C$ and the circle $\\omega$ again at points $E$ and $G$, respectively. Point $H$ is such that $D A E H$ is a parallelogram. Line $E H$ meets circle $\\omega_{1}$ again at point $J$. The line through $G$ perpendicular to $G B$ meets $\\omega_{1}$ again at point $N$ and the line through $G$ perpendicular to $G J$ meets $\\omega$ again at point $L$. Prove that the points $L, N, H, G$ lie on a circle.\n(Cyprus)", "solution": "We first observe that $\\varangle D O E=\\varangle D A E=2 \\varangle A B C=\\varangle B O A$ and hence $\\varangle D O B=$ $\\varangle E O A$, which together with $O B=O A$ and $\\varangle O B D=\\varangle B A O=\\varangle O A E$ gives us $\\triangle O B D \\cong \\triangle O A E$. Therefore $B D=A E$.\nNext, $O G=O A$ implies $\\varangle O D G=\\varangle O D A=\\varangle O D B$ and hence $\\triangle O G D \\cong \\triangle O B D$. It follows that $D G=D B=A E=D H$. Moreover, since $A D \\| E J$, we have $D J=A E=$ $D G$. Thus, the points $B, G, H, J$ lie on a circle $\\omega_{2}$ with center $D$.\nWe deduce that $\\varangle A G H=\\varangle B G H-\\varangle B G A=180^{\\circ}-\\frac{1}{2} \\varangle H D B-\\varangle B C A=180^{\\circ}-$ $\\frac{1}{2} \\varangle C A B-\\varangle B C A=90^{\\circ}$.\nWe will now invert the diagram through $G$. By $\\hat{X}$ we denote the image of any point $X$. The points $\\hat{H}, \\hat{L}, \\hat{N}$ then lie on the lines $\\hat{B} \\hat{J}, \\hat{A} \\hat{B}$ and $\\hat{A} \\hat{J}$, respectively, such that $\\varangle \\hat{A} G \\hat{H}=\\hat{B} G \\hat{N}=\\varangle \\hat{J} G \\hat{L}=90^{\\circ}$. It remains to prove that $\\hat{H}, \\hat{L}$ and $\\hat{N}$ are collinear, which follows from the following statement:\n![](https://cdn.mathpix.com/cropped/2024_12_07_39733bbc834091c7a45dg-28.jpg?height=652&width=1459&top_left_y=1424&top_left_x=302)\n\nLemma. Let $X Y Z$ be a triangle and let $U$ be a point in the plane. If the lines through $U$ perpendicular to $U X, U Y, U Z$ meet the lines $Y Z, Z X, X Y$ respectively at points $P, Q, R$, then the points $P, Q$ and $R$ are collinear.\n$\\underline{\\text { Proof. Here we assume that } U \\text { is inside } \\triangle X Y Z \\text { and the angles } X U Y, Y U Z \\text { and } Z U X . . . ~}$ are all obtuse - the other cases are similar. We have\n\n$$\n\\frac{\\overrightarrow{Y P}}{\\overrightarrow{P Z}}=-\\frac{P_{Y U P}}{P_{P U Z}}, \\quad \\frac{\\overrightarrow{Z Q}}{\\overrightarrow{Q X}}=-\\frac{P_{Z U Q}}{P_{Q U X}}, \\quad \\frac{\\overrightarrow{X R}}{\\overrightarrow{R Y}}=-\\frac{P_{X U R}}{P_{R U Y}}\n$$\n\nOn the other hand, since $\\varangle Q U X=\\varangle Y U P$ are equal and equally directed, we have $\\frac{P_{Y U P}}{P_{Q U X}}=\\frac{U P \\cdot U Y}{U Q \\cdot U X}$. Writing the analogous expressions for $\\frac{P_{Z U Q}}{P_{R U Y}}$ and $\\frac{P_{X U R}}{P_{P U Z}}$\nand multiplying them out we obtain $\\frac{\\overrightarrow{Y P}}{\\overrightarrow{P Z}} \\cdot \\frac{\\overrightarrow{Z Q}}{\\overrightarrow{Q X}} \\cdot \\frac{\\overrightarrow{X R}}{\\overrightarrow{R Y}}=-1$, and the result follows by Menelaus' theorem.\n\n## Remark.\n\nThe result remains valid if $D$ is any point on the line $A B$.\nPoint $L$ does not depend on the choice of $D$. Indeed, $\\varangle L C B=\\varangle L G B=\\varangle J G B-90^{\\circ}=$ $\\varangle J E A+\\varangle A G B-90^{\\circ}=\\varangle B A C+\\varangle A C B-90^{\\circ}=90^{\\circ}-\\varangle A B C$, so $C L \\perp A B$.\nAlso, since $\\varangle A O N=\\varangle A G N=90^{\\circ}-\\varangle B G A=90^{\\circ}-\\varangle B C A=\\varangle O A B=\\varangle O N D$, $O N D A$ is an isosceles trapezoid, i.e. $O N \\| A B$.\n\n## Alternative formulation.\n\nBased on the Remark, the PSC proposes the following modification which hides point $J$ and defines the points in a more natural way:\nA triangle $A B C$ with $A B=A C$ is inscribed in a circle $\\omega$ with center $O$. Its altitude from $C$ meets $\\omega$ again at point $L$. Line $\\ell$ through $O$ is parallel to $A B$. A circle $\\omega_{1}$ passes through points $A$ and $O$ and meets the lines $A B, A C, \\ell$ and circle $\\omega$ again at points $D, E, N$ and $G$, respectively. Point $H$ is such that $A D H E$ is a parallelogram.\nProve that $H$ lies on the circumcircle of triangle $G L N$.\n![](https://cdn.mathpix.com/cropped/2024_12_07_39733bbc834091c7a45dg-29.jpg?height=638&width=769&top_left_y=1471&top_left_x=635)\n\n## Number Theory", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nG6.", "solution_match": "\n## Solution."}}
22
+ {"year": "2018", "tier": "T1", "problem_label": "N1", "problem_type": "Number Theory", "problem": "For positive integers $m$ and $n$, let $d(m, n)$ be the number of distinct primes that divide both $m$ and $n$. For instance, $d(60,126)=d\\left(2^{2} \\times 3 \\times 5,2 \\times 3^{2} \\times 7\\right)=2$. Does there exist a sequence $\\left(a_{n}\\right)$ of positive integers such that:\n(i) $a_{1} \\geqslant 2018^{2018}$;\n(ii) $a_{m} \\leqslant a_{n}$ whenever $m \\leqslant n$;\n(iii) $d(m, n)=d\\left(a_{m}, a_{n}\\right)$ for all positive integers $m \\neq n$ ?\n(United Kingdom)", "solution": "Such a sequence does exist.\nLet $p_{1}<p_{2}<p_{3}<\\ldots$ be the usual list of primes, and $q_{1}<q_{2}<\\ldots, r_{1}<r_{2}<\\ldots$ be disjoint sequences of primes greater than $2018^{2018}$. For example, let $q_{i} \\equiv 1$ and $r_{i} \\equiv 3$ modulo 4. Then, if $n=p_{1}^{\\alpha_{1}} p_{2}^{\\alpha_{2}} \\ldots$, where all but finitely many of the $\\alpha_{i}$ will be zero, set\n\n$$\nb_{n}:=q_{1}^{\\alpha_{1}} q_{2}^{\\alpha_{2}} \\cdots, \\quad \\text { for all } n \\geqslant 2\n$$\n\nThis sequence satisfies requirement (iii), but not the ordering conditions (i) and (ii). Iteratively, take $a_{1}=r_{1}$, then given $a_{1}, \\ldots, a_{n-1}$, define $a_{n}$ by multiplying $b_{n}$ by as large a power of $r_{n}$ as necessary in order to ensure $a_{n}>a_{n-1}$. Thus $d\\left(a_{m}, a_{n}\\right)=d\\left(b_{m}, b_{n}\\right)=$ $d(m, n)$, and so all three requirements are satisfied.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nN1.", "solution_match": "\n## Solution."}}
23
+ {"year": "2018", "tier": "T1", "problem_label": "N2", "problem_type": "Number Theory", "problem": "Find all functions $f: \\mathbb{N} \\rightarrow \\mathbb{N}$ such that\n\n$$\nn!+f(m)!\\mid f(n)!+f(m!)\n$$\n\nfor all $m, n \\in \\mathbb{N}$.", "solution": "Answer: $f(n)=n$ for all $n \\in \\mathbb{N}$.\nTaking $m=n=1$ in $(*)$ yields $1+f(1)!\\mid f(1)!+f(1)$ and hence $1+f(1)!\\mid f(1)-1$. Since $|f(1)-1|<f(1)!+1$, this implies $f(1)=1$.\nFor $m=1$ in $(*)$ we have $n!+1 \\mid f(n)!+1$, which implies $n!\\leqslant f(n)$ !, i.e. $f(n) \\geqslant n$.\nOn the other hand, taking $(m, n)=(1, p-1)$ for any prime number $p$ and using Wilson's theorem we obtain $p|(p-1)!+1| f(p-1)!+1$, implying $f(p-1)<p$. Therefore\n\n$$\nf(p-1)=p-1\n$$\n\nNext, fix a positive integer $m$. For any prime number $p$, setting $n=p-1$ in (*) yields $(p-1)!+f(m)!\\mid(p-1)!+f(m!)$, and hence\n\n$$\n(p-1)!+f(m)!\\mid f(m!)-f(m)!\\text { for all prime numbers } p\n$$\n\nThis implies $f(m!)=f(m)$ ! for all $m \\in \\mathbb{N}$, so $(*)$ can be rewritten as $n!+f(m)!\\mid$ $f(n)!+f(m)$ !. This implies\n\n$$\nn!+f(m)!\\mid f(n)!-n!\\text { for all } n, m \\in \\mathbb{N}\n$$\n\nFixing $n \\in \\mathbb{N}$ and taking $m \\in \\mathbb{N}$ large enough, we conclude that $f(n)$ ! $=n$ !, i.e. $f(n)=n$, for all $n \\in \\mathbb{N}$.\nOne readily checks that the identity function satisfies the conditions of the problem.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nN2.", "solution_match": "\n## Solution."}}
24
+ {"year": "2018", "tier": "T1", "problem_label": "N3", "problem_type": "Number Theory", "problem": "Find all primes $p$ and $q$ such that $3 p^{q-1}+1$ divides $11^{p}+17^{p}$.", "solution": "Answer: $(p, q)=(3,3)$.\nFor $p=2$ it is directly checked that there are no solutions. Assume that $p>2$.\nObserve that $N=11^{p}+17^{p} \\equiv 4(\\bmod 8)$, so $8 \\nmid 3 p^{q-1}+1>4$. Consider an odd prime divisor $r$ of $3 p^{q-1}+1$. Obviously, $r \\notin\\{3,11,17\\}$. There exists $b$ such that $17 b \\equiv 1$ $(\\bmod r)$. Then $r \\mid b^{p} N \\equiv a^{p}+1(\\bmod r)$, where $a=11 b$. Thus $r \\mid a^{2 p}-1$, but $r \\nmid a^{p}-1$, which means that $\\operatorname{ord}_{r}(a) \\mid 2 p$ and $\\operatorname{ord}_{r}(a) \\nmid p$, i.e. $\\operatorname{ord}_{r}(a) \\in\\{2,2 p\\}$.\nNote that if $\\operatorname{ord}_{r}(a)=2$, then $r \\mid a^{2}-1 \\equiv\\left(11^{2}-17^{2}\\right) b^{2}(\\bmod r)$, which gives $r=7$ as the only possibility. On the other hand, $\\operatorname{ord}_{r}(a)=2 p$ implies $2 p \\mid r-1$. Thus, all prime divisors of $3 p^{q-1}+1$ other than 2 or 7 are congruent to 1 modulo $2 p$, i.e.\n\n$$\n3 p^{q-1}+1=2^{\\alpha} 7^{\\beta} p_{1}^{\\gamma_{1}} \\cdots p_{k}^{\\gamma_{k}}\n$$\n\nwhere $p_{i} \\notin\\{2,7\\}$ are prime divisors with $p_{i} \\equiv 1(\\bmod 2 p)$.\nWe already know that $\\alpha \\leqslant 2$. Also, note that\n\n$$\n\\frac{11^{p}+17^{p}}{28}=11^{p-1}-11^{p-2} 17+11^{p-3} 17^{2}-\\cdots+17^{p-1} \\equiv p \\cdot 4^{p-1} \\quad(\\bmod 7)\n$$\n\nso $11^{p}+17^{p}$ is not divisible by $7^{2}$ and hence $\\beta \\leqslant 1$.\nIf $q=2$, then $(*)$ becomes $3 p+1=2^{\\alpha} 7^{\\beta} p_{1}^{\\gamma_{1}} \\cdots p_{k}^{\\gamma_{k}}$, but $p_{i} \\geqslant 2 p+1$, which is only possible if $\\gamma_{i}=0$ for all $i$, i.e. $3 p+1=2^{\\alpha} 7^{\\beta} \\in\\{2,4,14,28\\}$, which gives us no solutions.\nThus $q>2$, which implies $4 \\mid 3 p^{q-1}+1$, i.e. $\\alpha=2$. Now the right hand side of $(*)$ is congruent to 4 or 28 modulo $p$, which gives us $p=3$. Consequently $3^{q}+1 \\mid 6244$, which is only possible for $q=3$. The pair $(p, q)=(3,3)$ is indeed a solution.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nN3.", "solution_match": "\n## Solution."}}
25
+ {"year": "2018", "tier": "T1", "problem_label": "N4", "problem_type": "Number Theory", "problem": "Let $P(x)=a_{d} x^{d}+\\cdots+a_{1} x+a_{0}$ be a non-constant polynomial with nonnegative integer coefficients having $d$ rational roots. Prove that\n\n$$\n\\operatorname{lcm}(P(m), P(m+1), \\ldots, P(n)) \\geqslant m\\binom{n}{m}\n$$\n\nfor all positive integers $n>m$.", "solution": "Let $x_{i}=-\\frac{p_{i}}{q_{i}}(1 \\leqslant i \\leqslant d)$ be the roots of $P(x)$, where $p_{i}, q_{i} \\in \\mathbb{N}$ and $\\operatorname{gcd}\\left(p_{i}, q_{i}\\right)=1$. By Gauss' lemma, we have $P(x)=c\\left(q_{1} x+p_{1}\\right)\\left(q_{2} x+p_{2}\\right) \\cdots\\left(q_{d} x+p_{d}\\right)$ for some $c \\in \\mathbb{N}$, so $q_{1} x+p_{1} \\mid P(x)$. Thus it suffices to prove the statement for $P(x)=q_{1} x+p_{1}=q x+p$. Let\n\n$$\n\\begin{array}{ll}\nA=\\operatorname{lcm}(q m+p, q(m+1)+p, \\ldots, q n+p) & =\\prod_{i=1}^{s} p_{i}^{\\alpha_{i}}, \\\\\nB=(q m+p)(q(m+1)+p) \\cdots(q n+p) & =\\prod_{i=1}^{s} p_{i}^{\\beta_{i}}\n\\end{array}\n$$\n\nbe the prime factorizations of $A$ and $B$.\nConsider a prime divisor $p_{i}$. We have $p_{i}^{\\alpha_{i}} \\mid q x+p$ for some $m \\leqslant x \\leqslant n$. On the other hand, if $p_{i}^{r} \\mid q y+p\\left(r \\leqslant \\alpha_{i}\\right)$ for some $m \\leqslant y \\leqslant n$ with $y \\neq x$, then $p_{i}^{r} \\mid q(x-y)$, i.e. $p_{i}^{r} \\mid x-y$. Taking the product over all $y \\neq x$ we obtain that\n\n$$\np_{i}^{\\beta_{i}} \\quad \\text { divides } \\quad p_{i}^{\\alpha_{i}} \\cdot \\prod_{\\substack{y=m \\\\ y \\neq x}}^{n}|x-y|, \\quad \\text { which divides } \\quad p_{i}^{\\alpha_{i}}(n-m)!\n$$\n\nIt follows that $B \\mid A \\cdot(n-m)$ !, but $B \\geqslant m(m+1) \\cdots n$, so the result immediately follows.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nN4.", "solution_match": "\n## Solution."}}
26
+ {"year": "2018", "tier": "T1", "problem_label": "N5", "problem_type": "Number Theory", "problem": "Let $x$ and $y$ be positive integers. If for each positive integer $n$ we have that\n\n$$\n(n y)^{2}+1 \\mid x^{\\varphi(n)}-1\n$$\n\nprove that $x=1$.", "solution": "Let us take $n=3^{k}$ and suppose that $p$ is a prime divisor of $\\left(3^{k} y\\right)^{2}+1$ such that $p \\equiv 2$ $(\\bmod 3)$.\nSince $p$ divides $x^{\\varphi(n)}-1=x^{2 \\cdot 3^{k-1}}-1$, the order of $x$ modulo $p$ divides both $p-1$ and $2 \\cdot 3^{k-1}$, but $\\operatorname{gcd}\\left(p-1,2 \\cdot 3^{k-1}\\right) \\mid 2$, which implies that $p \\mid x^{2}-1$. The result will follow if we prove that the prime $p$ can take infinitely many values.\nSuppose, to the contrary, that there are only finitely many primes $p$ with $p \\equiv 2(\\bmod 3)$ that divide a term of the sequence\n\n$$\na_{k}=3^{2 k} y^{2}+1 \\quad(k \\geqslant 0)\n$$\n\nLet $p_{1}, p_{2}, \\ldots, p_{m}$ be these primes. Clearly, we may assume without loss of generality that $3 \\nmid y$. Then $a_{0}=y^{2}+1 \\equiv 2(\\bmod 3)$, so it has a prime divisor of the form $3 s+2$ $\\left(s \\in \\mathbb{N}_{0}\\right)$.\nFor $N=\\left(y^{2}+1\\right) p_{1} \\cdots p_{m}$ we have $a_{\\varphi(N)}=3^{2 \\varphi(N)} y^{2}+1 \\equiv y^{2}+1(\\bmod N)$, which means that\n\n$$\na_{\\varphi(N)}=\\left(y^{2}+1\\right)\\left(t p_{1} \\cdots p_{m}+1\\right)\n$$\n\nfor some positive integer $t$. Since $y^{2}+1 \\equiv 2(\\bmod 3)$ and $3^{2 \\varphi(N)} y^{2}+1 \\equiv 1(\\bmod 3)$, the number $t p_{1} \\cdots p_{m}+1$ must have a prime divisor of the form $3 s+2$, but it cannot be any of the primes $p_{1}, \\ldots, p_{m}$, so we have a contradiction as desired.\n![](https://cdn.mathpix.com/cropped/2024_12_07_39733bbc834091c7a45dg-36.jpg?height=2506&width=1784&top_left_y=1&top_left_x=0)", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2018_bmo_shortlist.jsonl", "problem_match": "\nN5.", "solution_match": "\n## Solution."}}
Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"year": "2019", "tier": "T1", "problem_label": "A1b", "problem_type": "Algebra", "problem": "Let $a_{0}$ be an arbitrary positive integer. Consider the infinite sequence $\\left(a_{n}\\right)_{n \\geq 1}$, defined inductively as follows: given $a_{0}, a_{1}, \\ldots, a_{n-1}$ define the term $a_{n}$ as the smallest positive integer such that $a_{0}+a_{1}+\\ldots+a_{n}$ is divisible by $n$. Prove that there exists a positive integer $M$ such that $a_{n+1}=a_{n}$ for all $n \\geq M$.", "solution": "Define $b_{n}=\\frac{a_{0}+a_{1}+\\ldots+a_{n}}{n}$ for every positive integer $n$. According to condition, $b_{n}$ is a positive integer for every positive integer $n$.\n\nSince $a_{n+1}$ is the smallest positive integer such that $\\frac{a_{0}+a_{1}+\\ldots+a_{n}+a_{n+1}}{n+1}$ is a positive integer and\n\n$$\n\\frac{a_{0}+a_{1}+\\ldots+a_{n}+b_{n}}{n+1}=\\frac{a_{0}+a_{1}+\\ldots+a_{n}+\\frac{a_{0}+a_{1}+\\ldots+a_{n}}{n}}{n+1}=\\frac{a_{0}+a_{1}+\\ldots+a_{n}}{n}=b_{n}\n$$\n\nwhich is a positive integer, we get $a_{n+1} \\leq b_{n}$ for every positive integer $n$.\nNow from last result we have\n\n$$\nb_{n+1}=\\frac{a_{0}+a_{1}+\\ldots+a_{n}+a_{n+1}}{n+1} \\leq \\frac{a_{0}+a_{1}+\\ldots+a_{n}+b_{n}}{n+1}=b_{n} .\n$$\n\nHence the infinite sequence of positive integers $b_{1}, b_{2}, \\ldots$ is non-increasing. So there exists a positive integer $T$ such that for all $n \\geq T$ we have\n\n$$\n\\begin{gathered}\nb_{n+1}=b_{n} \\Rightarrow \\frac{a_{0}+a_{1}+\\ldots+a_{n}+a_{n+1}}{n+1}=\\frac{a_{0}+a_{1}+\\ldots+a_{n}}{n} \\Rightarrow \\\\\nn\\left(a_{0}+a_{1}+\\ldots+a_{n}+a_{n+1}\\right)=(n+1)\\left(a_{0}+a_{1}+\\ldots+a_{n}\\right) \\Rightarrow \\\\\nn a_{n+1}=a_{0}+a_{1}+\\ldots+a_{n} \\Rightarrow a_{n+1}=\\frac{a_{0}+a_{1}+\\ldots+a_{n}}{n}=b_{n} .\n\\end{gathered}\n$$\n\nSimilarly we get $a_{n+2}=b_{n+1}$, which follows that $a_{n+2}=b_{n+1}=b_{n}=a_{n+1}$. Hence, taking $M=T+1$, we can state that $a_{n+1}=a_{n}$ for every $n \\geq M$.\n\n[^3]A2. Find all functions $f: \\mathbb{R} \\rightarrow \\mathbb{R}$ such that:\n\n$$\nf(x y)=y f(x)+x+f(f(y)-f(x))\n$$\n\nfor all $x, y \\in \\mathbb{R}$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nA1b. ${ }^{4}$", "solution_match": "\nSolution."}}
2
+ {"year": "2019", "tier": "T1", "problem_label": "A1b", "problem_type": "Algebra", "problem": "Let $a_{0}$ be an arbitrary positive integer. Consider the infinite sequence $\\left(a_{n}\\right)_{n \\geq 1}$, defined inductively as follows: given $a_{0}, a_{1}, \\ldots, a_{n-1}$ define the term $a_{n}$ as the smallest positive integer such that $a_{0}+a_{1}+\\ldots+a_{n}$ is divisible by $n$. Prove that there exists a positive integer $M$ such that $a_{n+1}=a_{n}$ for all $n \\geq M$.", "solution": "Firstly, considering $(x, y)=(1,1)$ we get $f(0)=-1$.\nThen, setting $y=1$, we see that $-x=f(f(1)-f(x))$, so $f$ must be surjective.\nNow let $(x, y)=(a, 0)$ and $(0, a)$ to get\n\n$$\n-1=a+f(-1-f(a)) \\quad \\text { and } \\quad-1=-a+f(f(a)+1)\n$$\n\nSince $f$ is surjective, for any real $z$ we may write $z=f(a)+1$ and then adding these two results gives $f(z)+f(-z)=-2$.\n\nLetting $(x, y)=(a, 1)$ and $(1, a)$ we get\n\n$$\n-a=f(f(1)-f(a)) \\quad \\text { and } \\quad f(a)=a f(1)+1+f(f(a)-f(1)) .\n$$\n\nAdding these, and using the previous result with $z=f(a)-f(1)$ gives\n\n$$\nf(a)=a f(1)+a-1 .\n$$\n\nSo $f(x)=k x-1$ for all $x$, for some fixed $k$. Substituting back into the original equation we see that 1 and -1 are the only possibilities for $k$ and that both of these values do give a function that works.\n\nAlternative solution. We prove that $f(x)=x-1$ and $f(x)=-x-1$ are the only solutions. Let $x=y=1$; this gives $f(1)=f(1)+1+f(0)$, so $f(0)=-1$. Then let $(x, y)=(0, a+1),(-a-1,0)$, and $(-a, 1)$ to give the three equalities\n\n$$\n\\begin{aligned}\nf(0)=(a+1) f(0)+f(f(a+1)-f(0)) & \\Rightarrow a=f(f(a+1)+1) \\\\\nf(0)=-a-1+f(f(0)-f(-a-1)) & \\Rightarrow a=f(-f(-a-1)-1) \\\\\nf(-a)=f(-a)-a+f(f(1)-f(a)) & \\Rightarrow a=f(f(1)-f(-a)) .\n\\end{aligned}\n$$\n\nThe last of these three implies $f$ is bijective, hence we have\n\n$$\nf(a+1)+1=-f(-a-1)-1=f(1)-f(-a)\n$$\n\nFrom the second of these equalities we can deduce the recurrence relation $f(x)=$ $f(x-1)+f(1)+1$, so if $c=f(1)+1$, we have $f(x)=c x-1$ for all $x \\in \\mathbb{Z}$. Substituting into the original equation we see that $c^{2}=1$, so $f(x)=x-1$ or $f(x)=-x-1$ for $x \\in \\mathbb{Z}$.\n\nIn the first case, let $x=1$. Then $f(y)=1+f(f(y))$, which implies $f(x)=x-1$ for all $x$ as $f$ is surjective. In the second case, set $x=-1$, so $f(-y)=-1+f(f(y))$. However from above we have $f(a+1)+f(-a-1)=2$, so $f(f(y))-1=f(-y)=-f(y)-2$, and we have $f(x)=-x-1$ by surjectivity.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nA1b. ${ }^{4}$", "solution_match": "\nSolution."}}
3
+ {"year": "2019", "tier": "T1", "problem_label": "A3", "problem_type": "Algebra", "problem": "Let $a, b, c$ be real numbers such that $0 \\leq a \\leq b \\leq c$. Prove that if\n\n$$\na+b+c=a b+b c+c a>0,\n$$\n\nthen $\\sqrt{b c}(a+1) \\geq 2$. When does the equality hold?", "solution": "Let $a+b+c=a b+b c+c a=k$. Since $(a+b+c)^{2} \\geq 3(a b+b c+c a)$, we get that $k^{2} \\geq 3 k$. Since $k>0$, we obtain that $k \\geq 3$.\n\nWe have $b c \\geq c a \\geq a b$, so from the above relation we deduce that $b c \\geq 1$.\nBy AM-GM, $b+c \\geq 2 \\sqrt{b c}$ and consequently $b+c \\geq 2$. The equality holds iff $b=c$.\nThe constraint gives us\n\n$$\na=\\frac{b+c-b c}{b+c-1}=1-\\frac{b c-1}{b+c-1} \\geq 1-\\frac{b c-1}{2 \\sqrt{b c}-1}=\\frac{\\sqrt{b c}(2-\\sqrt{b c})}{2 \\sqrt{b c}-1}\n$$\n\nFor $\\sqrt{b c}=2$ condition $a \\geq 0$ gives $\\sqrt{b c}(a+1) \\geq 2$ with equality iff $a=0$ and $b=c=2$.\nFor $\\sqrt{b c}<2$, taking into account the estimation for $a$, we get\n\n$$\na \\sqrt{b c} \\geq \\frac{b c(2-\\sqrt{b c})}{2 \\sqrt{b c}-1}=\\frac{b c}{2 \\sqrt{b c}-1}(2-\\sqrt{b c}) .\n$$\n\nSince $\\frac{b c}{2 \\sqrt{b c}-1} \\geq 1$, with equality for $b c=1$, we get $\\sqrt{b c}(a+1) \\geq 2$ with equality iff $a=b=c=1$.\n\nFor $\\sqrt{b c}>2$ we have $\\sqrt{b c}(a+1)>2(a+1) \\geq 2$.\nThe proof is complete.\nThe equality holds iff $a=b=c=1$ or $a=0$ and $b=c=2$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nA3.", "solution_match": "\nSolution."}}
4
+ {"year": "2019", "tier": "T1", "problem_label": "A4", "problem_type": "Algebra", "problem": "Let $a_{i j}, i=1,2, \\ldots, m$ and $j=1,2, \\ldots, n$, be positive real numbers. Prove that\n\n$$\n\\sum_{i=1}^{m}\\left(\\sum_{j=1}^{n} \\frac{1}{a_{i j}}\\right)^{-1} \\leq\\left(\\sum_{j=1}^{n}\\left(\\sum_{i=1}^{m} a_{i j}\\right)^{-1}\\right)^{-1} .\n$$\n\nWhen does the equality hold?", "solution": "We will use the following\nLemma. If $a_{1}, a_{2}, \\ldots, a_{n}, b_{1}, b_{2}, \\ldots, b_{n}$ are positive real numbers then\n\n$$\n\\frac{1}{\\sum_{j=1}^{n} \\frac{1}{a_{j}}}+\\frac{1}{\\sum_{j=1}^{n} \\frac{1}{b_{j}}} \\leq \\frac{1}{\\sum_{j=1}^{n} \\frac{1}{a_{j}+b_{j}}}\n$$\n\nThe equality holds when $\\frac{a_{1}}{b_{1}}=\\frac{a_{2}}{b_{2}}=\\ldots=\\frac{a_{n}}{b_{n}}$.\nProof. Set $x_{j}=\\frac{1}{a_{j}}$ and $y_{j}=\\frac{1}{b_{j}}$ for each $j=1,2, \\ldots, n$. Then we have to prove that\n\n$$\n\\frac{1}{\\sum_{j=1}^{n} x_{j}}+\\frac{1}{\\sum_{j=1}^{n} y_{j}} \\leq \\frac{1}{\\sum_{j=1}^{n} \\frac{x_{j} y_{j}}{x_{j}+y_{j}}} \\quad \\text { or } \\quad \\sum_{j=1}^{n} \\frac{x_{j} y_{j}}{x_{j}+y_{j}} \\leq \\frac{\\left(\\sum_{j=1}^{n} x_{j}\\right)\\left(\\sum_{j=1}^{n} y_{j}\\right)}{\\sum_{j=1}^{n} x_{j}+\\sum_{j=1}^{n} y_{j}}\n$$\n\nSubtract $\\sum_{j=1}^{n} x_{j}$, and we have to prove that\n\n$$\n\\sum_{j=1}^{n}\\left(x_{j}-\\frac{x_{j} y_{j}}{x_{j}+y_{j}}\\right) \\geq \\sum_{j=1}^{n} x_{j}-\\frac{\\left(\\sum_{j=1}^{n} x_{j}\\right)\\left(\\sum_{j=1}^{n} y_{j}\\right)}{\\sum_{j=1}^{n} x_{j}+\\sum_{j=1}^{n} y_{j}}\n$$\n\nor\n\n$$\n\\sum_{j=1}^{n}\\left(\\frac{x_{j}^{2}}{x_{j}+y_{j}}\\right) \\geq \\frac{\\left(\\sum_{j=1}^{n} x_{j}\\right)^{2}}{\\sum_{j=1}^{n} x_{j}+\\sum_{j=1}^{n} y_{j}}\n$$\n\nThe last one is a consequence of Cauchy-Schwarz inequality and thus the lemma is proved.\nWe will now prove that repeating the lemma we will get the desired inequality. For example, if $a_{1}, a_{2}, \\ldots, a_{n}, b_{1}, b_{2}, \\ldots, b_{n}, c_{1}, c_{2}, \\ldots, c_{n}$ are positive reals then by repeating lemma two times we get\n\n$$\n\\frac{1}{\\sum_{j=1}^{n} \\frac{1}{a_{j}}}+\\frac{1}{\\sum_{j=1}^{n} \\frac{1}{b_{j}}}+\\frac{1}{\\sum_{j=1}^{n} \\frac{1}{c_{j}}} \\leq \\frac{1}{\\sum_{j=1}^{n} \\frac{1}{a_{j}+b_{j}}}+\\frac{1}{\\sum_{j=1}^{n} \\frac{1}{c_{j}}} \\leq \\frac{1}{\\sum_{j=1}^{n} \\frac{1}{\\left(a_{j}+b_{j}\\right)+c_{j}}}=\\frac{1}{\\sum_{j=1}^{n} \\frac{1}{a_{j}+b_{j}+c_{j}}}\n$$\n\nUsing similar reasoning we can prove by induction that\n\n$$\n\\sum_{i=1}^{m}\\left(\\sum_{j=1}^{n} \\frac{1}{a_{i j}}\\right)^{-1}=\\sum_{i=1}^{m} \\frac{1}{\\sum_{j=1}^{n} \\frac{1}{a_{i j}}} \\leq \\frac{1}{\\sum_{j=1}^{n} \\frac{1}{\\sum_{i=1}^{m} a_{i j}}}=\\left(\\sum_{j=1}^{n}\\left(\\sum_{i=1}^{m} a_{i j}\\right)^{-1}\\right)^{-1}\n$$\n\nwhich is the desired result.\nThe equality holds iff\n\n$$\n\\frac{a_{i 1}}{a_{11}}=\\frac{a_{i 2}}{a_{12}}=\\ldots=\\frac{a_{i n}}{a_{1 n}}\n$$\n\nfor all $i=1,2, \\ldots, m$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nA4.", "solution_match": "\nSolution."}}
5
+ {"year": "2019", "tier": "T1", "problem_label": "A5", "problem_type": "Algebra", "problem": "Let $a, b, c$ be positive real numbers, such that $(a b)^{2}+(b c)^{2}+(c a)^{2}=3$. Prove that\n\n$$\n\\left(a^{2}-a+1\\right)\\left(b^{2}-b+1\\right)\\left(c^{2}-c+1\\right) \\geq 1 .\n$$", "solution": "The inequality is equivalent with\n\n$$\n\\left(a^{2}-a+1\\right)\\left(b^{2}-b+1\\right)\\left(c^{2}-c+1\\right) \\geq 1 \\Leftrightarrow\\left(a^{3}+1\\right)\\left(b^{3}+1\\right)\\left(c^{3}+1\\right) \\geq(a+1)(b+1)(c+1) .\n$$\n\nThus:\n\n$$\n\\begin{gathered}\n\\prod_{c y c}\\left(a^{3}+1\\right)-\\prod_{c y c}(a+1)=\\sum_{c y c} a^{3}+\\sum_{c y c}(a b)^{3}+(a b c)^{3}-\\sum_{c y c} a-\\sum_{c y c} a b-a b c= \\\\\n\\sum_{c y c}\\left(a^{3}+a\\right)+\\sum_{c y c}\\left(a^{3} b^{3}+a b\\right)+\\left[(a b c)^{3}+1+1\\right]-2 \\sum_{c y c} a-2 \\sum_{c y c} a b-a b c-2^{A M \\geq G M} \\geq^{\\sum_{c y c} a^{2} b^{2}=3} \\\\\n2 \\sum_{c y c} a^{2}+2 \\sum_{c y c} a^{2} b^{2}+2 a b c-2 \\sum_{c y c} a-2 \\sum_{c y c} a b-2^{c y c}= \\\\\n\\sum_{c y c}\\left(a^{2}-2 a+1\\right)+\\left(\\sum_{c y c} a^{2}+2 a b c+1-2 \\sum_{c y c} a b\\right)= \\\\\n\\sum_{c y c}(a-1)^{2}+\\left(\\sum_{c y c} a^{2}+2 a b c+1-2 \\sum_{c y c} a b\\right) \\geq\\left(\\sum_{c y c} a^{2}+2 a b c+1-2 \\sum_{c y c} a b\\right) .\n\\end{gathered}\n$$\n\nWe will show that $\\sum_{c y c} a^{2}+2 a b c+1-2 \\sum_{c y c} a b \\geq 0 \\quad$ (1) for every $a, b, c \\geq 0$.\nFirstly, let us observe that\n\n$$\n(1+2 a b c)(a+b+c)=(1+a b c+a b c)(a+b+c) \\geq 9 \\sqrt[3]{a^{2} b^{2} c^{2} a b c}=9 a b c\n$$\n\nimplying\n\n$$\n1+2 a b c \\geq \\frac{9 a b c}{a+b+c}\n$$\n\nThen, using Schur's Inequality, (i.e. $\\sum_{c y c} a(a-b)(a-c) \\geq 0$, for any $a, b, c \\geq 0$ ) we obtain that\n\n$$\n\\sum_{c y c} a^{2} \\geq 2 \\sum_{c y c} a b-\\frac{9 a b c}{a+b+c}\n$$\n\nReturning to (1), we get:\n\n$$\n\\begin{gathered}\n\\sum_{c y c} a^{2}+2 a b c+1-2 \\sum_{c y c} a b \\geq\\left(2 \\sum_{c y c} a b-\\frac{9 a b c}{a+b+c}\\right)+2 a b c+1-2 \\sum_{c y c} a b= \\\\\n(1+2 a b c)-\\frac{9 a b c}{a+b+c} \\geq 0\n\\end{gathered}\n$$\n\nwhich gives us $\\prod_{\\text {cyc }}\\left(a^{3}+1\\right)-\\prod_{c y c}(a+1) \\geq 0$ and, respectively, $\\prod_{\\text {cyc }}\\left(a^{2}-a+1\\right) \\geq 1$.\n\n## GEOMETRY", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nA5.", "solution_match": "\nSolution."}}
6
+ {"year": "2019", "tier": "T1", "problem_label": "G1", "problem_type": "Geometry", "problem": "Let $A B C D$ be a square of center $O$ and let $M$ be the symmetric of the point $B$ with respect to the point $A$. Let $E$ be the intersection of $C M$ and $B D$, and let $S$ be the intersection of $M O$ and $A E$. Show that $S O$ is the angle bisector of $\\angle E S B$.", "solution": "We have\n\n$$\n\\left\\{\\begin{array}{l}\nD C \\equiv D A \\\\\n\\angle E D C \\equiv \\angle E D A \\quad \\Rightarrow \\triangle D E C \\equiv \\triangle D E A \\Rightarrow \\angle D A E \\equiv \\angle D C E(*) . \\\\\nD E \\equiv D E\n\\end{array}\\right.\n$$\n\nLet $C M \\cap A D=\\{P\\}$, then follows $\\triangle C D P \\equiv \\triangle B A P$ and $\\angle P C D \\equiv \\angle P B A(* *)$.\n![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-15.jpg?height=1030&width=1888&top_left_y=2053&top_left_x=737)\n\nFigure 1: G1\nFrom (*) and (**) follows $\\angle D C P \\equiv \\angle D A E \\equiv \\angle P B A$.\nNow, let $S^{\\prime}=A E \\cap P B$.\nIn the triangle $S^{\\prime} A B$ we have\n\n$$\nm\\left(\\angle S^{\\prime} A B\\right)+m\\left(\\angle S^{\\prime} B A\\right)=m\\left(\\angle S^{\\prime} A B\\right)+m\\left(\\angle P A S^{\\prime}\\right)=m(\\angle P A B)=90^{\\circ},\n$$\n\nso $m\\left(\\angle B S^{\\prime} A\\right)=90^{\\circ}$.\nWe show that $A E, B P$ and $M O$ are concurrent.\nIn the triangle $\\triangle E M B$ we apply the Ceva theorem, so\n\n$$\n\\frac{E P}{P M} \\cdot \\frac{M A}{A B} \\cdot \\frac{B O}{O E}=1 \\Leftrightarrow \\frac{E P}{P M}=\\frac{O E}{B O}\n$$\n\nis true because $P O$ is a midsegment in the triangle $D A B(P O \\| A B)$.\nAccording to the Thales theorem in the triangle $E M B, \\frac{E P}{P M}=\\frac{E O}{O B}$ and $A E, B P$, $M O$ are concurrent in $S^{\\prime}$, which is in fact $S$.\n\nLet $P B \\cap C A=\\{N\\}$. Because ESNO has $m(\\angle E O N)+m(\\angle E S N)=180^{\\circ}$, it follows $E S N O$ cyclic and $m(\\angle E S O)=m(\\angle E N O)=m(\\angle D A O)=45^{\\circ}$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nG1.", "solution_match": "\nSolution."}}
7
+ {"year": "2019", "tier": "T1", "problem_label": "G2", "problem_type": "Geometry", "problem": "Let be a triangle $\\triangle A B C$ with $m(\\angle A B C)=75^{\\circ}$ and $m(\\angle A C B)=45^{\\circ}$. The angle bisector of $\\angle C A B$ intersects $C B$ at the point $D$. We consider the point $E \\in(A B)$, such that $D E=D C$. Let $P$ be the intersection of the lines $A D$ and $C E$. Prove that $P$ is the midpoint of the segment $A D$.", "solution": "Let $P^{\\prime}$ be the midpoint of the segment $A D$. We will prove that $P^{\\prime}=P$. Let $F \\in A C$ such that $D F \\perp A C$. The triangle $C D F$ is isosceles with $F D=F C$ and the triangle $D P^{\\prime} F$ is equilateral as $m(\\angle A D F)=60^{\\circ}$. Thus, the triangle $F C P^{\\prime}$ is isosceles $\\left(F P^{\\prime}=F C\\right)$ and $m\\left(\\angle F C P^{\\prime}\\right)=m\\left(\\angle F P^{\\prime} C\\right)=15^{\\circ}$.\n![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-16.jpg?height=1382&width=1588&top_left_y=1583&top_left_x=622)\n\nFigure 2: G2\nWe prove now that $m(\\angle F C E)=15^{\\circ}$.\nLet $M$ be the point on $[A B$ such that the triangle $A C M$ is equilateral. As $\\triangle A D C \\equiv$ $\\triangle A D M(S A S) \\Rightarrow D C=D M(=D E)$ and $m(\\angle A M D)=m(\\angle A C D)=45^{\\circ}$. It follows that the triangle $\\triangle D M E$ is isosceles with $m(\\angle D M E)=m(\\angle D E M)=45^{\\circ}$. In the triangle $\\triangle B D E$ we have $m(\\angle B D E)=60^{\\circ}$ and thus $m(\\angle C D E)=120^{\\circ}$.As the triangle $D C E$ is isoscel with $m(\\angle D C E)=m(\\angle D E C)=30^{\\circ}$. Finaly $m(\\angle A C E)=m(\\angle A C B)-$ $m(\\angle B C E)=45^{\\circ}-30^{\\circ}=15^{\\circ}$.\n\nThus $m\\left(\\angle F C P^{\\prime}\\right)=15^{\\circ}=m(\\angle F C E)$, and therefore $P^{\\prime} \\in C E$ and $P^{\\prime}=P$, which means that $P$ is the midpoint of the segment $A D$.\n\nAlternative solution: In the way as above we prove that $m(\\angle B C E)=15^{\\circ}$.\nSo the quadrilateral $A C D E$ is inscribed in a circle. Now, applying the sine rules to $\\triangle D P E$ and $\\triangle A P E$ we get\n\n$$\n\\begin{gathered}\n\\frac{D P}{\\sin 30^{\\circ}}=\\frac{P E}{\\sin 15^{\\circ}}, \\quad \\frac{A P}{\\sin 105^{\\circ}}=\\frac{P E}{\\sin 30^{\\circ}} \\Rightarrow \\frac{D P}{\\sin 30^{\\circ}} \\cdot \\frac{\\sin 105^{\\circ}}{A P}=\\frac{P E}{\\sin 15^{\\circ}} \\cdot \\frac{\\sin 30^{\\circ}}{P E}, \\\\\n\\frac{D P}{A P}=\\frac{1}{\\sin 30^{\\circ}} 105^{\\circ} \\cdot \\sin 15^{\\circ} \\\\\n=\\frac{1}{4 \\cdot \\sin 105^{\\circ} \\cdot \\sin 15^{\\circ}}=\\frac{1}{2 \\cdot\\left(\\cos 90^{\\circ}-\\cos 120^{\\circ}\\right)}=\\frac{1}{2 \\cdot \\frac{1}{2}}=1 .\n\\end{gathered}\n$$\n\nThus, $Q P=A P$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nG2.", "solution_match": "\nSolution."}}
8
+ {"year": "2019", "tier": "T1", "problem_label": "G3", "problem_type": "Geometry", "problem": "Let $A B C$ be a scalene and acute triangle, with circumcentre $O$. Let $\\omega$ be the circle with centre $A$, tangent to $B C$ at $D$. Suppose there are two points $F$ and $G$ on $\\omega$ such that $F G \\perp A O, \\angle B F D=\\angle D G C$ and the couples of points $(B, F)$ and $(C, G)$ are in different halfplanes with respect to the line $A D$. Show that the tangents to $\\omega$ at $F$ and $G$ meet on the circumcircle of $A B C$.", "solution": "Consider any two points $F, G$ on $\\omega$ such that $\\angle B F D=\\angle D G C$. Exploiting the isosceles triangles $\\triangle A F G, \\triangle A F D$, and $\\triangle A D G$, we deduce (using directed angles throughout):\n\n$$\n\\begin{gathered}\n\\angle D B F-\\angle G C D=180^{\\circ}-\\angle B F D-\\angle B D F-\\left(180^{\\circ}-\\angle D G C-\\angle C D G\\right) \\stackrel{(*)}{=} \\\\\n\\angle C D G-\\angle F D B=\\frac{1}{2} \\cdot(\\angle D A G-\\angle D A F)=\\frac{1}{2} \\cdot\\left[\\left(180^{\\circ}-2 \\cdot \\angle A D G\\right)-\\left(180^{\\circ}-2 \\cdot \\angle A D F\\right)\\right]= \\\\\n\\angle A D F-\\angle G D A=\\angle D F A-\\angle A G D=\\angle D F G-\\angle F G D \\stackrel{(*)}{=} \\angle B F G-\\angle F G C,\n\\end{gathered}\n$$\n\nwhere we use $\\angle B F D=\\angle D G C$ at $\\left(^{*}\\right)$. Thus $B F G C$ is cyclic.\n![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-17.jpg?height=1223&width=1117&top_left_y=2421&top_left_x=1563)\n\nFigure 3: G3\nNow, if in addition $F G \\perp A O$, then since $A$ is the centre of $\\omega$, in fact $A O$ is the perpendicular bisector of $F G$. But by definition, since $A B C$ is scalene, $A O$ meets the perpendicular bisector of $B C$ at $O$. Hence $O$ is the centre of $B F G C$, and thus in fact $B F A G C$ is cyclic. But then the lines perpendicular to $A F$ at $F$, and $A G$ at $G$ (the tangents to $\\omega$ ) must intersect at $E$, the point antipodal to $A$ on $\\odot B F A G C$.\n\nAlternative solution: Let the circumcircle of $A B C$ be $\\Gamma$. From the conditions, $G$ is the reflection of $F$ in the line $A O$. Let $B^{\\prime}, D^{\\prime}$ be the reflections of $B, D$ across this same line $A O$. Clearly $D^{\\prime}$ also lies on $\\omega$ and $B^{\\prime}$ lies on $\\Gamma$.\n\nThen, using directed angles, $\\angle C G D=\\angle D F B=\\angle B^{\\prime} G D^{\\prime}$ so\n\n$$\n\\angle B^{\\prime} G C=\\angle B^{\\prime} G D^{\\prime}-\\angle C G D^{\\prime}=\\angle C G D-\\angle C G D^{\\prime}=\\angle D^{\\prime} G D=\\frac{1}{2} \\angle D^{\\prime} A D=\\angle O A D .\n$$\n\nThen, exploiting the isogonality property that $\\angle D A B=\\angle C A O$, we have $\\angle O A D=\\angle C A B-2 \\angle D A B=\\angle A B C-\\angle B C A=\\angle A B C-\\angle B^{\\prime} B A=\\angle B^{\\prime} B C$.\n\nSo $G$ lies on $\\Gamma$, and by the reflection property so does $F$.\nBut then, as in the previous solution, the tangents at $F$ and $G$ to $\\omega$ must intersect at $E$, the point antipodal to $A$ on $\\Gamma$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nG3.", "solution_match": "\nSolution."}}
9
+ {"year": "2019", "tier": "T1", "problem_label": "G4", "problem_type": "Geometry", "problem": "Given an acute triangle $A B C$, let $M$ be the midpoint of $B C$ and $H$ the orthocentre. Let $\\Gamma$ be the circle with diameter $H M$, and let $X, Y$ be distinct points on $\\Gamma$ such that $A X, A Y$ are tangent to $\\Gamma$. Prove that $B X Y C$ is cyclic.", "solution": "Let $D$ be the foot of the altitude from $A$ to $B C$, which also lies on $\\Gamma$. Let $O$ be the circumcentre of $\\triangle A B C$. Since $\\angle H D M=90^{\\circ}$, note that rays $H D$ and $H M$ meet the circumcircle at points which are reflections in $O M$. Then, since $\\angle B A D=\\angle O A C$, we recover the well-known fact that ray $H M$ meets the circumcircle at $A^{\\prime}$, the point antipodal to $A$. Therefore, the ray $M H$ meets the circumcircle at a point $T$ such that $\\angle M T A=90^{\\circ}$. Note that $T, D$ lie on the circle with diameter $A M$.\n![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-19.jpg?height=1235&width=1941&top_left_y=1780&top_left_x=1157)\n\nFigure 4: G4\nNow, study $K$, the centre of $\\Gamma$. Clearly $A X K Y$ is cyclic, with diameter $A K$, so $T$ also lies on this circle. We can now apply the radical axis theorem to the three circles $\\odot A T X K Y, \\odot A T D M, \\odot H X D M Y$ to deduce that $A T, X Y, D M$ concur at a point, $Z$.\n\nThen, by power of a point in $\\odot A T X Y$, we have $Z X \\cdot Z Y=Z T \\cdot Z A$; but also by power of a point in the circumcircle, we have $Z A \\cdot Z T=Z B \\cdot Z C$. Therefore\n\n$$\nZ X \\cdot Z Y=Z B \\cdot Z C\n$$\n\nand the result follows.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nG4.", "solution_match": "\nSolution."}}
10
+ {"year": "2019", "tier": "T1", "problem_label": "G5", "problem_type": "Geometry", "problem": "Let $A B C(B C>A C)$ be an acute triangle with circumcircle $k$ centered at $O$. The tangent to $k$ at $C$ intersects the line $A B$ at the point $D$. The circumcircles of triangles $B C D, O C D$ and $A O B$ intersect the ray $C A$ (beyond $A$ ) at the points $Q, P$ and $K$, respectively, such that $P \\in(A K)$ and $K \\in(P Q)$. The line $P D$ intersects the circumcircle of triangle $B K Q$ at the point $T$, so that $P$ and $T$ are in different halfplanes with respect to $B Q$. Prove that $T B=T Q$.", "solution": "As $D C$ is tangent to $k$ at $C$ then $\\angle O C D=90^{\\circ}$. Denote by $X$ the midpoint of $A B$. Then $\\angle O X A=90^{\\circ}$ because of $O X$ is the perpendicular bisector of the side $A B$. The pentagon $P X O C D$ is inscribed in the circle with diameter $O D$, hence $\\angle P X A=$ $\\angle P X D=\\angle P C D=\\angle Q C D=\\angle Q B A$ (the latter is due to $Q B C D$ being cyclic). We deduce that $P X \\| Q B$ and that $P$ is the midpoint of $A Q$, so $A P=P Q$.\n![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-20.jpg?height=2217&width=2029&top_left_y=2006&top_left_x=1066)\n\nFigure 5: G5\nNow let $T_{1}$ be the midpoint of the arc $B Q$, not containing $K$, from the circumcircle of $\\triangle B K Q$, then $T_{1} B=T_{1} Q$. Due to $\\angle D P O=90^{\\circ}$, it suffices to show that $\\angle O P T_{1}=90^{\\circ}$ - indeed, $T \\equiv T_{1}$ and $T B=T Q$ would follow.\n\nDenote by $Y$ the midpoint of $B Q$. Then $\\angle O X B=\\angle T_{1} Y B=90^{\\circ}$. The quadrilateral $Q K B T_{1}$ is inscribed in a circle, hence $\\angle B T_{1} Q=180-\\angle B K Q=\\angle A K B$. Then $\\angle X B O=$ $\\frac{1}{2} \\angle A K B=\\frac{1}{2} \\angle B T_{1} Q=\\angle B T_{1} Y$ and thus $\\triangle O X B \\sim \\triangle B Y T_{1}$. The quadrilaterals $P X B Y$\nand $A X Y P$ are paralellograms, since $X Y$ and $P Y$ are middle lines of the triangle $A Q B$. Consequently,\n\n$$\n\\frac{O X}{X P}=\\frac{O X}{B Y}=\\frac{X B}{T_{1} Y}=\\frac{P Y}{T_{1} Y}\n$$\n\nwhich along with $\\angle P X B=\\angle P Y B$ and $\\angle O X B=\\angle T_{1} Y B$ gives $\\angle O X P=\\angle P Y T_{1}$ and $\\triangle O X P \\sim \\triangle P Y T_{1}$. Thus $\\angle X P O=\\angle Y T_{1} P$ and $\\angle P O X=\\angle T_{1} P Y$.\n\nIn conclusion,\n\n$$\n\\angle O P T_{1}=\\angle X P Y+\\angle X P O+\\angle Y P T_{1}=\\angle P X A+\\angle X P O+\\angle X O P=90^{\\circ}\n$$", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nG5.", "solution_match": "\nSolution."}}
11
+ {"year": "2019", "tier": "T1", "problem_label": "G6", "problem_type": "Geometry", "problem": "Let $A B C$ be an acute triangle, and $A X, A Y$ two isogonal lines. Also, suppose that $K, S$ are the feet of perpendiculars from $B$ to $A X, A Y$, and $T, L$ are the feet of perpendiculars from $C$ to $A X, A Y$ respectively. Prove that $K L$ and $S T$ intersect on $B C$.", "solution": "Denote $\\phi=\\widehat{X A B}=\\widehat{Y A C}, \\alpha=\\widehat{C A X}=\\widehat{B A Y}$. Then, because the quadrilaterals ABSK and ACTL are cyclic, we have\n\n$$\n\\widehat{B S K}+\\widehat{B A K}=180^{\\circ}=\\widehat{B S K}+\\phi=\\widehat{L A C}+\\widehat{L T C}=\\widehat{L T C}+\\phi,\n$$\n\nso, due to the 90-degree angles formed, we have $\\widehat{K S L}=\\widehat{K T L}$. Thus, KLST is cyclic.\n![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-22.jpg?height=1935&width=1705&top_left_y=1871&top_left_x=1257)\n\nFigure 6: G6\nConsider $M$ to be the midpoint of $B C$ and $K^{\\prime}$ to be the symmetric point of $K$ with respect to $M$. Then, $B K C K^{\\prime}$ is a parallelogram, and so $B K \\| C K^{\\prime}$. But $B K \\| C T$, because they are both perpendicular to $A X$. So, $K^{\\prime}$ lies on $C T$ and, as $\\widehat{K T K^{\\prime}}=90$ and $M$ is the midpoint of $K K^{\\prime}, M K=M T$. In a similar way, we have that $M S=M L$. Thus, the center of $(K L S T)$ is $M$.\n\nConsider $D$ to be the foot of altitude from $A$ to $B C$. Then, $D$ belongs in both $(A B K S)$ and ( $A C L T)$. So,\n\n$$\n\\widehat{A D T}+\\widehat{A C T}=180^{\\circ}=\\widehat{A B S}+\\widehat{A D S}=\\widehat{A D T}+90^{\\circ}-\\alpha=\\widehat{A D S}+90^{\\circ}-\\alpha,\n$$\n\nand $A D$ is the bisector of $\\widehat{S D T}$.\nBecause $D M$ is perpendicular to $A D, D M$ is the external bisector of this angle, and, as $M S=M T$, it follows that $D M S T$ is cyclic. In a similar way, we have that $D M L K$ is also cyclic.\n\nSo, we have that $S T, K L$ and $D M$ are the radical axes of these three circles, $(K L S T)$, $(D M S T),(D M K L)$. These lines are, therefore, concurrent, and we have proved the desired result.\n\nAlternative solution. We continue after proving that $M$ is the center of $(K L S T)$. If $D$ is the foot of perpendicular from $A$ to $B C$, then $A S D K B$ is cyclic, as well as $A T D L C$. The radical axes of those two circles and ( $K L S T)$ are concurrent, thus $K S$ and $L T$ intersect on point $Q \\in A D$. So, if $P$ is the intersection point of $K L$ and $T S$, due to Brokard's theorem, $A Q$ is perpendicular to $M P$. This is, of course, equivalent to proving that $P$ belongs on $B C$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nG6.", "solution_match": "\nSolution."}}
12
+ {"year": "2019", "tier": "T1", "problem_label": "G7", "problem_type": "Geometry", "problem": "Let $A D, B E$, and $C F$ denote the altitudes of triangle $\\triangle A B C$. Points $E^{\\prime}$ and $F^{\\prime}$ are the reflections of $E$ and $F$ over $A D$, respectively. The lines $B F^{\\prime}$ and $C E^{\\prime}$ intersect at $X$, while the lines $B E^{\\prime}$ and $C F^{\\prime}$ intersect at the point $Y$. Prove that if $H$ is the orthocenter of $\\triangle A B C$, then the lines $A X, Y H$, and $B C$ are concurrent.", "solution": "We will prove that the desired point of concurrency is the midpoint of $B C$. Assume that $\\triangle A B C$ is acute. Let $(A B C)^{5}$ intersect $(A E F)$ at the point $Y^{\\prime}$; we will prove that $Y=Y^{\\prime}$.\n![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-24.jpg?height=1623&width=1529&top_left_y=1569&top_left_x=1422)\n\nFigure 7: G7\nUsing the fact that $H$ is the incenter of $\\triangle D E F$ we get that $D, E^{\\prime}, F$ and $D, F^{\\prime}, E$ are triples of collinear points. Furthermore,\n\n$$\n90^{\\circ}=\\angle{ }^{6} A E H=\\angle A F^{\\prime} H=\\angle A E^{\\prime} H=\\angle A F H \\Rightarrow F^{\\prime}, E^{\\prime}, H \\in\\left(A E F Y^{\\prime}\\right) .\n$$\n\nWe will now prove that the points $Y^{\\prime}, B, D, F^{\\prime}$ are concyclic. Indeed,\n\n$$\n\\angle Y^{\\prime} B D=\\angle Y^{\\prime} B C=\\angle Y^{\\prime} A C=\\angle Y^{\\prime} A E=\\angle Y^{\\prime} F^{\\prime} E \\Rightarrow\\left(Y^{\\prime}, B, D, F^{\\prime}\\right) .\n$$\n\nNow, as\n\n$$\n\\angle F^{\\prime} Y^{\\prime} B=\\angle F^{\\prime} D C=\\angle E D C=\\angle C A B=\\angle C Y^{\\prime} B,\n$$\n\nthe points $C, F^{\\prime}, Y^{\\prime}$ are collinear. Similarly we get that $B, E^{\\prime}, Y^{\\prime}$ are collinear, which implies\n\n$$\nY^{\\prime}=Y=(A B C) \\cap(A E F) .\n$$\n\n[^4]Since we proved this property using directed angles, we know that it is also true for obtuse triangles.\n\nNotice that the points $A, B, C, H$ form an orthocentric system; in other words $H$ is the orthocenter of $\\triangle A B C$ and $A$ is the orthocenter $\\triangle H B C$. Furthermore, notice that $F^{\\prime}$ is to $\\triangle A B C$ as $E^{\\prime}$ is to $\\triangle H B C$ and that $E^{\\prime}$ is to $\\triangle A B C$ as $F^{\\prime}$ is to $\\triangle H B C$. This means that $X$ is to $\\triangle H B C$ as $Y$ is to $\\triangle A B C$ and, as we know the proven property is also true for obtuse triangles, we get\n\n$$\nX=(H B C) \\cap(A E F) .\n$$\n\nBy Reflecting the Orthocenter Lemma we know that in a triangle $A B C$, the reflection of its orthocenter over the midpoint of $B C$ is the antipode of $A$ w.r.t. ( $A B C$ ). Applying this Lemma on the triangles $A B C$ and $H B C$ we get that $Y H$ and $A X$ both go through the midpoint of $B C$, thus finishing the solution.\n\nRemark 1: The crucial part of this solution is defining the points $X, Y$ as intersections of circles. This can also be achieved directly by using similar triangles or by using the Spiral Similarity Lemma on $\\triangle H B C, \\triangle H F^{\\prime} E^{\\prime}$ and $\\triangle A B C, \\triangle A E^{\\prime} F^{\\prime}$.\n\nRemark 2: We can also invert around $A$ with radius $\\sqrt{A H \\cdot A D}$ or around $H$ with radius $\\sqrt{H A \\cdot H D}$ to prove that $X$ or $Y$ invert to the midpoint of $B C$ by using the existence of the nine-point circle.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nG7.", "solution_match": "\nSolution."}}
13
+ {"year": "2019", "tier": "T1", "problem_label": "G8", "problem_type": "Geometry", "problem": "Given an acute triangle $A B C,(c)$ is circumcircle with center $O$ and $H$ the orthocenter of the triangle $A B C$. The line $A O$ intersects $(c)$ at the point $D$. Let $D_{1}, D_{2}$ and $H_{2}, H_{3}$ be the symmetrical points of the points $D$ and $H$ with respect to the lines $A B, A C$ respectively. Let $\\left(c_{1}\\right)$ be the circumcircle of the triangle $A D_{1} D_{2}$. Suppose that the line $A H$ intersects again $\\left(c_{1}\\right)$ at the point $U$, the line $H_{2} H_{3}$ intersects the segment $D_{1} D_{2}$ at the point $K_{1}$ and the line $D H_{3}$ intersects the segment $U D_{2}$ at the point $L_{1}$. Prove that one of the intersection points of the circumcircles of the triangles $D_{1} K_{1} H_{2}$ and $U D L_{1}$ lies on the line $K_{1} L_{1}$.", "solution": "It is well known that the symmetrical points $H_{1}, H_{2}, H_{3}$ of $H$ with respect the sides $B C, A B, A C$ of the triangle $A B C$ respectively lie on the circle (c).\n![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-26.jpg?height=2087&width=2264&top_left_y=1895&top_left_x=972)\n\nFigure 8: G8\nLet $L$ be the second point of intersection of $(c)$ and $\\left(c_{1}\\right)$. First we will prove that the lines $D_{1} H_{2}, D_{2} H_{3}$ and $U D$ pass through the point $L$.\n\nSuppose that the line $A H$ intersects the side $B C$ at the point $Z$. Since $H_{1} D\\|B C\\| D_{1} D_{2}$ and $B, C$ are the midpoints of the segments $D_{1} D, D_{2} D$ respectively, we get that $Z$ is the midpoint of the segment $H H_{1}$, so the point $H$ lies on $D_{1} D_{2}$. Therefore, $A H \\perp D_{1} D_{2}$ and $A U$ is a diameter of $\\left(c_{1}\\right)$. Thus, $A L \\perp U L$ and $A L \\perp D L$. We have that the points $U, D, L$ are collinear. (1)\n\nNow, $\\angle A L D_{1}=\\angle A D_{2} D_{1}, \\angle A L H_{2}=\\angle A C H_{2}$. Since $A H C D_{2}$ is cyclic we get\n$\\angle A C H_{2}=\\angle A D_{2} D_{1}$. Therefore, $\\angle A L H_{2}=\\angle A L D_{1}$. So the points $D_{1}, H_{2}, L$ are collinear. (2)\n\nSimilarly,\n\n$$\n\\angle D_{1} L D_{2}=\\angle D_{1} A D_{2}=180^{\\circ}-2\\left(\\angle A D_{1} H\\right) .\n$$\n\nSince $A D_{1} B H$ is cyclic we have $\\angle A D_{1} H=\\angle A B H=\\angle A B H_{3}$. Therefore, we get\n\n$$\n\\angle D_{1} L D_{2}=180^{\\circ}-2\\left(\\angle A B H_{3}\\right)=180^{\\circ}-2\\left(\\angle A D H_{3}\\right)=180^{\\circ}-\\angle H_{2} D H_{3} .\n$$\n\nThus,\n\n$$\n\\angle D_{1} L D_{2}+\\angle H_{2} D H_{3}=180^{\\circ} \\quad \\text { or } \\angle D_{1} L D_{2}+\\angle H_{3} L H_{2}=180^{\\circ} .\n$$\n\nSo the points $H_{3}, L, D_{2}$ are collinear. (3)\nFrom (1), (2), (3) we have that the lines $D_{1} H_{2}, D_{2} H_{3}$ and $U D$ are concurrent at the point $L$.\n\nAlso we have\n\n$$\n\\angle H_{3} D A=\\angle D_{2} D A-\\angle C D H_{3}=\\angle A D_{2} D-\\angle C B H_{3}\n$$\n\nand because $B \\mathrm{HD}_{2} \\mathrm{C}$ is a parallelogram, we get $\\angle C B H_{3}=\\angle H D_{2} C$. So\n\n$$\n\\angle H_{3} D A=\\angle A D_{2} D-\\angle H D_{2} C=\\angle A D_{2} D_{1}=\\angle A D_{1} D_{2}=\\angle A U D_{2} .\n$$\n\nTherefore, the circumcircle of the triangle $U D L_{1}$ passes through the point $A$. Also, $\\angle A D_{1} K_{1}=\\angle D_{2} D_{1} A=\\angle D_{2} U A$. But $A U L_{1} D$ is cyclic and we have $\\angle D_{2} U A=\\angle H_{3} D A=$ $\\angle H_{3} B A=\\angle H_{3} H_{2} A$. Therefore, $\\angle A D_{1} K_{1}=\\angle H_{3} H_{2} A$. Thus, the circumcircle of the triangle $D_{1} K_{1} H_{2}$ passes through the point $A$.\n\nBecause the points $H_{3}, L, D_{2}$ are collinear by the Desargues theorem, the lines $U D_{1}$, $L_{1} K_{1}, D H_{2}$ are concurrent, let say in the point $M$.\n\nFrom the similarity of the triangles $U D L_{1}$ and $D_{1} K_{1} H_{2}$ we conclude that $M$ is the center of unique spiral similarity and because the circumcircles of the triangles $D_{1} K_{1} H_{2}$ and $U D L_{1}$ intersect at the point $A$, then the second point of intersection is $M$. Therefore, $M$ lies on the line $K_{1} L_{1}$.\n\nComment. We can prove the last part in a different way.\nLet $M$ be the point of intersection of the circumcircles of the triangles $D_{1} K_{1} H_{2}$ and $U D L_{1}$. Now, we have\n\n$$\n\\angle K_{1} M A=\\angle H_{3} H_{2} A=\\angle H_{3} B A=\\angle A D H_{3}=\\angle L_{1} U A=\\angle L_{1} M A .\n$$\n\nTherefore, the points $L_{1}, K_{1}, M$ are collinear.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nG8.", "solution_match": "\nSolution."}}
14
+ {"year": "2019", "tier": "T1", "problem_label": "G9", "problem_type": "Geometry", "problem": "Given semicircle (c) with diameter $A B$ and center $O$. On the (c) we take point $C$ such that the tangent at the $C$ intersects the line $A B$ at the point $E$. The perpendicular line from $C$ to $A B$ intersects the diameter $A B$ at the point $D$. On the (c) we get the points $H, Z$ such that $C D=C H=C Z$. The line $H Z$ intersects the lines $C O, C D, A B$ at the points $S, I, K$ respectively and the parallel line from $I$ to the line $A B$ intersects the lines $C O, C K$ at the points $L, M$ respectively. We consider the circumcircle $(k)$ of the triangle $L M D$, which intersects again the lines $A B, C K$ at the points $P, U$ respectively. Let $\\left(e_{1}\\right)$, $\\left(e_{2}\\right),\\left(e_{3}\\right)$ be the tangents of the $(k)$ at the points $L, M, P$ respectively and $R=\\left(e_{1}\\right) \\cap\\left(e_{2}\\right)$, $X=\\left(e_{2}\\right) \\cap\\left(e_{3}\\right), T=\\left(e_{1}\\right) \\cap\\left(e_{3}\\right)$. Prove that if $Q$ is the center of $(k)$, the lines $R D, T U$, $X S$ pass through the same point, which lies in the line $I Q$.", "solution": "Since $C H=C Z$ we have $O C \\perp H Z$. So from the cyclic quadrilateral $S O D I$ we get\n\n$$\nC S \\cdot C O=C I \\cdot C D .\n$$\n\n![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-28.jpg?height=1900&width=2528&top_left_y=2200&top_left_x=846)\n\nFigure 9: G9\nWe draw the perpendicular line $(v)$ to $H C$ at the point $H$. Let $J$ be the intersection point of lines $(v)$ and $C O$. Then $C J$ is diameter of the circle $(O, O A)$ and\n\n$$\nC J=2 C O\n$$\n\nFrom the right triangle $J H C$ we have\n\n$$\nH C^{2}=C S \\cdot C J\n$$\n\nTherefore, from (1), (2) and (3) we get\n\n$$\nC S \\cdot \\frac{1}{2} C J=C I \\cdot C D \\quad \\text { or } \\quad H C^{2}=2 C I \\cdot C D \\text {. }\n$$\n\nHowever $H C=C D$ and thus $C D=2 C I$. Thus, $I$ is the midpoint of the segment $C D$. Nevertheless, $L M \\| O K$, so the points $L, M$ are the midpoints of the sides $C O$ and $C K$ respectively. Therefore, the circumcircle $(k)$ of the triangle $L M D$ is the Euler circle of the $C O K$ and thus it passes through the point $S$.\n\nWe have $Q S=Q U$ and from the right triangles $O S K, O U K$ we get $P S=P U=\\frac{O K}{2}$.\nTherefore, the points $P, Q$ are located on the perpendicular bisector of the segment $S U$. Now, we conclude that $S U \\| T X$, because $Q P \\perp\\left(e_{3}\\right)$. Similarly, we prove that $D U \\| R T$ and $S D \\| R X$.\n\nSince the triangles $S U D$ and $X T R$ are homothetic we get that the lines $R D, T U, X S$ are concurrent at the center $\\mathcal{M}$ of homothety.\n\nThe points $I$ and $Q$ atre the incenters of homothetic triangles $S U D$ and $X T R$, respectively. Thus, the line $I Q$ passes through the point $\\mathcal{M}$.\n\n## NUMBER THEORY", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nG9.", "solution_match": "\nSolution."}}
15
+ {"year": "2019", "tier": "T1", "problem_label": "TN1", "problem_type": "Number Theory", "problem": "Let $\\mathbb{P}$ be the set of all prime numbers. Find all functions $f: \\mathbb{P} \\rightarrow \\mathbb{P}$ such that\n\n$$\nf(p)^{f(q)}+q^{p}=f(q)^{f(p)}+p^{q}\n$$\n\nholds for all $p, q \\in \\mathbb{P}$.", "solution": "Obviously, the identical function $f(p)=p$ for all $p \\in \\mathbb{P}$ is a solution. We will show that this is the only one.\n\nFirst we will show that $f(2)=2$. Taking $q=2$ and $p$ any odd prime number, we have\n\n$$\nf(p)^{f(2)}+2^{p}=f(2)^{f(p)}+p^{2} .\n$$\n\nAssume that $f(2) \\neq 2$. It follows that $f(2)$ is odd and so $f(p)=2$ for any odd prime number $p$.\n\nTaking any two different odd prime numbers $p, q$ we have\n\n$$\n2^{2}+q^{p}=2^{2}+p^{q} \\Rightarrow p^{q}=q^{p} \\Rightarrow p=q,\n$$\n\ncontradiction. Hence, $f(2)=2$.\nSo for any odd prime number $p$ we have\n\n$$\nf(p)^{2}+2^{p}=2^{f(p)}+p^{2} .\n$$\n\nCopy this relation as\n\n$$\n2^{p}-p^{2}=2^{f(p)}-f(p)^{2}\n$$\n\nLet $T$ be the set of all positive integers greater than 2 , i.e. $T=\\{3,4,5, \\ldots\\}$. The function $g: T \\rightarrow \\mathbb{Z}, g(n)=2^{n}-n^{2}$, is strictly increasing, i.e.\n\n$$\ng(n+1)-g(n)=2^{n}-2 n-1>0\n$$\n\nfor all $n \\in T$. We show this by induction. Indeed, for $n=3$ it is true, $2^{3}-2 \\cdot 3-1>0$. Assume that $2^{k}-2 k-1>0$. It follows that for $n=k+1$ we have\n\n$$\n2^{k+1}-2(k+1)-1=\\left(2^{k}-2 k-1\\right)+\\left(2^{k}-2\\right)>0\n$$\n\nfor any $k \\geq 3$. Therefore, (2) is true for all $n \\in T$.\nAs consequence, (1) holds if and only if $f(p)=p$ for all odd prime numbers $p$, as well as for $p=2$.\n\nTherefore, the only function that satisfies the given relation is $f(p)=p$, for all $p \\in \\mathbb{P}$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nTN1.", "solution_match": "\nSolution."}}
16
+ {"year": "2019", "tier": "T1", "problem_label": "TN2", "problem_type": "Number Theory", "problem": "Let $S \\subset\\{1, \\ldots, n\\}$ be a nonempty set, where $n$ is a positive integer. We denote by $s$ the greatest common divisor of the elements of the set $S$. We assume that $s \\neq 1$ and let $d$ be its smallest divisor greater than 1 . Let $T \\subset\\{1, \\ldots, n\\}$ be a set such that $S \\subset T$ and $|T| \\geq 1+\\left[\\frac{n}{d}\\right]$. Prove that the greatest common divisor of the elements in $T$ is 1 .", "solution": "Let $t$ be the greatest common divisor of the elements in $T$. Due to the fact that $S \\subset T$, we immediately get that $t / s$. Let us assume for the sake of contradiction that $t \\neq 1$. From the previous observation we get that $t \\geq d$.\n\nBy taking into account that $|T| \\geq 1+\\left[\\frac{n}{d}\\right]$, we infer that we can find at least $1+\\left[\\frac{n}{d}\\right]$ elements in $T$. All of them will be divisible by $t$, and the largest of them, which we shall denote by $M$, will be at least $t \\cdot\\left(1+\\left[\\frac{n}{d}\\right]\\right)$. On the other hand, $t \\geq d$, hence\n\n$$\nM \\geq t \\cdot\\left(1+\\left[\\frac{n}{d}\\right]\\right) \\geq d \\cdot\\left(1+\\left[\\frac{n}{d}\\right]\\right)>d \\cdot \\frac{n}{d}=n\n$$\n\nTherefore, $M>n$, which contradicts the fact that $M \\in\\{1, \\ldots, n\\}$.\nIn conclusion, $t=1$, as desired.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nTN2.", "solution_match": "\nSolution."}}
17
+ {"year": "2019", "tier": "T1", "problem_label": "TN2b", "problem_type": "Number Theory", "problem": "Let $n(n \\geq 1)$ be a positive integer and $U=\\{1, \\ldots, n\\}$. Let $S$ be a nonempty subset of $U$ and let $d(d \\neq 1)$ be the smallest common divisor of all elements of the set $S$. Find the smallest positive integer $k$ such that for any subset $T$ of $U$, consisting of $k$ elements, with $S \\subset T$, the greatest common divisor of all elements of $T$ is equal to 1 .", "solution": "We will show that $k_{\\min }=1+\\left[\\frac{n}{d}\\right]$ (here [.] denotes the integer part).\nObviously, the number of elements of $S$ is not grater than $\\left[\\frac{n}{d}\\right]$, i.e. $|S| \\leq\\left[\\frac{n}{d}\\right]$, and $S \\neq U$.\n\nIf $S \\subset T$ and the greatest common divisor of elements of $T$ is equal to 1 , then $|T| \\geq|S|+1$.\n\n1) Assume that $|S|<\\left[\\frac{n}{d}\\right]$. Let $T$ be the subset of $U$, consisting of all multiples of $d$ in $U$. Thus, $|T|=\\left[\\frac{n}{d}\\right]$ and $S \\subset T$. Therefore, the greatest common divisor of all elements of $T$ is $d>1$. Thus, $k \\geq 1+\\left[\\frac{n}{d}\\right]$.\n2) Assume $|S|=\\left[\\frac{n}{d}\\right]$. Let $T$ be any subset of $U$ with $S \\subset T, S \\neq T$. Therefore, $|T| \\geq 1+\\left[\\frac{n}{d}\\right]$. Let $q$ be the greatest common divisor of all elements of $T$. Assume that $q>1$. Therefore, $q$ is a common divisor of all elements of $S$ as well. Hence, $q \\geq d$. It follows that $|T| \\leq\\left[\\frac{n}{q}\\right] \\leq\\left[\\frac{n}{d}\\right]$, contradiction. Hence, $q=1$.\n\nTherefore, the minimal possible value of $k$ is $1+\\left[\\frac{n}{d}\\right]$.\n\n[^5]\n## COMBINATORICS", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nTN2b. ${ }^{7}$", "solution_match": "\nSolution."}}
18
+ {"year": "2019", "tier": "T1", "problem_label": "C1", "problem_type": "Combinatorics", "problem": "100 couples are invited to a traditional Moldovan dance. The 200 people stand in a line, and then in a step, two of them (not necessarily adjacent) may swap positions. Find the least $C$ such that whatever the initial order, they can arrive at an ordering where everyone is dancing next to their partner in at most $C$ steps.", "solution": "With 100 replaced by $N$, the answer is $C=C(N)=N-1$. Throughout, we will say that the members of a couple have the same.\n$N=2$ : We use this as a base case for induction for both bounds. Up to labelling, there is one trivial initial order, and two non-trivial ones, namely\n\n$$\n1,1,2,2 ; \\quad 1, \\sqrt{2,2,1} ; \\quad 1, \\sqrt{2,1}, 2\n$$\n\nThe brackets indicate how to arrive at a suitable final ordering with one step. Obviously one step is necessary in the second and third cases.\n\nUpper bound: First we show $C(N) \\leq N-1$, by induction. The base case $N=2$ has already been seen. Now suppose the claim is true for $N-1$, and consider an initial arrangement of $N$ couples. Suppose the types of the left-most couples in line are $a$ and $b$. If $a \\neq b$, then in the first step, swap the $b$ in place two with the other person with type $a$. If $a=b$, skip this. In both cases, we now have $N-1$ couples distributed among the final $2 N-2$ places, and we know that $N-2$ steps suffices to order them appropriately, by induction. So $N-1$ steps suffices for $N$ couples.\n\nLower bound: We need to exhibit an example of an initial order for which $N-1$ steps are necessary. Consider\n\n$$\n\\mathcal{A}_{N}:=1,2,2,3,3, \\ldots, N-1, N-1, N, N, 1\n$$\n\nProceed by induction, with the base case $N=2$ trivial. Suppose there is a sequence of at most $N-2$ steps which works. In any suitable final arrangement, a given type must be in positions (odd, even), whereas they start in positions (even, odd). So each type must be involved in at least one step. However, each step involves at most two types, so by the pigeonhole principle, at least four types are involved in at most one step. Pick one such type $a \\neq 1$. The one step involving $a$ must be one of\n\n$$\n\\ldots, ?, a, a, ?, \\ldots .\n$$\n\nNeither of these steps affects the relative order of the $2 N-2$ other people. So by ignoring this step involving the $a$, we have a sequence of at most $N-3$ steps acting on the other $2 N-2$ people which appropriately sorts them. By induction, this is a contradiction.\n\nAlternative lower bound I: Consider the graph with vertices given by pairs of positions $\\{(1,2),(3,4), \\ldots,(2 N-1,2 N)\\}$. We add an edge between pairs of (different)\nvertices if we ever swap two people in places corresponding to those vertices. In particular, at the end, the two people with type $k$ end up in places corresponding to a single vertex.\n\nSuppose we start from the ordering (1) and have some number of steps leading to an ordering where everyone is next to their partner. Then, in the induced graph, there is a path between the vertices corresponding to the places $(2 k-3,2 k-2)$ and $(2 k-1,2 k)$ for each $2 \\leq k \\leq N$, and also between $(1,2)$ and $(2 N-1,2 N)$. In other words, the graph is connected, and so must have at least $N-1$ edges.\n\nAlternative lower bound II: Consider a bipartite multigraph with vertex classes $\\left(v_{1}, \\ldots, v_{n}\\right)$ and $\\left(w_{1}, \\ldots, w_{n}\\right)$. Connect $v_{i}$ to $w_{j}$ if a person of type $j$ is in positions ( $2 i-1,2 i$ ) (if both positions are taken by the type $j$ couple, then add two edges).\n\nEach step in the dance consists of replacing edges $\\left.E=\\left\\{v_{a} \\leftrightarrow w_{c}, v_{b} \\leftrightarrow w_{d}\\right)\\right\\}$ with $E^{\\prime}=\\left\\{v_{a} \\leftrightarrow w_{d}, v_{b} \\leftrightarrow w_{c}\\right\\}$. However, both before and after the step, the number of components in the graph which include $\\left\\{v_{a}, v_{b}, w_{c}, w_{d}\\right\\}$ is either one or two. The structure of other components which do not include these vertices is unaffected by the move.\n\nTherefore, the number of connected components increases by at most 1 in each step.\nStarting from configuration (1), the graph initially consists of a single (cyclic) component, so one requires at least $n-1$ steps to get to the final configuration for which there are $n$ connected components.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nC1.", "solution_match": "\nSolution."}}
19
+ {"year": "2019", "tier": "T1", "problem_label": "C2b", "problem_type": "Combinatorics", "problem": "An $5 \\times 5$ array must be completed with all numbers $\\{1,2, \\ldots, 25\\}$, one number in each cell. Find the maximal positive integer $k$, such that for any completion of the array there is a $2 \\times 2$ square (subarray), whose numbers have a sum not less than $k$.", "solution": "We will prove that $k_{\\max }=45$.\nWe number the columns and the rows and we select all possible $3^{2}=9$ choices of an odd column with an odd row.\n\nCollecting all such pairs of an odd column with an odd row, we double count some squares. Indeed, we take some $3^{2}$ squares 5 times, some 12 squares 3 times and there are some 4 squares (namely all the intersections of an even column with an even row) that we don't take in such pairs.\n\nIt follows that the maximal total sum over all $3^{2}$ choices of an odd column with an odd row is\n\n$$\n5 \\times(17+18+\\cdots+25)+3 \\times(5+6+\\cdots+16)=1323\n$$\n\nSo, by an averaging argument, there exists a pair of an odd column with an odd row with sum at most $\\frac{1323}{9}=147$.\n\nThen all the other squares of the array will have sum at least\n\n$$\n(1+2+\\cdots+25)-147=178\n$$\n\nBut for these squares there is a tiling with $2 \\times 2$ arrays, which are 4 in total. So there is an $2 \\times 2$ array, whose numbers have a sum at least $\\frac{178}{4}>44$. So, there is a $2 \\times 2$ array whose numbers have a sum at least 45 . This argument gives that\n\n$$\nk_{\\max } \\geq 45 .\n$$\n\nWe are going now to give an example of an array, in which 45 is the best possible. We fill the rows of the array as follows:\n\n| 25 | 5 | 24 | 6 | 23 |\n| :---: | :---: | :---: | :---: | :---: |\n| 11 | 4 | 12 | 3 | 13 |\n| 22 | 7 | 21 | 8 | 20 |\n| 14 | 2 | 15 | 1 | 16 |\n| 19 | 9 | 18 | 10 | 17 |\n\nWe are going now to even rows:\nIn the above array, every $2 \\times 2$ subarray has a sum, which is less or equal to 45 . This gives that\n\n$$\nk_{\\max } \\leq 45 .\n$$\n\nA combination of (1) and (2) gives that $k_{\\max }=45$.\n\n[^6]C3. Anna and Bob play a game on the set of all points of the form $(m, n)$ where $m, n$ are integers with $|m|,|n| \\leqslant 2019$. Let us call the lines $x= \\pm 2019$ and $y= \\pm 2019$ the boundary lines of the game. The points of these lines are called the boundary points. The neighbours of point $(m, n)$ are the points $(m+1, n),(m-1, n),(m, n+1),(m, n-1)$.\n\nAnna starts with a token at the origin ( 0,0 ). With Bob playing first, they alternately perform the following steps: At his turn, Bob deletes two points on each boundary line. On her turn Anna makes a sequences of three moves of the token, where a move of the token consists of picking up the token from its current position and placing it in one of its neighbours.\n\nTo win the game Anna must place her token on a boundary point before it is deleted by Bob. Does Anna have a winning strategy?\n[Note: At every turn except perhaps her last, Anna must make exactly three moves.]", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nC2b. ${ }^{8}$", "solution_match": "\nSolution."}}
20
+ {"year": "2019", "tier": "T1", "problem_label": "C2b", "problem_type": "Combinatorics", "problem": "An $5 \\times 5$ array must be completed with all numbers $\\{1,2, \\ldots, 25\\}$, one number in each cell. Find the maximal positive integer $k$, such that for any completion of the array there is a $2 \\times 2$ square (subarray), whose numbers have a sum not less than $k$.", "solution": "Anna does not have a winning strategy. We will provide a winning strategy for Bob. It is enough to describe his strategy for the deletions on the line $y=2019$.\n\nBob starts by deleting $(0,2019)$ and $(-1,2019)$. Once Anna completes her step, he deletes the next two available points on the left if Anna decreased her $x$-coordinate, the next two available points on the right if Anna increased her $x$-coordinate, and the next available point to the left and the next available point to the right if Anna did not change her $x$-coordinate. The only exception to the above rule is on the very first time Anna decreases $x$ by exactly 1 . In that step, Bob deletes the next available point to the left and the next available point to the right.\n\nBob's strategy guarantees the following: If Anna makes a sequence of steps reaching $(-x, y)$ with $x>0$ and the exact opposite sequence of moves in the horizontal direction reaching $(x, y)$ then Bob deletes at least as many points to the left of $(0,2019)$ in the first sequence than points to the right of $(0,2019)$ in the second sequence.\n\nSo we may assume for contradiction that Anna wins by placing her token at $(k, 2019)$ for some $k>0$.\n\nDefine $\\Delta=3 m-(2 x+y)$ where $m$ is the total number of points deleted by Bob to the right of $(0,2019)$, and $(x, y)$ is the position of Anna's token.\n\nFor each sequence of steps performed first by Anna and then by Bob, $\\Delta$ does not decrease. This can be seen by looking at the following table exhibiting the changes in $3 m$ and $2 x+y$. We have excluded the cases where $2 x+y<0$.\n\n| Step | $(0,3)$ | $(1,2)$ | $(-1,2)$ | $(2,1)$ | $(0,1)$ | $(3,0)$ | $(1,0)$ | $(2,-1)$ | $(1,-2)$ |\n| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| $m$ | 1 | 2 | 0 (or 1$)$ | 2 | 1 | 2 | 2 | 2 | 2 |\n| $3 m$ | 3 | 6 | 0 (or 3$)$ | 6 | 3 | 6 | 6 | 6 | 6 |\n| $2 x+y$ | 3 | 4 | 0 | 5 | 1 | 6 | 2 | 3 | 0 |\n\nThe table also shows that if in this sequence of steps Anna changes $y$ by +1 or -2 then $\\Delta$ is increased by 1 . Also, if Anna changes $y$ by +2 or -1 then the first time this happens $\\Delta$ is increased by 2 . (This also holds if her move is $(0,-1)$ or $(-2,-1)$ which are not shown in the table.)\n\nSince Anna wins by placing her token at $(k, 2019)$ we must have $m \\leqslant k-1$ and $k \\leqslant 2018$. So at that exact moment we have:\n\n$$\n\\Delta=3 m-(2 k+2019)=k-2022 \\leqslant-4 .\n$$\n\nSo in her last turn she must have decreased $\\Delta$ by at least 4 . So her last step must have been $(1,2)$ or $(2,1)$ which give a decrease of 4 and 5 respectively. (It could not be $(3,0)$ because then she must have already won. Also she could not have done just one or two moves in her last turn since this is not enough for the required decrease in $\\Delta$.)\n\nIf her last step was $(1,2)$ then just before doing it we had $y=2017$ and $\\Delta=0$. This means that in one of her steps the total change in $y$ was not $0 \\bmod 3$. However in that case we have seen that $\\Delta>0$, a contradiction.\n\nIf her last step was $(2,1)$ then just before doing it we had $y=2018$ and $\\Delta=0$ or $\\Delta=1$. So she must have made at least two steps with the change of $y$ being +1 or -2 or at least one step with the change of $y$ being +2 or -1 . In both cases, consulting the table, we get an increase of at least 2 in $\\Delta$, a contradiction.\n\nNote 1: If Anna is allowed to make at most three moves at each step, then she actually has a winning strategy.\n\nNote 2: If 2019 is replaced by $N>1$ then Bob has a winning strategy if and only if $3 \\mid N$.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nC2b. ${ }^{8}$", "solution_match": "\nSolution."}}
21
+ {"year": "2019", "tier": "T1", "problem_label": "C4", "problem_type": "Combinatorics", "problem": "A town-planner has built an isolated city whose road network consists of 2 N roundabouts, each connecting exactly three roads. A series of tunnels and bridges ensure that all roads in the town meet only at roundabouts. All roads are two-way, and each roundabout is oriented clockwise.\n\nVlad has recently passed his driving test, and is nervous about roundabouts. He starts driving from his house, and always takes the first exit at each roundabout he encounters. It turns out his journey includes every road in the town in both directions before he arrives back at the starting point in the starting direction. For what values of $N$ is this possible?", "solution": "$N$ odd. In fact, the number of trajectories has the same parity as $N$.\nThe setting is a (multi)graph where every vertex has degree three. Each vertex has an orientation, an ordering of its incident edges. We call Vlad's possible paths trajectories, and a complete trajectory if he traverses every edge in both directions. We may assume the multigraph is connected, as otherwise a complete trajectory is certainly not possible.\n\nN odd (construction): There is an example when $N=1$, as shown in Figure 10.\n![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-37.jpg?height=548&width=671&top_left_y=2312&top_left_x=1774)\n\nFigure 10: C4: $\\quad N=1$\n\nThere are two 3-regular graphs on two vertices, the handcuffs and theta. The handcuffs fail since each self-loop has its own trajectory, but the theta does work for two of the four possible orientations.\n\nWe now construct examples for $N \\geq 3$ odd by induction. Suppose we have a valid 3 -regular graph on $2(N-2)$ vertices, such that Vlad's trajectory is complete. This has at least two (undirected) edges, so pick two of them, $e$ and $e^{\\prime}$. (It does not matter if they share incident vertices.) Split both $e$ and $e^{\\prime}$ into three, by adding two new vertices to each, and connect as in Figure 11.\n\nNew vertices have degree three; other degrees are unchanged, so the graph is still 3regular. For each edge $e$ and $e^{\\prime}$, pick a direction. (Both $u p$ in the figure.) These directed edges are part of the complete trajectory given by the induction hypothesis. Choose the orientations of the new vertices to preserve these two sections of the trajectory. The remaining two directed edges in the original graph will end up as partial trajectories in the new graph (see Figure 11).\n\nHowever, because all the new partial trajectories start and finish at the same places and in the same directions in the original graph, and no other directed edges are changed, the trajectory remains complete. The result for $N$ odd follows by induction.\n$\\mathbf{N}$ even: Split each edge $e$ in the graph into two directed edges $\\overleftarrow{e}$ and $\\vec{e}$. Let $D$ be the set of the $6 N$ directed edges. Let $\\alpha$ be the permutation of $D$ which exchanges $\\overleftarrow{e}$\n![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-38.jpg?height=489&width=977&top_left_y=649&top_left_x=1627)\n\nFigure 11: C4: Trajectories in the old and new graphs\nand $\\vec{e}$.\nNow, for each roundabout $v$, let $\\overleftarrow{e_{1}}, \\overleftarrow{e_{2}}, \\overleftarrow{e_{3}}$ be the three directed edges into $v$. The roundabout has a cyclic orientation, either $\\left(\\overleftarrow{e_{1}}, \\overleftarrow{e_{2}}, \\overleftarrow{e_{3}}\\right)$ or $\\left(\\overleftarrow{e_{1}}, \\overleftarrow{e_{3}}, \\overleftarrow{e_{2}}\\right)$. Let $\\theta\\left(\\overleftarrow{e_{1}}\\right)$ describe the directed edge after $\\overleftarrow{e_{1}}$ in this orientation. By considering all roundabouts, $\\theta$ is also a permutation of $D$.\n\nNote that $\\theta\\left(\\overleftarrow{e_{1}}\\right)$ is directed towards $v$, so the directed edge after $\\overleftarrow{e_{1}}$ in a trajectory is $\\alpha\\left(\\theta\\left(\\overleftarrow{e_{1}}\\right)\\right)$. So Vlad makes a complete trajectory precisely if $\\alpha \\theta$ is a cyclic permutation of $D$. Note that the cycle type of $\\theta$ is $(3,3, \\ldots, 3)$, and the cycle type of $\\alpha$ is $(2,2, \\ldots, 2)$. So $\\theta$ is always an even permutation, while $\\alpha$ is an even permutation precisely when $N$ is even.\n\nHowever, a cyclic permutation of $D$ is always odd, since $|D|=6 N$ is even. So there is certainly no complete trajectory when $N$ is even.\n\nAlternative I: We claim that in a graph with $E$ edges, and $V$ vertices, the number of trajectories, $T$, has the same parity as $V+E$. We allow degenerate cases of this statement, for example graphs that are disconnected, or trajectories that consist of only a single vertex, so that the graph that consists of $V$ vertices and no edges has precisely $V$ trajectories, and thus satisfies the given claim. This shows that $N$ cannot be even.\n\nWe prove the claim by induction on $E$. Suppose we are given a graph with $E \\geq 1$ edges and $T$ trajectories. Then consider any edge $e$, and its two directions $\\vec{e}, \\overleftarrow{e}$. Let $A$ be the sequence of directed edges starting from the one after $\\vec{e}$ in its trajectory, ending at the edge before $\\overleftarrow{e}$ or $\\vec{e}$, whichever appears first. Similarly define $B$ starting after $\\overleftarrow{e}$. $A$ and $B$ are disjoint, and may be empty.\n![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-38.jpg?height=430&width=841&top_left_y=3887&top_left_x=978)\n\nFigure 12: C4: (a) Initial trajectories.\n![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-38.jpg?height=442&width=853&top_left_y=3893&top_left_x=2430)\n(b) After removing $e$\n\nWe consider removing $e$, but otherwise keep the orientations at its incident vertices the same. Then if $\\vec{e}, \\overleftarrow{e}$ are in different trajectories, these are the concatenations ( $\\vec{e}, A)$ and $(\\overleftarrow{e}, B)$. After removing $e$, for each direction $\\overleftarrow{e}, \\vec{e}$, instead of proceeding onto this directed edge, the relevant trajectory moves to the other trajectory. In other words, the resulting trajectory is the concatenation $(A, B)$. So $T$ decreases by one.\n\nSimilarly, if both directions of $e$ are part of the same trajectory, this is the concatenation $(\\vec{e}, A, \\overleftarrow{e}, B)$. Then when we remove $e$, this splits into the two trajectories $(A)$ and $(B)$, by an essentially identical argument. So $T$ increases by one. Thus in both cases, removing one edge changes the parity of $T$, and so the claim follows by induction on $E$.\n\nIn the original setting we have $V=2 N, E=3 N$, so $T$ must have the same parity as $5 N$. Thus $T=1$ is impossible when $N$ is even.\n\nAlternative II: An alternative is to induct on $N$, using the following stronger claim.\nClaim: You can't have exactly one trajectory for $N$ even; nor exactly two trajectories for a connected graph with $N$ odd.\n\nProof of claim: We have to check that the claim is true for $N=1,2$. Checking $N=2$ requires a couple of case. Alternatively, one can argue that a single cyclic edge with no vertices (!) counts as the case $N=0$. Now use strong induction by contradiction. If $N$ is even, but has exactly one trajectory, then there are no self-loops, so pick any edge $e$, connecting vertices $v \\neq w$. Remove $e$, then remove $v$, and connect $v$ 's other two incident edges (which are distinct from each other and $e$ ) to form a single edge. Do the same for $w$.\n![](https://cdn.mathpix.com/cropped/2024_12_07_82afe765b60b274413c4g-39.jpg?height=389&width=1183&top_left_y=2427&top_left_x=1536)\n\nFigure 13: C4: Trajectories in the old and new graphs\nThe effect on the trajectories is shown in Figure 13. Note that the new graph is still 3-regular. We then argue as in Proof I that this operation splits the trajectory into two. So if the new graph is connected, this contradicts the hypothesis for $N-1$. Alternately, the new graph might consist of two components. Since it is 3 -regular, each component has an even number of vertices. The total number of vertices is $2(N-1)$, which is 2 modulo 4 , and so one of the components has a number of vertices which is a multiple of four, and a complete trajectory of this component, which also contradicts the induction hypothesis.\n\nNow suppose $N$ is odd, but the original oriented graph has exactly two trajectories. If there is a self-loop at some vertex $v$, then one of the trajectories involves only this self-loop. So remove this vertex, and consider the other vertex $w$ connected to $v$. Remove $w$ and join up its other two incident edges. The resulting graph corresponds to $N$ even, and has a complete trajectory, which is a contradiction.\n\nOtherwise, there are no self-loops, but the graph is connected hence there must be one edge $e$ connecting vertices $v \\neq w$ which has one trajectory in one direction, and the other trajectory in the other direction. Collapse this edge as in Figure 13, and again by the same argument as in Proof I, this merges the two trajectories, giving a complete trajectory for $N$ even, and a contradiction.\n\n\n[^0]: ${ }^{1}$ Proposed by PSC.\n\n[^1]: ${ }^{2}$ Proposed by PSC.\n\n[^2]: ${ }^{3}$ Proposed by PSC.\n\n[^3]: ${ }^{4}$ Proposed by PSC.\n\n[^4]: ${ }^{5}(X Y Z)$ denotes the circumcircle of $\\triangle X Y Z$\n ${ }^{6} \\angle$ denotes a directed angle modulo $\\pi$\n\n[^5]: ${ }^{7}$ Proposed by PSC.\n\n[^6]: ${ }^{8}$ Proposed by PSC.", "metadata": {"resource_path": "Balkan_Shortlist/segmented/en-2019_bmo_shortlist.jsonl", "problem_match": "\nC4.", "solution_match": "\nSolution."}}
Balkan_Shortlist/segmented/en-2021_bmo_shortlist.jsonl ADDED
The diff for this file is too large to render. See raw diff