沙耶
    • 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
      • Invitee
    • 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
    • Engagement control
    • 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 Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control 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
Invitee
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
16
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# SA 流 C++ 競程修練心法 - [封面](/@sa072686/BkTJ0imPB) ## 序章:導論與前置準備 [close] * [關於本章節](/@sa072686/rJKDRo7wB) * ## 基本介紹 * [為什麼要學程式](/@sa072686/rk_3XSzur) * [為什麼從競程入門](/@sa072686/rJap7SM_r) * [為什麼選擇 C++](/@sa072686/rJ65is7OS) * ## 學習建議 * [如何學會寫程式](/@sa072686/rJ7dSaidr) * ## 其他資訊 * [關於升學或求職的資訊](/@sa072686/rJ05YiGOB) ## 初章:C++ 語法基礎 [close] * [關於本章節](/@sa072686/rJpY0i7PS) * ## 第一節:命令的接收與成果回報 * [用來寫 C++ 程式的軟體](/@sa072686/S1HzM0zbm) * [第一個 C++ 程式](/@sa072686/HyypNHG_r) * [體驗 AC 的愉悅](/@sa072686/S1KdtRMsL) * [一行的結束 End Of Line](/@sa072686/ry5LBOEjO) * [整數的輸入與輸出](/@sa072686/SJBUSSfuS) * [更多變數、更多輸入](/@sa072686/rJNu0RdOr) * [註解](/@sa072686/ryd0DrMuB) * [補充:C++ 骨幹的解說](/@sa072686/H1vnVRXOr) * [補充:換行與跳脫字元](/@sa072686/H1_G9sqiL) * ## 第二節:資料的記憶與計算 * [算術運算子](/@sa072686/rypmLHfuS) * [變數的賦值](/@sa072686/Sk_fIrz_S) * [四則運算的基本應用](/@sa072686/SygHIHMdS) * [變數上限與溢位](/@sa072686/B1tr_OtOS) * [變數與運算綜合挑戰](/@sa072686/r1Zm1Q9YH) * [精選題解](/@sa072686/r1YYVdEsd) * ## 第三節:依不同狀況判斷該做哪件事(施工中) * [條件分歧](/@sa072686/rJotUBfuS) * [比較運算子](/@sa072686/SJP58SzOS) * [不滿足條件時](/@sa072686/B1BUDBMur) * [邏輯運算子](/@sa072686/HkfY_rMur) * [多選一的並列條件](/@sa072686/r1IT_HG_H) * [if 常見的應用例](/@sa072686/rJJchSIlB) * [複雜條件的應對技巧](/@sa072686/B1seP12KH) * [條件分歧綜合挑戰](/@sa072686/HJTmJm5YH) * ## 第四節:反覆執行至完成為止 * [while 迴圈](/@sa072686/BJi0dSzdr) * [for 迴圈](/@sa072686/SJ9JKBMdS) * [迴圈中的流程改變](/@sa072686/r1GbQuFdH) * [迴圈綜合挑戰](/@sa072686/r1PDkwR9B) * ## 第五節:OJ 介紹與落差補完 * [線上評測系統簡介](/MyZ4LGUuSteFAZhP-5zzzw) * [常見 OJ 簡介](/ucIjLY2LSVO20wQ4e2pZtQ) * [落差與常識的補完](/d3SqPTvcQryUhvnQfOP-Nw) * [UVa OJ 實際練習](/PIJDqaTfQ22Dl_wEoVp4fQ) * ## 第六節:反覆執行「需要反覆執行的事」 * [巢狀迴圈的思考方式](/kb8nRe__SruVrbsGHlPeEA) * [更複雜的巢狀迴圈](/kRRbRT7LT06do68Qd8cm-g) * [巢狀迴圈綜合練習](/XKLngFtgQHyYWCc-tC8QzQ) * ## 第七節:大量資料的記憶與存取 * [陣列的基本](/YTiYMA8zT9uCObxzri_11Q) * [陣列的更多細節](/3bswkP4FRa-kE2S2ua7fcA) * [陣列與記憶體相關](/AT_Yya-iSNeMRSFIpW29gQ) * [陣列的衍生應用](/p9Y-PTzWRZyqknDq3oPeGQ) * [陣列綜合挑戰](/aCmrox62TyKBuGzqdZ0e6g) * ## 第八節:文字的記憶與存取 * [字元與編碼](/J19kVwRwQoeBaMvoqnoa7Q) * [字串與輸入](/qeOFNdrUTmChPhGsJ_joMg) * [字串的更多細節](/7Qg7NOL3RIuD6Qd1e-oZNA) * [ASCII 延伸應用](/nWrarntgQBCWg2ucx2kEpQ) * [字元字串綜合練習](/RCDOBMTWQNm_nw2KBk96zw) * ## 第九章:二維或更高維度的資料 * [二維陣列](/faPENjvdTS6YIk1cYc4FkQ) * [二維陣列綜合練習](/fHNLWInOSf6HQ3IPYKxj8A) * ## 第十節:整數以外的數字 * [浮點數](/cjVyz0uMRhyHwRfkLBlmAw) * [浮點數誤差與應對](/cZfev35MRp-nFy_YII9wfg) * [常見數學函式](/m3yiqkAZSPiG8vQtWHFfcQ) * ## 第十一節:將命令打包成函數 * [自定義函數](/jjoP_ZAXSzejCtE0U-EOqg) * [變數的生命週期](/yEWLIrDcRKuphaFbNUWLyQ) * [常見函數](/7aVfN4hnQv-tdDBAJdtLeA) * [結構](/@sa072686/HJvKmpidS) * ## 第十二節:各種競賽應對(預定) * [競賽策略與鍛煉方向](/@sa072686/rke70TNtX) ## 二章:資料結構與演算法入門 [close] * [關於本章節](/nJ-DaFraT7eKiXLDSpsk4g) * ## 第一節:複雜度分析 * [如何分析程式效能:複雜度](/DI86xDw0T0uvqhXwLCHkAw) * [複雜度優化示範](/@sa072686/ryC1WNxhC) * [複雜度綜合挑戰](/@sa072686/H18mdYlpA) * ## 間章:實作技巧 * [(暫時)實作技巧與練習](/@sa072686/rkmOGUT6R) * ## 間章:基本數論 * [(暫時)基本數論](/@sa072686/r1u9ZfzRR) * ## 第二節:基本資料結構 * [資料結構概念](/@sa072686/Hyt2t6o_r) * [STL vector](/@sa072686/H1mXyLa0A) * [STL deque](/@sa072686/Bk7SkUa0A) * [佇列](/@sa072686/rJ7UHTi_H) * [堆疊](/@sa072686/Sy9HSTjuS) * [鏈結串列](/@sa072686/B1X5LM608) * [資料結構綜合挑戰](/@sa072686/HyDVXmNDI) * ## 第三節:遞迴 * [遞迴](/FRgcCDGCQG-ECiVj7tWSgw) * [重疊的子問題](/adzZEq5HQkyMDinvs0fC3Q) * [更多遞迴](/BbRsMnLrQFuCeLifVxecJA) * [遞迴綜合挑戰](/WSXwj7tLTO6_xiQej2Sa7A) * ## 第四節:預處理 * [預處理](/@sa072686/SJmua5011g) * ## 第五節:排序 * [演算法的概念](/Fn3W3iT9TQW_5x00Q11oUA) * [排序的基本](/fS7erjD_Q3ekLPbzzxSWRg) * [更快的排序](/oj2gvDtjT0mfKJVhlmJeng) * [排序的性質與應用](/ys2z9BntSh-_6mZTIPNy1Q) * [內建 sort 與比較函式](/@sa072686/B1Zg7tI5U) * [排序的穩定與不穩定](/@sa072686/B1pH-OqWH) * [排序綜合挑戰](/LTbbYJJuR8Cda0dWNVTHWg) * ## 第六節:二分搜尋 * [二分搜尋](/UEA2CFbIRqGvA_c9yaCP6Q) * [最接近的極值](/4uxpSAaYR3GXHG5SA6BFfQ) * [廣義的二分搜尋](/9WpDfmqfQseeZ81T6lUApw) * [二分搜尋綜合挑戰](/pRRsJkMNTCmPcnGzN0mMsA) * ## 第七節:單調性與應用 * [單調性](/@sa072686/H16IPaj_S) * [單調佇列](/@sa072686/HJrpuTZjQ) * ## 第八節:其它技巧 * [差分與離散化](/@sa072686/SJOpSpoOH) * [逆向求解](/@sa072686/B1uGJKKcm) * ## 舊 2-4 節留存 [close] * ## 第二節:暴力與窮舉 * [萬能的暴力法](/a-xt96VKTAqBmzpmXjkU_Q) * [更聰明的暴力法](/w0fSb1suRR-VkY8g7toisg) * [暴力法綜合挑戰](/1hG6iEwmTZif5bAMiFwfKw) * ## 第三節:基礎數論 * [進位制換算與應用](/4uO2GyfGTi2a4vP0rUtZXA) * [餘數與循環](/UDa8rLAPTOqv-FZ_KwlVgQ) * [基礎數論綜合挑戰](/6fvdrf_gR86-e6wYtXW1FQ) * ## 第四節:程式實作技巧與除錯 * [程式基本原理](/18aJIgTtSxiZ4K7vLmlyHw) * [程式實作技巧](/hVOpyFhuTG6-ivd2vWtTSA) * [除錯相關技巧](/fmJHEIwIR0q9ms7kM-DjOQ) * [預處理與建表](/xpr611VXTkiwVAjCAR9CJw) ## 間章:經典問題之一 [close] * ## 數論相關 * [質數、因數與篩法](/5Ckh62erR2ORs8RM4n2VIg) * 線性篩法 * [最大公因數](/cdtl24aSSEC4FXPyl00uBg) * 擴展歐基里得 * 乘法反元素 * ## 位元運算 * [位元運算的基本](/NDvgPLWTTZG3inSybGJwoA) * [位元運算應用與優化](/tiEnPYI2QZi2S61S-UyzDQ) * [位元運算綜合練習](/MR4z06HIRAa0SuRj9GlJmw) ## 三章:資料結構與演算法 [close] * [關於本章節](/wwKhm7xJRLu438aA0XybQQ) * ## 第一節:深度優先搜尋 * [深度優先搜尋](/kPw0F65-SG6RD0BjXlSSdg) * [中途結算和剪枝](/fUBKvPELTkC-TApNZpJRWg) * [更多 DFS 例子](/gEMpcmHPRXmaGWVaKwIOQw) * [DFS 綜合練習](/ka890UjuQUy5KsgBOALkLA) * ## 第二節:廣度優先搜尋 * [廣度優先搜尋](/VXHUmlgOTPGNxV9FWbdukA) * [狀態與狀態轉移](/TAq5eVuHRcSDlQqJB2hdgQ) * [回溯解](/EdwpfRaTT-mefCftkNG2LA) * [BFS 綜合練習](/8BLvAoWsQ1iuekhSXnPyvA) * ## 第三節:位元運算 * [位元運算的基本](/NDvgPLWTTZG3inSybGJwoA) * [位元運算應用與優化](/tiEnPYI2QZi2S61S-UyzDQ) * [位元運算綜合練習](/MR4z06HIRAa0SuRj9GlJmw) * ## 第四節:貪心與分治 * [分治法](/JRDnW1pvQCmZwknUr9ohKw) * [貪心法](/NfpB6pPURXi11mNUEHFO4g) * ## 第五節:動態規劃 * [動態規劃基本概念](/UbRtkZi2S3uF1k47c7px5Q) * [動態規劃更多例題](/VfFRhrBRTi6ssUs0Jm3LAw) * [動態規劃經典問題.其一](/tGJ36X3bSWWRY8ZGPGqKfg) * [動態規劃經典問題.其二](/7CXQVp5uQHWWG69VtWQ6sQ) * ## 第六節:樹狀資料結構 * [前置:可變長度陣列 vector](/kSRrndEPT5agDFWN2IMLGQ) * [用語:在線與離線 online / offline](/@sa072686/H12QlpPcL) * [樹的概念與實作](/knfrR-geRYKuCZNOviK3cw) * [二元樹的走訪](/YLjDX3_ZT02j3a4eeme9jg) * [disjoint set](/DUCRS-cXSoGv4JZfusM-IQ) * [heap](/GTdCSUuiR56t0K7TxtlF7A) * [二元搜尋樹](/@sa072686/Hy8lnZ5oU) * ## 第七節:STL * [STL 基礎概念](/@sa072686/S11uDpiuH) * [有優先度的佇列 priority queue](/@sa072686/BJKTlLBHr) * [求比 k 大的最小值 lower_bound/upper_bound](/@sa072686/Hk8wnUcWB) * [字典與集合 map / set](/@sa072686/H1qI86oOr) * [\<algorithm> 其它函數](/@sa072686/Hkuhzo58V) * ## 第八節:基本圖論 * [圖論概念與實作](/@sa072686/SJoWKFtcm) * [圖的連通與走訪](/@sa072686/SyceyXTDE) * [最短路徑問題](/@sa072686/r1P_upsdH) * [DAG 與拓璞順序](/@sa072686/Hybjt6suS) * [圖論上的樹](/@sa072686/BJ_IFasdS) * [最小生成樹](/@sa072686/HJbKLajdr) * [圖論綜合挑戰](/@sa072686/S1pGQBSyD) ## 外傳:各種零碎文章 [close] * ## 小技巧 * [外傳:編輯器快捷鍵與打字技巧](/HlnaiP5cTqaHG8-XR8bohA) * [外傳:關於 CP Editor 更多便利功能](/@sa072686/B1a8BpsdS) * [外傳:APCS 環境下的測資複製貼上(轉載)](/@sa072686/HJSnnk773) * ## 小知識 * [外傳:Stack Overflow](/tp__VIChTvaBdGRcKOi1UQ) * ## 相關知識補完 * [外傳:矩陣相關知識補完](/wVhulqSJSG-9UjyArj4SbA) * [外傳:亂數 Random Number](/O2slL_6BRRe_kueMypmCYQ) * [外傳:時間 Chrono](/C4FPz6QsR0eoz9X5_2m7sQ) * 外傳:大數 Big Number(未完) * ## 關於指標 pointer * [指標](/@sa072686/r1eqmao_r) * [指標的運算](/@sa072686/ry6EIimE8) * [更多指標](/@sa072686/H1UiQ6oOr) * ## 延伸閱讀 * ## 舊文留存 * [介紹 Dev-CPP](/@sa072686/Bkyv4rfOB) ## 異界:各種外部連結 [close] * ## 工具篇 * [**UVa 隨機挑選未解題**:追獵的鳥人女僕](https://sayaurobuchi.github.io/tsukaima/tnfsh/uhunt_random.html) * ## 考古題篇 * [107 南區賽實作題](/@lys0829/SyyC9lm67) {%hackmd @sa072686/__style %} ###### tags: `index`, `競程`

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