原创 L2-001 緊急救援 (25分) dijkstra記錄路徑

作爲一個城市的應急救援隊伍的負責人,你有一張特殊的全國地圖。在地圖上顯示有多個分散的城市和一些連接城市的快速道路。每個城市的救援隊數量和每一條連接兩個城市的快速道路長度都標在地圖上。當其他城市有緊急求助電話給你的時候,你的任務是帶領你的救

原创 1042 Shuffling Machine (20分) sprintf的使用

https://pintia.cn/problem-sets/994805342720868352/problems/994805442671132672 Shuffling is a procedure used to randomiz

原创 1043 Is It a Binary Search Tree (25分) 二叉搜索樹簡單方法遍歷前序並求出其後序序列(涉及鏡像BST)

https://pintia.cn/problem-sets/994805342720868352/problems/994805440976633856 A Binary Search Tree (BST) is recursively

原创 mysql8安裝

https://blog.csdn.net/dbdd_cf/article/details/90522178 https://www.cnblogs.com/zhengna/p/9358578.html 點贊 收藏

原创 1026 Table Tennis (30分) 1033 To Fill or Not to Fill (25分) 沒認真做的題

https://pintia.cn/problem-sets/994805342720868352/problems/994805472333250560 A table tennis club has N tables availabl

原创 1114 Family Property (25分) 並查集的變相使用

https://pintia.cn/problem-sets/994805342720868352/problems/994805356599820288 This time, you are supposed to help us co

原创 1115 Counting Nodes in a BST (30分) 簡單的二叉搜索樹(建樹和求高度)

A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree

原创 1044 Shopping in Mars (25分) 二分求和

二分求和,否則超時 還有就是函數如果沒有返回值寫void否則報錯; Shopping in Mars is quite a different experience. The Mars people pay by chained diam

原创 1038 Recover the Smallest Number (30分) 因爲要求最小的序列和,故在cmp上做文章,string substr用法

Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given {

原创 1045 Favorite Color Stripe (30分) 最大不下降子列長度

Eva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors in her f

原创 STRING

數字和字符串相互轉換 #include <string> #include <sstream> int main(){ double a = 123.32; string res; stringstream s

原创 VECTOR

C++ vector的用法(整理) vector 是向量類型,它可以容納許多類型的數據,如若干個整數,所以稱其爲容器。vector 是C++ STL的一個重要成員,使用它時需要包含頭文件: #include<vector>; 一、ve

原创 python對Excel文件操作

https://blog.csdn.net/sinat_28576553/article/details/81275650

原创 L1-009 N個數求和

https://pintia.cn/problem-sets/994805046380707840/problems/994805133597065216 這個題卡在了第三組爲啥呢? 求gcd的時候對0取餘了,3%0是錯誤的。 錯誤代碼:

原创 1095 解碼PAT准考證

PAT 准考證號由 4 部分組成: 第 1 位是級別,即 T 代表頂級;A 代表甲級;B 代表乙級; 第 2~4 位是考場編號,範圍從 101 到 999; 第 5~10 位是考試日期,格式爲年、月、日順次各佔 2 位; 最後 11~13