<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sieve on</title><link>https://h30306.github.io/blog/zh-tw/tags/sieve/</link><description>Recent content in Sieve on</description><generator>Hugo -- gohugo.io</generator><language>zh-tw</language><managingEditor>hwork0511@gmail.com (Wei Yi Chung)</managingEditor><webMaster>hwork0511@gmail.com (Wei Yi Chung)</webMaster><copyright>© 2026 Wei Yi Chung</copyright><lastBuildDate>Tue, 20 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://h30306.github.io/blog/zh-tw/tags/sieve/index.xml" rel="self" type="application/rss+xml"/><item><title>Number Theory 數論</title><link>https://h30306.github.io/blog/zh-tw/algorithm/number-theory/</link><pubDate>Tue, 20 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/algorithm/number-theory/</guid><description>GCD、判斷質數、埃氏篩 / 線性篩 / 最小質因數（SPF）、質因數分解後用 Union-Find 連起來，以及用質因數的最後出現位置切陣列</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/algorithm/number-theory/featured.png"/></item><item><title>LeetCode 2584: Split the Array to Make Coprime Products</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-2584/</link><pubDate>Tue, 13 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-2584/</guid><description>LeetCode 2584 解題筆記：兩段乘積互質 ⇔ 沒有質因數同時出現在兩段；記下每個質因數最後出現的 index，從左往右擴張 reach，reach == i 時就能在 i 後面切</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-2584/featured.png"/></item><item><title>LeetCode 1998: GCD Sort of an Array</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-1998/</link><pubDate>Mon, 12 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-1998/</guid><description>LeetCode 1998 解題筆記：同一個連通塊裡的數可以任意交換；用 SPF 把數字跟質因數合併，排序後每個位置的新舊數字在同一組就能排好</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-1998/featured.png"/></item><item><title>LeetCode 2523: Closest Prime Numbers in Range</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-2523/</link><pubDate>Mon, 12 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-2523/</guid><description>LeetCode 2523 解題筆記：篩出範圍內的質數，相鄰的兩個質數才可能是最接近的；也可以從 left 往右試除，找到差是 2 的雙生質數就停</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-2523/featured.png"/></item><item><title>LeetCode 2761: Prime Pairs With Target Sum</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-2761/</link><pubDate>Mon, 12 Oct 2026 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-2761/</guid><description>LeetCode 2761 解題筆記：篩出 &amp;lt; n 的質數，x 從小到大、只看到 n / 2，x 和 n - x 都是質數就是一對</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-2761/featured.png"/></item><item><title>LeetCode 2709: Greatest Common Divisor Traversal</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-2709/</link><pubDate>Thu, 07 Aug 2025 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-2709/</guid><description>LeetCode 2709 解題筆記：任兩個 index 都能互通 ⇔ 全部在同一個連通塊；用 SPF 分解質因數，數字跟它的質因數在 Union-Find 裡合併；1 要特別處理</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-2709/featured.png"/></item><item><title>LeetCode 3618: Split Array by Prime Indices</title><link>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-3618/</link><pubDate>Sat, 19 Jul 2025 00:00:00 +0000</pubDate><author>hwork0511@gmail.com (Wei Yi Chung)</author><guid>https://h30306.github.io/blog/zh-tw/leetcode/leetcode-3618/</guid><description>LeetCode 3618 解題筆記：判斷的是 index 是不是質數；用埃氏篩一次算出 0..n-1 哪些是質數，比每個 index 試除快</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://h30306.github.io/blog/leetcode/leetcode-3618/featured.png"/></item></channel></rss>