会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
PAT甲级拿不到满分不改名
首页
联系
订阅
管理
2022年7月18日
关于题目中遇到的一些坑
摘要:
1085 Perfect Sequence Link 这道题,别想着用 lower_bound 或 upper_bound 了。如果有相同元素,那么 len 很可能就算少了。 另外,p 要用 long long 类型,不然最后一个测试用例过不了。 不过这题用 lower_bound 或 upper_
阅读全文
posted @ 2022-07-18 23:23 Ryomk
阅读(38)
评论(0)
推荐(0)
2022年7月15日
二叉树专题
摘要:
BST、AVL......前中后序遍历……什么?!不用建树 ||Φ|(|T|Д|T|)|Φ||
阅读全文
posted @ 2022-07-15 12:23 Ryomk
阅读(40)
评论(0)
推荐(0)
2022年7月14日
C++ queue stack 清空操作
摘要: 没有 q.clear() 这种操作啊 一个一个 pop 出来肯定是可以的 还可以直接给对象赋空值 最高效的方法就是和空队列/栈进行 swap: //queue void clearQueue1(queue<elemType> & q) { queue<elemType> empty; swap(em
阅读全文
posted @ 2022-07-14 14:31 Ryomk
阅读(458)
评论(0)
推荐(1)
2022年7月11日
LaTex or Markdown 数学符号
摘要: 任意: $\forall$ \forall 存在: $\exists$ \exists braces: $\lbrace1,2,...,n\rbrace$ \lbrace1,2,...,n\rbrace 整除: $\mid$ \mid 不整除: $\nmid$ \nmid 恰整除: $\parall
阅读全文
posted @ 2022-07-11 10:55 Ryomk
阅读(814)
评论(0)
推荐(0)
2022年7月7日
Rational
摘要: 1081 Rational Sum Link #include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <string> #include <string.h> #include <v
阅读全文
posted @ 2022-07-07 21:55 Ryomk
阅读(41)
评论(0)
推荐(0)
2022年7月2日
模拟专题
摘要: 1095 Cars on Campus Link 配对要求是,如果一个车多次进入未出,取最后一个值;如果一个车多次out未进入,取第一个值。 注意:一个车可能出入校园好多次,停车的时间应该取之和 #include <iostream> #include <cstdio> #include <cstd
阅读全文
posted @ 2022-07-02 22:48 Ryomk
阅读(29)
评论(0)
推荐(0)
2022年6月26日
ASCII码的范围
摘要: 本来是 [0, 127],后来又被扩展为了 [0, 255]。 https://akaedu.github.io/book/apas01.html
阅读全文
posted @ 2022-06-26 10:11 Ryomk
阅读(85)
评论(0)
推荐(0)
2022年6月25日
二分专题
摘要: ...占位
阅读全文
posted @ 2022-06-25 10:30 Ryomk
阅读(16)
评论(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
阅读(25)
评论(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
阅读(29)
评论(0)
推荐(0)
下一页
公告