原创 18年秋季第四題 PAT甲級 1151 LCA in a Binary Tree (30分)

題目來源:https://pintia.cn/problem-sets/994805342720868352/problems/1038430130011897856 備考彙總貼:2020年3月PAT甲級滿分必備刷題技巧 題目 The l

原创 17年冬季第四題 PAT甲級 1143 Lowest Common Ancestor (30)

題目來源:https://pintia.cn/problem-sets/994805342720868352/problems/994805343727501312 備考彙總貼:2020年3月PAT甲級滿分必備刷題技巧 題目 The lo

原创 用Mac給pdf加全書目錄:OCR/Vim魔改目錄/超方便導入

有時候我們需要反覆閱讀的電子書沒有目錄,這簡直太影響用戶體驗了。而且在Mac系統,我最喜歡的原生應用“預覽”是沒有手動添加目錄的。但是現在,我能通過以下這個辦法給“預覽”裏的pdf快速添加目錄。 首先,我們需要的軟件: 裝了windows

原创 夫百千法門,同歸方寸

四祖道:“夫百千法門,同歸方寸;河沙妙德,總在心源。一切戒門、定門、慧門、神通變化,悉自具足,不離汝心。一切煩惱業障,本來空寂。一切因果,皆如夢幻。無三界可出,無菩提可求。人與非人,性相平等。大道虛曠。絕思絕慮。如是之法,汝今已得,更無闕

原创 18年秋季第一題 PAT甲級 1148 Werewolf - Simple Version (20分) 剪不斷理還亂的邏輯

題目 Werewolf(狼人殺) is a game in which the players are partitioned into two parties: the werewolves and the human beings.

原创 17冬第二題 PAT甲級 1141 Ranking of Institutions (25分) 有點雞賊

題目 After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now

原创 18年春季第四題 PAT甲級 1147 Heaps (30分) 可以不建樹

彙總貼 2020年3月PAT甲級滿分必備刷題技巧 題目 來源:https://pintia.cn/problem-sets/994805342720868352/problems/994805342821531648 In compute

原创 19年冬季第二題 PAT甲級 1165 Block Reversing (25分) 跟1133類似的題目

題目 Given a singly linked list L. Let us consider every K nodes as a block (if there are less than K nodes at the end of

原创 PAT甲級A1108 Finding Average (20分)/字符串

題目鏈接:https://pintia.cn/problem-sets/994805342720868352/problems/994805360777347072 讀幾個數,不合法就報錯,計算合法的數量和平均數。 構思這種題,一

原创 2019年9月8日秋季PAT甲級題解-2-1161-Merging Linked Lists (25 分) 雙解法

Given two singly linked lists L​1​​=a​1​​→a​2​​→⋯→a​n−1​​→a​n​​ and L​2​​=b​1​​→b​2​​→⋯→b​m−1​​→b​m​​. If n≥2m, you are

原创 PAT甲級1145 Hashing - Average Search Time (25分) 二次探測法知識點講解

這道題需要額外補充的知識點是Quadratic probing和Average Search Time。題目都沒有解釋,需要知識儲備,所以當年不知道這道題是難倒了多少人。 Quadratic probing (二次探測法) 簡而言之,探測

原创 17年春季第二題 1133 Splitting A Linked List(25分)自古華山一條路

題目 Given a singly linked list, you are supposed to rearrange its elements so that all the negative values appear before

原创 PAT甲級1014 Waiting in Line30分/非隊列的multimap實現/最大數據點幫助調試/測試點可疑漏洞

題目來源:https://pintia.cn/problem-sets/994805342720868352/problems/994805498207911936 用隊列實現:https://www.liuchuo.net/archiv

原创 2019年9月8日秋季PAT甲級題解-4 Dijkstra Sequence (30 分) 詳細分析

Dijkstra's algorithm is one of the very famous greedy algorithms. It is used for solving the single source shortest pat

原创 19年冬季第四題 PAT甲級 1167 Cartesian Tree (30分)超級詳解不AC都難

題目: 7-4 Cartesian Tree (30分) A Cartesian tree is a binary tree constructed from a sequence of distinct numbers. The