林柏瑄
    • 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
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# 2021 北市賽 不知不覺已經打完高中生涯最後一次北市賽了。 從高一在校內賽就被刷掉、高二被建中打爆差點只剩佳作,到高三終於如願進了全國賽。 今年的題目鑑別度跟去年相比有很大的進步 (或者說是恢復往年的水準?),但題目還是偏怪,甚至跟去年一樣出現不可做題目 OAO ## 題目 ### A 給一個 $n \times m$ 的二維表格 上面有一些連通的格子是黑色的 (不保證是凸的) 求黑色格子外圍的輪廓,從最左上的點順時針依序輸出 $n, m \le 1000$ ### B 有一個字串集合 一開始為空 接下來會依序加入 $n$ 個字串 $s_1, ..., s_n$ 定義一個字串 $s_i$ 的價值是 $|s_i|^2 - M \times \#\{k | 1 \le k \le i-1 \land lcp(s_i, s_k) = M \}$ 其中 $M = \max_{1 \le j \le i-1}{lcp(s_i, s_j)}$ 求所有字串的價值總和 $n \le 10^4, |s_i| \le 200$ ### C 一個套圈圈遊戲有 $n$ 個目標物排成環形 每個目標物有一個權重 $v_i$ 套中一個目標物可得分數是他左右兩邊的目標物權重相乘 之後被套中的目標物會消失 (特例:剩一個目標物時套中他的得分是他的權重) 問最大可能得分 $n \le 100, v_i \le 100$ ### D 給一張無向圖 每個點有兩種權重 $a, b$ 每個點的 $a$ 是事先決定好的,$b$ 是他和他所有鄰居的 $a$ 的總和 給你每個點的 $b$ 求所有點的 $a$ 總和 $n \le 1000$ ### E 給 $n$ 個區間,代表一張無向圖 區間 $[l, r]$ 代表 $l$ 跟 $l+1, l+2, ..., r$ 有連邊 如果一個點同時被包含在所有最大的 clique 裡,則稱這個點是關鍵的 輸出所有關鍵的點 $n \le 10^4$ ### F output only 給一張圖,問你是幾分圖,並給出一種分割方式 $V \le 10^4, E \le 2 \times 10^6$ (羊神說這是 NP-Hard OAO) ## 比賽過程記錄 其實我忘記當時的寫題順序了 QQ 計分板點選手名字沒跳出詳細資訊,不知道 484 師大 CMS 燒雞,總之我只能憑印象還原出大概的寫題順序 比賽剛開始 CMS 居然直接掛掉 OAO,全部人都登不進去,還好很快就恢復了 看完題目發現,居然有六題,而且沒有很顯然的水題欸 對題目們的第一印象是 A 煩躁實作 B 裸 Trie C 可能是區間 DP,但不太像 D 除了高斯消去還是高斯消去 E 某種觀察 F 沒想法 總之先把 B 拿到再說 雖然是實作難度不高的 Trie,但比賽用的筆電鍵盤鍵位跟我的筆電不一樣,方向鍵還超小,好死不死左右鍵的上面就剛好是 PgUp 跟 PgDn,寫的時候一直按到,花了不少時間在適應這件事 在開始後 30 分鐘把 B 拿到手了 - 0/100/0/0/0/0 之後發現 C 暴搜居然可以拿 80 分,因為對滿分解還沒有想法,當然先撈了再說 傳上去發現,$O(n!)$ 居然 AC 了 ?\_? 怎麼可能,我連剪枝都沒剪欸?就算是師大測資也該有個限度吧? - 0/100/100/0/0/0 這時候大概過了 50 分鐘,跑去刻 A 的滿分解,花了 30 分鐘好不容易刻完了 結果卻吃了個大大的 WA 這時朝著題本仔細一看,蛤,長方形有 71 分? 不管滿分解了,開撈 (再不先看子題啊,毒瘤) - 71/100/100/0/0/0 中途 C 有 rejudge,果然就算是師大測資也不會讓我暴搜拿滿分的,我的 80 分總算是被打回原形 - 71/100/80/0/0/0 快過兩個小時了,還是連一半的分數都沒拿到 再這樣下去可能進不了全國 我開始慌了 看著還沒動過的 DEF,我挑了 F 來做 隨便構了一個 greedy 解,結果只拿了 10 分 - 71/100/80/0/0/10 時間不多了,我決定把一切都賭在 D 的高斯消去上 甚至沒去思考 $O(n^3)$ 會不會 TLE,就直接刻下去了 高斯消去刻出來以後,測範測居然沒有消乾淨 :EEEEE: 在極度慌張的情況下 我從腦海翻出在 AA 競程寫過的那題高斯消去的 AC code,試圖找出修好我 code 的方法 最後我採用的作法是,如果遇到要用第 $i$ 行消第 $i+1 \sim n$ 行,但第 $i$ 行第 $i$ 個變數係數是 $0$,就要從第 $i+1 \sim n$ 行找一行第 $i$ 個變數不是 $0$ 的跟他 swap 範測總算過了 上傳,拿到了 73 這個奇怪的分數 (27/0/46) 幸好是 TLE 不是 WA 把一行模運算的部分優化一下,就拿到 AC 了 - 71/100/80/100/0/10 還剩最後一點點時間,我把 E 的 37 分喇到 F 換了一種 greedy 方法,最後 30 秒壓線上傳,又唬爛過了兩筆 比賽結束 - 71/100/80/100/37/30 三小時六題真的寫不完啦 QwQ ## 成績 總分:418/600 Rank:一等四 ## 一些有趣以及不有趣的事 0. 今年北市賽還是被建中主宰,十個全國賽名額有七個建中 1. 今年選訓高一保進來的張庭瑋,北市賽直接起飛,無情開電拿走一等三 2. 燒雞定理三人組都三等獎,其中山姆是第 11 名 QQ,還有 Foxdd 終於學會喇分了 3. dreamoon 預測的第六跟第七名結果分別得到 11 跟 12 名,或成新一代舒服大師? 4. 師大的神祺魔法總是會讓一二三等線切開,今年 400+ 都是一等,300+ 都是二等,250+ 都是三等 5. 下午跟其他選手和去年高三的電神玩桌遊,打風聲好幾次打到快終局都會出現各種鎖定、調虎離山、識破、角色技能滿天飛,超刺激 6. 張庭瑋 BFS 大師 orz 7. 打🉐國蟑螂,王政祺為了讓劉澈相信一隻蠍子不是蠍子,不惜犧牲三張牌來誘導他,心機大師

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