06 2022 档案

摘要:本来是 [0, 127],后来又被扩展为了 [0, 255]。 https://akaedu.github.io/book/apas01.html 阅读全文
posted @ 2022-06-26 10:11 Ryomk 阅读(90) 评论(0) 推荐(0)
摘要:...占位 阅读全文
posted @ 2022-06-25 10:30 Ryomk 阅读(20) 评论(0) 推荐(0)
摘要:子序列专题最长递增子序列 LIS 用动态规划做。 Favorite Color Stripe (30) Link #include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <string> #i 阅读全文
posted @ 2022-06-25 10:28 Ryomk 阅读(36) 评论(0) 推荐(0)
摘要:滑动窗口专题Shopping in Mars (25) Link 这道题还可以用前缀和+二分做。 #include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <string> #include <s 阅读全文
posted @ 2022-06-25 09:40 Ryomk 阅读(49) 评论(0) 推荐(0)
摘要:Find More Coins (30) Link 01背包问题 #include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <string> #include <string.h> # 阅读全文
posted @ 2022-06-23 07:41 Ryomk 阅读(24) 评论(0) 推荐(0)
摘要:Sort with Swap(0,*) (25) Link 这道题要求一定是和0交换。 #include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <string> #include < 阅读全文
posted @ 2022-06-22 14:15 Ryomk 阅读(40) 评论(0) 推荐(0)
摘要:Dijkstra专题Public Bike Management (30) Link 卡了半天原来是看漏了这句话:If there are more than one shortest path, the one that requires the least number of bikes sent from PBM 阅读全文
posted @ 2022-06-22 14:12 Ryomk 阅读(37) 评论(0) 推荐(0)
摘要:使用 printf 打印出 %: printf("%%"); 用一个 set 初始化另一个 set: //set<int>s1 已经初始化或含有元素 set<int>s2(s1); 向一个 set 中添加另一个 set 所有的元素: //set<int>s1,s2 已经初始化或含有元素 s2.ins 阅读全文
posted @ 2022-06-21 18:49 Ryomk 阅读(32) 评论(0) 推荐(0)
摘要:Swift学习笔记整理了一些我认为很容易混淆的知识点。大部分都是网上资料的摘录,仅用于学习和记录。 阅读全文
posted @ 2022-06-15 11:09 Ryomk 阅读(112) 评论(0) 推荐(0)
摘要:leetcode-1719 题目关键点: 树对 pairs[i]=[x_i,y_i],表示一个结点与其祖先,其中祖先可以是两者中的任意一个 别搞错了祖先的定义: 父亲(parent node):对于除根以外的每个结点,定义为从该结点到根路径上的第二个结点。 根结点没有父结点。 祖先(ancestor 阅读全文
posted @ 2022-06-15 09:36 Ryomk 阅读(51) 评论(0) 推荐(0)
摘要:有一个已经按升序排好序的数组,求某个数在数组中出现的下标区间。即,若这个数在数组中出现一次或多次,就给出这个范围。 #include <iostream> using namespace std; const int maxn = 100005; int n, q, x, a[maxn]; int 阅读全文
posted @ 2022-06-15 09:30 Ryomk 阅读(36) 评论(0) 推荐(0)
摘要:WLAN (Wireless Local Area Networks) 无线局域网络,是一种数据传输系统。它利用射频技术进行数据传输。目前WLAN通用的标准IEEE是802.11系列标准,使用的是5GHz频段和2.4GHz,在IEEE 802.11a时使用5GHz频段下支持的最大速度为54Mbps, 阅读全文
posted @ 2022-06-14 23:07 Ryomk 阅读(184) 评论(0) 推荐(0)
摘要:Link class Solution { func findDiagonalOrder(_ mat: [[Int]]) -> [Int] { var ans: [Int] = [] let (m, n) = (mat.count, mat[0].count) let maxv = m + n - 阅读全文
posted @ 2022-06-14 18:45 Ryomk 阅读(28) 评论(0) 推荐(0)
摘要:Swift Closure比较详细的学习笔记,会持续更新 阅读全文
posted @ 2022-06-14 12:34 Ryomk 阅读(29) 评论(0) 推荐(0)
摘要:PAT甲级刷题日记(三)摆烂人生 阅读全文
posted @ 2022-06-13 10:51 Ryomk 阅读(38) 评论(0) 推荐(0)
摘要:PAT甲级刷题日记(二)Would you like a cup of coffee? 阅读全文
posted @ 2022-06-12 20:22 Ryomk 阅读(31) 评论(0) 推荐(0)
摘要:PAT甲级刷题日记(一)很无聊的ԅ(¯﹃¯ԅ) 总结了一些零碎的知识点……代码倒是贴了不少。想要看题解的慎入。 阅读全文
posted @ 2022-06-08 09:32 Ryomk 阅读(50) 评论(0) 推荐(0)
摘要:题目链接🔗 需要注意的一点是:并不是单纯的后序遍历就可以了。由于是要打印后缀表达式,所以如果一个结点没有左孩子,那就要先打印该节点的值。 例如3+4这个表达式是中序表达式,写成后序表达式就是34+,这样写是因为+是一个二元运算符,3和4是它的两个操作数。但是对于-3,-就变成了一元操作符,因此需要 阅读全文
posted @ 2022-06-03 10:12 Ryomk 阅读(64) 评论(0) 推荐(0)