<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Algorithms on YHY Study Website</title><link>http://ryanyhy.github.io/YHY-Website/en/tags/algorithms/</link><description>Recent content in Algorithms on YHY Study Website</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sun, 01 Nov 2026 22:40:23 +0800</lastBuildDate><atom:link href="http://ryanyhy.github.io/YHY-Website/en/tags/algorithms/index.xml" rel="self" type="application/rss+xml"/><item><title>Divide and Conquer: Quoit Design and the Closest Pair</title><link>http://ryanyhy.github.io/YHY-Website/en/blog/quoit-design-closest-pair/</link><pubDate>Fri, 30 Oct 2026 00:00:00 +0000</pubDate><guid>http://ryanyhy.github.io/YHY-Website/en/blog/quoit-design-closest-pair/</guid><description>&lt;p&gt;On October 30 I worked through Quoit Design from &lt;a href="https://vjudge.net/contest/862457#problem/A"&gt;this contest&lt;/a&gt;. The public statement is &lt;a href="http://acm.hdu.edu.cn/showproblem.php?pid=1007"&gt;HDU 1007&lt;/a&gt;. Every toy is a point, and the ring should be as large as possible without encircling two toys at once. I did not start by picking an algorithm. I asked what actually limits the radius.&lt;/p&gt;
&lt;p&gt;A toy is encircled when its distance to the center is strictly less than the radius. If two points are less than &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;2r&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class="katex-html" aria-hidden="true"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6444em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;2&lt;/span&gt;&lt;span class="mord mathnormal" style="margin-right:0.02778em;"&gt;r&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; apart, some circle of radius &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;r&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class="katex-html" aria-hidden="true"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.4306em;"&gt;&lt;/span&gt;&lt;span class="mord mathnormal" style="margin-right:0.02778em;"&gt;r&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; contains both of them strictly: put the center at the midpoint. The radius can therefore be at most half the distance of the closest pair. If two toys coincide, the radius is 0. The output keeps two decimal places.&lt;/p&gt;</description></item></channel></rss>