NSYSU 程式研習社
      • 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
      • 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
    • 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 Help
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
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
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
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
--- tags: 程式研習社 --- # 程式社 程式競賽問題清單 ## 算法範例(? - zkw線段樹 : [name=Sine] - [zj_e409](https://zerojudge.tw/ShowProblem?problemid=e409) , [code](https://github.com/sinewu/algorithm/blob/master/e409.cpp) ## 未解決 - zj a981 求和問題 - [a981 problem](https://zerojudge.tw/ShowProblem?problemid=a981) , [code](http://pastie.org/p/3xnlIQYZZP4Osymw83FwUV) ![](https://i.imgur.com/cGcGyAE.png) 剩下這筆測資但找不到bug@@,想請各位幫忙QQ[name=提問者] - 找不到bug...@@ 不過可以給你當初的 [code](https://ideone.com/In0Lt8) [name=Sine] - 當輸入的數字有重複時,你的 code 會直接炸開,因為你遞迴是用「某個數字是否被取過」來判斷的,可以考慮用 index 判斷 [name=Rice] - 這題紀錄答案的方式蠻多種的,等你寫完可以看看 sine 的 code,那個是比較正常的做法。不正常但有時候會看到的做法可以看 [code](https://ideone.com/0K5qPT),也許能學到點新的想法? [name=Rice] - 不太懂Rice大大的意思,我看了一下程式碼我似乎是用index判斷沒錯,而且針對重複有多用一個tag變數記錄前一個取的人來避免重複,想問可以再詳細一點ㄇ@@? ((不敢先看兩位code所以先直接問了 [name=提問者] - 我猜應該是指#27,29吧 他的意思大概是這樣 [code](https://ideone.com/UlqwRv),不過還是錯的@@ ![](https://i.imgur.com/XlE5dx2.png) 所以繼續等通靈ㄅ [name=Sine] - 一開始的連結壞了诶QQ [name=Sine] - 好了,他只給我24hr QAQ [name=提問者] - 真是神奇=ㄦ= 還是壞的吧? [name=Sine] - 好了 拍謝QAQ [name=提問者] - 沒阿 [name=Sine] ![](https://i.imgur.com/nQXoxmJ.png) - 系統搞我啊QAQ [name=提問者] - 怕爆 [name=Sine] - 我不小心動到你上面的了拍謝OAO,位置換錯 [name=提問者] - 這串好長喔@@,解決後要來整理一下(?) [name=Sine] - 喔又抓到一個bug...你的Answer用過的東東沒歸0 [name=Sine] - 幹越來越不科學了,把最初的bug弄掉會生出另一個bug,然後解掉這個bug跟那個bug居然是衝突的= = [code](https://ideone.com/ZHZcNw) 總之就是一坨東西沒初始化,然後就炸了(? [name=Sine] - 我以為我的會自動覆蓋掉原本的ANS,難道沒覆蓋掉!? [name=提問者] - 不知道,反正先歸0再說 [name=Sine] - 我懂你的意思了大大,歸0算是保險之計(?,但我看你幫我修的code我有個問題, 為何歸0後下面要多個tag=Nums[k],這個不是沒有變化ㄇ@@?(Sor最近都沒用這個問題,就放到現在OAO [name=提問者] ![](https://i.imgur.com/RBo3PQq.png) - sine大 我拿你幫我初始化後的code再去試還是爆開在同一測資@@ [name=提問者] - 诶诶我忘記這題了QQ [name=Sine Wu] - 懶得debug了,直接給你我當初AC的[code](https://ideone.com/ZEDitD)好了 [name=Sine Wu] ## 已解決 - [TIOJ 1001](https://tioj.ck.tp.edu.tw/problems/1001) - 不知道為什麼答案錯誤 - [程式碼](https://ideone.com/gxbypg) - > 可以看一下輸出和範例輸出有沒有完全一樣[name=匿名] - > 我知道了!最後面的 "XD" 打成 "xD"[name=提問者] - > 建議以後輸出可以用複製的[name=匿名] - [TIOJ 1002](https://tioj.ck.tp.edu.tw/problems/1002) - 不知道為什麼答案錯誤 - [程式碼](https://ideone.com/EBVMoL) - >[name=yctseng] 為何你的程式碼輸出是a+a?? - >[name=匿名] 發現了,謝謝 - [TIOJ 1445](https://tioj.ck.tp.edu.tw/problems/1445) - 我用類似 DP 的方式,找到最小生成樹後把其他邊拿來改答案,WA 了一些測資 + 記憶體區段錯誤一些測資,請求 debug - [程式碼](https://ideone.com/k1hKyN) - 已解決,DP 式不小心寫錯了(一定是在睡QQ)。#42 是 `dp[j][k] = dp[k][j] = edges[i].c;` [name=Rice] - 樓上雷爆惹>_< [name=Sine]

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