Gino
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    8
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ###### tags: `Competitive Programming` # 競程技能樹 <style> .lv1 { color: #bf0b0b; } .lv2 { color: #cf7a0c; } .lv3 { color: #b5af00; } .lv4 { color: #078c1f; } </style> ## 等級 <span class="lv1">◆</span> = 連聽都沒聽過。 <span class="lv2">◆</span> = 知道在幹嘛,但不會寫 or 沒寫過。 <span class="lv3">◆</span> = 實作過一兩次,現在寫還是會很卡。 <span class="lv4">◆</span> = 已經寫過很多次,但還需要多練習題目。 ## 知識 ### 實用技巧 <span class="lv3">◆</span> 掃描線 <span class="lv4">◆</span> 位元運算 <span class="lv4">◆</span> 前綴和 <span class="lv4">◆</span> 差分 <span class="lv4">◆</span> 雙指標 <span class="lv4">◆</span> 倍增法 <span class="lv4">◆</span> 離散化 <span class="lv4">◆</span> I/O優化 <span class="lv2">◆</span> 壓常:#pragma、static、branch predictor <span class="lv4">◆</span> #define/template/operator overload <span class="lv4">◆</span> 啟發式合併 ### STL/PBDS <span class="lv4">◆</span> vector <span class="lv4">◆</span> queue、stack、deque <span class="lv4">◆</span> set、map、unordered_set、unordered_map、priority_queue <span class="lv4">◆</span> pair <span class="lv1">◆</span> tuple <span class="lv4">◆</span> 黑魔法 (\_\_gnu_pbds) - tree - 可合併priority_queue ### 排序與搜尋 <span class="lv4">◆</span> comparator <span class="lv4">◆</span> 二分搜、三分搜、三分搜轉二分搜 <span class="lv4">◆</span> 二分搜實作細節 <span class="lv4">◆</span> 對答案二分搜 <span class="lv3">◆</span> 整體二分搜 <span class="lv4">◆</span> bubble sort、insertion sort <span class="lv4">◆</span> merge sort、quick sort <span class="lv3">◆</span> counting sort、radix sort ### 枚舉 <span class="lv3">◆</span> 枚舉排列、組合 <span class="lv4">◆</span> $O(2^n)$ 枚舉子集 <span class="lv3">◆</span> $O(3^n)$ 枚舉子集的子集 <span class="lv4">◆</span> 折半枚舉 ### Greedy <span class="lv3">◆</span> 習題 ### DP題型 <span class="lv4">◆</span> 線性DP <span class="lv4">◆</span> 路徑DP <span class="lv4">◆</span> 背包DP <span class="lv4">◆</span> 區間DP <span class="lv4">◆</span> DAG DP <span class="lv3">◆</span> DP 回溯 <span class="lv3">◆</span> 機率/期望值DP <span class="lv3">◆</span> 賽局DP <span class="lv2">◆</span> 數位DP <span class="lv4">◆</span> 位元DP <span class="lv2">◆</span> 輪廓線DP <span class="lv2">◆</span> 插頭DP ### DP優化 <span class="lv4">◆</span> 前綴優化 <span class="lv4">◆</span> 單調隊列優化 <span class="lv4">◆</span> 矩陣快速冪優化 <span class="lv3">◆</span> 資料結構優化 <span class="lv3">◆</span> SOS 位元DP優化 <span class="lv2">◆</span> 1D/1D 凹/凸優化 <span class="lv2">◆</span> 2D/1D 優化 <span class="lv3">◆</span> 分治優化 <span class="lv3">◆</span> 斜率優化 <span class="lv3">◆</span> Aliens 優化 <span class="lv2">◆</span> Slope Trick <span class="lv1">◆</span> SMAWK 優化 <!-- ============================================== --> ### 圖論 I:Basic Knowledge <span class="lv4">◆</span> DFS、BFS <span class="lv4">◆</span> 並查集 <span class="lv4">◆</span> 拓樸排序 <span class="lv4">◆</span> Bellman-Ford <span class="lv4">◆</span> SPFA <span class="lv4">◆</span> Dijkstra (Sparse Graph) <span class="lv4">◆</span> Dijkstra (Dense Graph) <span class="lv4">◆</span> Floyd-Warshall <span class="lv4">◆</span> 分層Dijkstra <span class="lv4">◆</span> Eulerian Path <span class="lv4">◆</span> Hamilton Path <span class="lv4">◆</span> 差分約束系統 <span class="lv2">◆</span> 同餘最短路 ### 圖論 II:Basic Tree Knowledge <span class="lv4">◆</span> 樹直徑 <span class="lv4">◆</span> 樹重心 <span class="lv4">◆</span> 樹 DP <span class="lv4">◆</span> Prim (Sparse Graph) <span class="lv4">◆</span> Prim (Dense Graph) <span class="lv4">◆</span> Kruskal <span class="lv4">◆</span> 倍增 LCA <span class="lv2">◆</span> Tarjan $O(n)$ 離線 LCA <span class="lv3">◆</span> 全方位木 DP ### 圖論 III:Tree Decomposition <span class="lv4">◆</span> 樹壓平 <span class="lv3">◆</span> 樹鏈剖分 <span class="lv1">◆</span> 重心剖分 ### 圖論 IV:Connectivity <span class="lv4">◆</span> DFS Tree <span class="lv3">◆</span> 關節點、點BCC <span class="lv4">◆</span> 橋、邊BCC <span class="lv4">◆</span> SCC (Tarjan) <span class="lv4">◆</span> SCC (Kosaraju) <span class="lv4">◆</span> 2-SAT ### 圖論 V:Matching <span class="lv3">◆</span> Berge's Lemma <span class="lv3">◆</span> 匈牙利演算法 <span class="lv3">◆</span> Hopcroft-Karp <span class="lv3">◆</span> Kőnig's Theorem <span class="lv3">◆</span> 最小點覆蓋 <span class="lv3">◆</span> 最小邊覆蓋 <span class="lv3">◆</span> 最大點獨立集 <span class="lv3">◆</span> 最大邊獨立集 <span class="lv3">◆</span> Hall's Marriage Theorem <span class="lv3">◆</span> Kuhn-Munkres $O(|V|^4)$ <span class="lv3">◆</span> Kuhn-Munkres $O(|V|^3)$ ### 圖論 VI:Flow <span class="lv4">◆</span> 網路流名詞定義 <span class="lv4">◆</span> 最大流/最小割 <span class="lv3">◆</span> Edmonds-Karps Algorithm <span class="lv4">◆</span> Dinic's Algorithm <span class="lv2">◆</span> Dinic's Algorithm (ISAP 優化) <span class="lv3">◆</span> MCMF <span class="lv3">◆</span> 建模方法 <span class="lv1">◆</span> 循環流、有上下界限制的流 <span class="lv2">◆</span> Stoer-Wagner Algorithm <span class="lv2">◆</span> Gomory-Hu Tree ### 圖論 VII:Miscellaneous <span class="lv2">◆</span> 支配樹 <span class="lv1">◆</span> 有向最小生成樹 <span class="lv1">◆</span> Matroid <span class="lv1">◆</span> Matroid Intersection <span class="lv2">◆</span> Cycle Space/Cut Space <!-- ============================================== --> ### 分治/資料結構 <span class="lv4">◆</span> 簡單線段樹 <span class="lv4">◆</span> 懶標線段樹 <span class="lv2">◆</span> 二維線段樹 <span class="lv4">◆</span> 值域線段樹 <span class="lv4">◆</span> 線段樹上二分搜 <span class="lv4">◆</span> 動態開點線段樹 <span class="lv2">◆</span> 持久化線段樹 <span class="lv3">◆</span> 李超線段樹 <span class="lv3">◆</span> 時間線段樹 <span class="lv3">◆</span> 線段樹優化建圖 <span class="lv2">◆</span> Pattern 線段樹 <span class="lv3">◆</span> Segment Tree Beats <span class="lv4">◆</span> BIT <span class="lv4">◆</span> 差分BIT <span class="lv4">◆</span> Sparse Table <span class="lv2">◆</span> Merge-Split Treap <span class="lv2">◆</span> 帶懶標 Merge-Split Treap <span class="lv1">◆</span> 持久化 Merge-Split Treap <span class="lv3">◆</span> CDQ 分治 ### 根號算法 <span class="lv4">◆</span> 根號分 case <span class="lv4">◆</span> 序列分塊 <span class="lv1">◆</span> 樹分塊 <span class="lv4">◆</span> 值域分塊 <span class="lv3">◆</span> 數論分塊 <span class="lv4">◆</span> 操作分塊 <span class="lv4">◆</span> 莫隊算法 <span class="lv4">◆</span> 帶修改莫隊算法 <span class="lv3">◆</span> 回滾莫隊 ### 計算幾何 <span class="lv4">◆</span> 向量定義、內積、外積 <span class="lv4">◆</span> 方向判定、極角排序 <span class="lv4">◆</span> 線段相交 <span class="lv4">◆</span> 多邊形包含測試 <span class="lv4">◆</span> 鞋帶公式 <span class="lv4">◆</span> 凸包 (Andrew's Monotone Chain) <span class="lv3">◆</span> 凸包 (Graham's Scan) <span class="lv4">◆</span> 旋轉卡尺 <span class="lv3">◆</span> Pick's Theorem <span class="lv2">◆</span> 極角掃描線 <span class="lv1">◆</span> 旋轉掃描線 <span class="lv1">◆</span> Minkowski Sum <span class="lv2">◆</span> 最小包覆圓 <span class="lv1">◆</span> Voronoi Diagram <span class="lv1">◆</span> 模擬退火 <span class="lv1">◆</span> 多邊形聯集面積 ### 數學 #### 基礎數論 <span class="lv4">◆</span> 線性質數篩 <span class="lv4">◆</span> 輾轉相除法 <span class="lv3">◆</span> 貝祖定理、擴展歐幾里得 <span class="lv4">◆</span> 模逆元 <span class="lv3">◆</span> 中國剩餘定理 <span class="lv4">◆</span> 費馬小定理、歐拉定理 #### 進階數論 <span class="lv3">◆</span> 原根 <span class="lv3">◆</span> Miller-Rabin 質數檢驗法 <span class="lv3">◆</span> Pollard's rho 因數分解法 <span class="lv4">◆</span> 積性函數 <span class="lv3">◆</span> Dirichlet's Convolution <span class="lv3">◆</span> $φ, μ, ε, \mathbb{1}, \mathbb{id}$ 性質 <span class="lv3">◆</span> 線性篩蓋積性函數 <span class="lv2">◆</span> 莫比烏斯反演 <span class="lv3">◆</span> 數論分塊 <span class="lv1">◆</span> 杜教篩 #### 多項式/捲積/生成函數 <span class="lv4">◆</span> FFT, NTT <span class="lv3">◆</span> 多項式除法、帶餘除法 <span class="lv2">◆</span> 多項式指數/對數 <span class="lv2">◆</span> 多項式開根號 <span class="lv1">◆</span> 牛頓法 <span class="lv2">◆</span> 多項式多點求值 <span class="lv3">◆</span> 多項式生成函數 <span class="lv1">◆</span> 指數生成函數 <span class="lv1">◆</span> Lagrange's Inversion Formula #### 線性代數 <span class="lv4">◆</span> 矩陣乘法 <span class="lv4">◆</span> 行列式 <span class="lv4">◆</span> 高斯消去法 <span class="lv2">◆</span> Xor Basis <span class="lv3">◆</span> 線性規劃 <span class="lv3">◆</span> Simplex Algorithm <span class="lv2">◆</span> Duality #### 排列組合 / 經典題目 <span class="lv4">◆</span> 排容原理 <span class="lv4">◆</span> 重複組合 <span class="lv4">◆</span> 巴斯卡三角形 <span class="lv4">◆</span> 卡塔蘭數 <span class="lv4">◆</span> 約瑟夫問題 <span class="lv3">◆</span> Burnside's Lemma ### 組合賽局 <span class="lv4">◆</span> 定義、分類 #### 標準無偏賽局 <span class="lv4">◆</span> 賽局和、型別、等價賽局 <span class="lv4">◆</span> Nim <span class="lv4">◆</span> Choose Nim <span class="lv4">◆</span> MEX Principle <span class="lv4">◆</span> Sprague–Grundy Theorem #### 標準有偏賽局 <span class="lv2">◆</span> Red-Blue-Hackenbush <span class="lv2">◆</span> 二進分數 <span class="lv1">◆</span> Simplicity Principle ### 字串 <span class="lv4">◆</span> Rolling Hash <span class="lv4">◆</span> Trie <span class="lv4">◆</span> KMP <span class="lv4">◆</span> Z-Value <span class="lv3">◆</span> Manacher's Algorithm <span class="lv2">◆</span> AC 自動機 <span class="lv4">◆</span> Suffix Array <span class="lv1">◆</span> Suffix BST <span class="lv1">◆</span> 後綴自動機 (SAM) ### 隨機算法 <span class="lv4">◆</span> 生日悖論 <span class="lv4">◆</span> 失敗機率估算 <span class="lv3">◆</span> Hash <span class="lv2">◆</span> Color Coding <span class="lv1">◆</span> 環狀序列鍊轉化 <span class="lv1">◆</span> 最近點對 <span class="lv3">◆</span> 最小包覆圓 <span class="lv1">◆</span> 模擬退火 <span class="lv1">◆</span> 最大團 <span class="lv1">◆</span> TSP

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully