原创 CS:APP 實驗DataLab (滿分原創,解析詳細)

實驗及其環境 Data Lab [Updated 12/16/19] 環境: Ubantu gcc版本: 4.8.5 常用命令 make:編譯所有文件 ./dlc bits.c: 測試使用的操作符是否合法 ./btest -h

原创 PAT 甲級 A1039

1039 Course List for Student (25分) 題目描述 Zhejiang University has 40000 students and provides 2500 courses. Now given

原创 PAT 甲級 A1084

1084 Broken Keyboard (20分) 題目描述 On a broken keyboard, some of the keys are worn out. So when you type some sentence

原创 PAT 甲級 A1056

1056 Mice and Rice (25分) 題目描述 Mice and Rice is the name of a programming contest in which each programmer must writ

原创 PAT 甲級 A1051

1051 Pop Sequence (25分) 題目描述 Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3

原创 Echarts實現帶時間軸的疫情地圖

效果圖如下: 實現了一個小小的demo,來對麻城市發病的人的地理位置、和對應時間進行顯示。實現地圖的加載時,爲了方便,數據和代碼我都直接放在服務器的環境下運行了。利用ajax對數據進行請求,每天的患者數據都是一個json文件,利

原创 PAT 甲級 A1054

1071 Speech Patterns (25分) 題目描述 Behind the scenes in the computer’s memory, color is always talked about as a serie

原创 PAT 甲級 A1086

1086 Tree Traversals Again (25分) 題目描述 An inorder binary tree traversal can be implemented in a non-recursive way wi

原创 PAT 甲級 A1030

題目連接 1030 Travel Plan (30分) 題目大意 給定輸入輸出格式,輸出源結點到目標結點的最短路徑、距離、cost。若最短路徑有多條,則輸出cost之和最少的那條 思路 在原來鄰接表的基礎上,增多一個cost表示花

原创 C++中常用的字符處理函數

使用內置函數提升刷題效率 C++中常用的幾個字符處理函數 islower(char c) 是否爲小寫字母 isuppper(char c) 是否爲大寫字母 isdigit(char c) 是否爲數字 isalpha(char c

原创 PAT 甲級 A1045(動態規劃10ms解決)

題目連接 1045 Favorite Color Stripe (30分) 題目大意 給定一個Eva喜歡的顏色序列和一個總的顏色序列,從總的顏色序列中找出按Eva喜歡的顏色序列順序出現的最長子序列。有點繞,結合樣例來說明什麼意思。

原创 cin和cout提速

在主函數main開頭加入一下三句,可以讓cin和cout速度大幅度增加: #include <iostream> int main() { ios::sync_with_stdio(false); cin.tie(nullpt

原创 PAT 甲級 A1052

1022 Digital Library (30分) 題目描述 A linked list consists of a series of structures, which are not necessarily adjacen

原创 PAT 甲級 A1010

1010 1010 Radix (25分) 題目描述 Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be

原创 PAT 甲級 A1025

1012 The Best Rank (25分) 題目描述 To evaluate the performance of our first year CS majored students, we consider their