随笔分类 -  学习笔记

摘要:树状数组的应用 阅读全文 »
posted @ 2024-02-13 14:49 ljfyyds 阅读(61) 评论(0) 推荐(0) 编辑
摘要:tarjan,有向图的强连通分量 阅读全文 »
posted @ 2024-01-27 15:17 ljfyyds 阅读(38) 评论(0) 推荐(0) 编辑
摘要:并查集 阅读全文 »
posted @ 2024-01-20 15:48 ljfyyds 阅读(14) 评论(0) 推荐(0) 编辑
摘要:A. 放置石子 我们设第一格的东西为 x ,则接下来的格数为 21+x32x+143x+255x+3...易得x的系数就是原来的斐波那契额数列,而后面加上来的也是!我们可以打表 左边为系数表,右边为加的数表 #include <bits/stdc++ 阅读全文 »
posted @ 2023-11-18 19:18 ljfyyds 阅读(10) 评论(0) 推荐(0) 编辑
摘要:线段树 阅读全文 »
posted @ 2023-09-03 21:50 ljfyyds 阅读(20) 评论(0) 推荐(0) 编辑
摘要:## [C. 【例题3】公园遛狗](https://www.ybtoj.com.cn/contest/541/problem/3) 我们对于每一个线段树的节点,维护几个值 sum 表示当前区间的区间和 ml 表示最大前缀和 mr 表示最大后缀和 ans 表示当前区间的最大子段和 接下 阅读全文 »
posted @ 2023-08-18 15:49 ljfyyds 阅读(29) 评论(0) 推荐(0) 编辑
摘要:# dfs序线段树 [1.树上操作](https://www.ybtoj.com.cn/contest/541/problem/6) ### 思路 遍历一整棵树,记录一下节点 u 的所对应的子树的节点数 sizu 以及 dfsdfnu 根据整棵树的 dfs 序,我们可以 阅读全文 »
posted @ 2023-08-18 10:58 ljfyyds 阅读(34) 评论(0) 推荐(0) 编辑
摘要:树上前缀和 阅读全文 »
posted @ 2023-08-12 21:10 ljfyyds 阅读(13) 评论(0) 推荐(0) 编辑
摘要:# [Codeforces Round 881 (Div. 3)](https://codeforces.com/contest/1857) ## [A.Array Coloring](https://www.luogu.com.cn/problem/CF1857A) ### 题目大意 [link] 阅读全文 »
posted @ 2023-08-08 20:24 ljfyyds 阅读(29) 评论(0) 推荐(0) 编辑
摘要:## [A.Tales of a Sort](https://codeforces.com/contest/1856/problem/A) ### 题目大意 Alphen has an array of positive integers a of length n. Alphen can pe 阅读全文 »
posted @ 2023-08-07 16:50 ljfyyds 阅读(34) 评论(0) 推荐(1) 编辑
摘要:# [Codeforces Round 882 (Div. 2)](https://codeforces.com/contest/1847) ## [A.The Man who became a God](https://www.luogu.com.cn/problem/CF1847A) ### 题 阅读全文 »
posted @ 2023-08-04 15:01 ljfyyds 阅读(35) 评论(0) 推荐(0) 编辑
摘要:## T3 strong password 1. 就是对于输入的每一个 l,r ,我们遍历 s[l] s[r],对于每次遍历,我们设置一个临时指针 cur ,然后通过指针右移寻找所需要的值 2. 在外面我们弄两个指针,分别代表每次遍历 [l,r] 的区间的指针 nmx 和全局指针 阅读全文 »
posted @ 2023-08-03 20:02 ljfyyds 阅读(12) 评论(0) 推荐(0) 编辑
摘要:Codeforces Round 887 (Div. 2) 阅读全文 »
posted @ 2023-08-01 21:03 ljfyyds 阅读(34) 评论(0) 推荐(0) 编辑
摘要:Codeforces Round 885 (Div. 2) 阅读全文 »
posted @ 2023-08-01 20:55 ljfyyds 阅读(17) 评论(0) 推荐(0) 编辑
摘要:Educational Codeforces Round 152 (Rated for Div. 2) 阅读全文 »
posted @ 2023-07-29 20:05 ljfyyds 阅读(69) 评论(0) 推荐(0) 编辑
摘要:NIIM 阅读全文 »
posted @ 2023-07-07 17:19 ljfyyds 阅读(99) 评论(0) 推荐(0) 编辑
摘要:矩阵快速幂,DP 阅读全文 »
posted @ 2023-07-06 19:25 ljfyyds 阅读(26) 评论(0) 推荐(0) 编辑
摘要:优化DP 阅读全文 »
posted @ 2023-07-05 19:38 ljfyyds 阅读(16) 评论(0) 推荐(0) 编辑
摘要:DP 阅读全文 »
posted @ 2023-07-04 16:07 ljfyyds 阅读(14) 评论(0) 推荐(0) 编辑
摘要:单调队列优化DP主要是用来解决需要区间维护最值问题的dp 阅读全文 »
posted @ 2023-06-28 18:38 ljfyyds 阅读(39) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示