摘要:
本来标题是 $\texttt{CSP-S2022}$ 的,但因为一些原因又报了 pj,所以标题变了。 $\text{2022.11.1 Update:因为寄了,所以成了游寄}$。 初赛 $\texttt{Day }-∞\to\texttt{Day 0}$ 一直在初赛模拟(提高),每次分数 $\in[ 阅读全文
posted @ 2022-08-02 09:05
lsj2009
阅读(461)
评论(0)
推荐(2)
摘要:
坐标 ZJ。 初赛 Day -? $\texttt{PJ}$ 试卷随便做做 $\texttt{TG}$ 彻底颓。 Day 0 早上打 $\texttt{TG}$(坐的似乎是一年级教室... 身为一个 $6$ 年级蒟蒻,看着身边的大佬瑟瑟发抖(还好有几个我认识的同年级学生。 下午 $\texttt{P 阅读全文
posted @ 2022-08-02 09:04
lsj2009
阅读(304)
评论(0)
推荐(1)
摘要:
Problem 对于每一个正整数 $x$,有 $x=p_1^{c_1} \cdot p_2^{c_2} \cdot ... \cdot p_n^{c_n}$。 $f(x)=\sum_{i=1}^n c_i$。 问对于 $x$ 是否有一个 $y$,使 $f(y)>f(x)$ 并 $y < x$。 li 阅读全文
posted @ 2022-08-02 09:02
lsj2009
阅读(38)
评论(0)
推荐(0)
摘要:
Problem 给定一个有 $n$ 个节点的树,进行 $m$ 次操作,每次操作形如 x val,把以 $x$ 节点为根的子树的所有节点的权值 $+val$。 link->https://atcoder.jp/contests/abc138/tasks/abc138_d Solution 我们可以参考 阅读全文
posted @ 2022-08-02 08:59
lsj2009
阅读(35)
评论(0)
推荐(0)
摘要:
Problem link->https://atcoder.jp/contests/abc131/tasks/abc131_d。 Solution 很明显,这是一道贪心。 我们选择以完成期限为第一关键字,以完成时间为第二关键字进行排序。 为什么呢?我们是在保证完成任务的情况尽量选择最优解,所以我们肯 阅读全文
posted @ 2022-08-02 08:57
lsj2009
阅读(33)
评论(0)
推荐(0)
摘要:
Problem link->https://www.luogu.com.cn/problem/P8092。 Solution ~~这真是道黄题?(超小声。~~ 看一眼数据范围:$n\le 10^5,h_i\le 10^9$,这不是 $O(n)$ 就是 $O(n\log{n})$ 了。 容易发现,当 阅读全文
posted @ 2022-08-02 08:55
lsj2009
阅读(43)
评论(0)
推荐(0)
摘要:
Problem 给定一个正整数序列 $a$,问有多少个 $(i,j)$,满足 $\max\limits_{i<k<j}(a_k)<\min(a_i,a_j)$。 link->https://www.luogu.com.cn/problem/P8094 Solution 个人认为这是一道经典的单调栈练 阅读全文
posted @ 2022-08-02 08:52
lsj2009
阅读(29)
评论(0)
推荐(0)
摘要:
Problem link->https://www.luogu.com.cn/problem/P8115 Solution 这题一看就是个模拟,我们可以考虑使用秦九韶算法在读入字符时计算每一个数字 $x$ 的十进制,然后遇见非数字字符就清空 $x$,再考虑需要输出十进制还是十六进制。 Code #i 阅读全文
posted @ 2022-08-02 08:50
lsj2009
阅读(49)
评论(0)
推荐(0)
摘要:
Problem 在仅包含字符 H 和 G 的字符串 $s$ 中,有多少个子串满足: 包含一个 H,包含至少两个 G; 包含一个 G,包含至少两个 H。 link->https://www.luogu.com.cn/problem/P7993 Solution 第一反应是枚举字符串左端点 $l$,右端 阅读全文
posted @ 2022-08-02 08:48
lsj2009
阅读(111)
评论(0)
推荐(0)
摘要:
Problem link->https://www.luogu.com.cn/problem/P7995 Solution 看到这题,我的第一反应就是——BFS!然而打完交上去之后发现……TLE! 不过思考过后,可以剪枝优化:当位于 $(x,y)$ 面向 $w$(0表示右,1表示下),还剩 $k$ 阅读全文
posted @ 2022-08-02 08:46
lsj2009
阅读(71)
评论(0)
推荐(0)