MDCPP
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners 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 No publishing access yet

      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.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      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
    • 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 Help
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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners 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 No publishing access yet

    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.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 資訊科技培訓 --- ## 講師介紹 高三11 郭冠希、高三2 陳秉華 ---- ## 學程式競賽有什麼用 最簡單的:**對大學升學有幫助!** 剩下的留後面課堂介紹 ![](https://i.imgur.com/avqlFdR.png) --- ## 課程安排 ---- | 4/8 | 4/15 | 4/22 | |:--------:|:--------:|:--------:| | 競程介紹 | 程式概念 | 條件判斷 | | 4/29 | 5/6 | 5/20 | |:----:|:----------:|:----------:| | 迴圈應用 | 演算法 | 競賽與升學 | --- ## 電腦介紹 在打程式競賽之前,我們要先來了解 電腦裡的記憶體跟CPU ---- ## 中央處理器(CPU) 1. CU(控制單元) 2. ALU(算數邏輯單元) ---- ## 控制單元(CU) 可以想成他是個指揮官,負責處理大部分的動作 * 硬體的一部分,負責控制 * 指示電腦系統去執行程式指令 * 必須負責ALU和記憶體之間的溝通 ---- ## 算數邏輯單元(ALU) ``` 當程式碼送到記憶體後,經過控制單元(CU)指揮, 送到ALU就會開始執行,執行完後會把資料傳回記憶體。 ``` 1. 算術AU:負責加減乘除 2. 邏輯LU:負責比較型態、處理邏輯的東東 ---- ## 中央處理器(CPU) 這個東東決定你程式跑得快不快 一般來說,都會以**GHz**看看能跑得多快 G$\rightarrow$$10^9$ 所以可以執行這麼多的運算 但一般不會拿整個去跑程式,所以大概就$10^8$ ---- ## 記憶體(RAM) 全名為「隨機存取記憶體」 可認為是暫時記憶,屬於電腦的暫時儲存裝置, 用來執行應用程式短期儲存和存取資料。 擁有更多的RAM意味著此電腦幾乎可以 瞬間存取和讀取更多資料。 ---- ## 那跟程式有什麼關係呢? * 用來存放程式執行中需要用到的指令或資料 * 只要程式正在執行當中就會一直儲存資訊 * 存放一些變數的位址與數值 ---- ## 圖片整理 ![image](https://hackmd.io/_uploads/SkrNyCSAT.png =50%x) --- ## 程式概述 大家應該都知道電腦是二進位運作 但我們太笨了,看不懂二進位 所以沒辦法跟電腦溝通 因此我們需要用一些程式語言來跟電腦溝通 這樣電腦才能get到我們 ---- ## 各種程式語言 ![image](https://hackmd.io/_uploads/rkHZWABRa.png) ---- **當然,各自的語言都有自己的用處與優點** ---- ## EXAMPLES * **C++:遊戲開發、驅動程式** * **Python:AI、爬蟲程式、作圖** * **Java:做模組、大型應用程式** * **Golang:網站、專案開發** ---- ## 為什麼我們要選擇C++ * 大多競賽允許C/C++ * python雖好寫但很慢,相反地C++很快 * 內建很多函式庫跟資料結構 * 語法完整,學完容易貫通其他語言 --- ## 從哪裡開始寫 編譯器 可以比喻成把我們文字翻成電腦語言 大概會有兩個給初學者使用 1. DevC++ 2. Codeblocks 但上面那個我覺得很舊+很破 所以我們用codeblocks (基本比賽、檢定都會附) ---- [下載連結](https://drive.google.com/file/d/1B_JvfJQHi0yJzGfQ7r7mS76qCkkA4nd2/view) ---- ![image](https://hackmd.io/_uploads/rkWZUbPR6.png) ![image](https://hackmd.io/_uploads/Byvr8ZDA6.png ) ---- ![image](https://hackmd.io/_uploads/HJZTIbvCT.png) ![image](https://hackmd.io/_uploads/ryUgvZwCT.png =50%x) ---- ![image](https://hackmd.io/_uploads/BJqIDZwA6.png) ---- ![image](https://hackmd.io/_uploads/BkcADZwAp.png =120%x) 這樣就可以開始寫程式了 --- ## 寫什麼題目呢? 這堂課叫資訊競賽 所以我們需要有個線上網站讓我們練比賽題目 ---- ## 一些常用Online Judge * [高中生程式解題系統(Zerojudge)](https://zerojudge.tw/) * [TIOJ](https://tioj.ck.tp.edu.tw/) * [Codeforces](https://codeforces.com/) * [AtCoder](https://atcoder.jp/) * [CSES](https://cses.fi/problemset/) * [TCIRC](https://judge.tcirc.tw/) ---- 還有我們學校的[MD Judge](http://mdcpp.mingdao.edu.tw/) 已經幫大家創好帳號囉! ---- ## 來介紹怎麼寫題目 看完題目後把解法寫成程式碼 丟到judge上 他會跟你說結果 ---- ## 結果種類 <font color="green">AC(Accepted)</font>:通過(好耶!) <font color="red">WA(Wrong Answer)</font>:答案錯誤(測資沒通過) <font color="gray">CE(Compile Error)</font>:編譯錯誤(請先在IDE上面編譯) <font color="#f1c40f">RE(Runtime Error)</font>:執行時錯誤(陣列越界、除以0) <font color="blue">TLE(Time Limit Exceeded)</font>:超時(演算法效率太差) <font color="orange">MLE(Memory Limit Exceeded)</font>:超出空間限制 --- ## 學習資源 踏入資訊領域要有個概念 就是需要自學能力 1. Google/AI 2. 營隊 3. 專門課程 ---- ## 培訓講義 有太多了,列一些初學者的 [MDCPP講義](https://hackmd.io/rT602lznT6y3mvLR1IlQ0A) [板橋高中講義](https://sites.google.com/site/pcshic/cppzero) [AP325](https://drive.google.com/drive/folders/10hZCMHH0YgsfguVZCHU7EYiG8qJE5f-m) ---- 因為學校資源不多 所以學生的合作就很重要 [一起加入MDCPP的Discord吧!](https://discord.gg/Kv7j4KqNBM) --- ## 資訊比賽的不同 不同於一般比賽 資訊比賽可以讓你隨時知道對錯 在有限時間內解出比別人多的題目是關鍵 所以要多練題目 ---- 放個比賽影片 [過程](https://youtu.be/ueNT-w7Oluw) [結果](https://youtu.be/PQs-G6AO7Is?t=3643) ---- 下一堂課我們就會開始教一些程式 大家可以先預習 如果你能開始寫judge那就更好了

    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
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    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