CSDN个人博客地址:https://blog.csdn.net/qq_38944163 欢迎大家来踩
12 2021 档案
摘要:https://www.luogu.com.cn/problem/P1587 首先思考我们要求的是什么? \(
阅读全文
摘要:https://www.luogu.com.cn/problem/P4213 才发现杜教筛是个这么naive的东西,我觉得我也可以发明出来 给出狄利克雷卷积的几个重要性质 满足结合律和交换律 设$\large S(
阅读全文
摘要:菜的真实 C没看清楚数据范围炸了两发血亏 D用二项式定理展开一下就是个很naive的东西了 后两题比较有意思 E - Medals 首先可以发现天数的上限是 显然可以二分答案 先考虑如何建图 左边是员工,右边是天数,根据定理我们知道,对于左边的每个子集 ,都要满足
阅读全文
摘要:菜的真实 T3,T4卡大题还行 C - Camels and Bridge 首先看数据范围肯定不是一个多项式复杂度的算法 考虑枚举全排列,那么怎么判断头尾最短的长度是多少呢? 其实也不难,只要把每个连续段开到必须要开长度,然后大的继承小的即可 具体实现可以看代码 code: #include<bit
阅读全文
摘要:https://www.luogu.com.cn/problem/P6667 和20年省选很像,一下子没想出来怎么做,还是不够熟练 由点值给出,考虑到后面有组合数,还有幂函数,不妨考把写成下降幂多项式的形式 \(\sum\limits_{k=0}^n\binom{n}{k}x^k(1-x
阅读全文
摘要:https://www.luogu.com.cn/problem/P5394 之前一直以为是什么阴间东西,没有碰,现在菜知道原来是个挺naive的东西 我们把设点值的指数型生成函数为 \(\large =\s
阅读全文
摘要:https://www.luogu.com.cn/problem/P7531 玄妙DP题被BEST定理淦过去的这个出题人Benq就是逊啊 首先回忆一把定理是什么 一个有向图欧拉回路的数量设为,一个以为根的内向生成树个数为 \(T=G\prod_{i=1}^n (in[
阅读全文
摘要:https://www.luogu.com.cn/problem/P5243 大意就是给出若棵树,每棵树选一条路径,然后花的长度把他们连成一个环 问环的长度的方案数 首先肯定可以先把 然后就变成了一个经典问题,每个树暴力跑出来所有的方案,路
阅读全文
摘要:https://www.luogu.com.cn/problem/P4183 学到许多 显然要求出来一个表示离最近的叶子距离 考虑对于一个节点的情况,把它设为根 求出来以它为根的每个点的深度,记为 手玩一下容易发现对于每个节点,叶子是否需要的放判断是 \(f[u]<
阅读全文
摘要:https://www.luogu.com.cn/problem/P5667 主要是要知道可以把它先便偏移一下,然后再卷积 code: #include<bits/stdc++.h> #define ll long long #define mod
阅读全文
摘要:https://www.luogu.com.cn/problem/CF997C+dis(
阅读全文
摘要:https://www.luogu.com.cn/problem/CF1188D 奇妙DP题 https://www.luogu.com.cn/blog/RUI-R/solution-cf1188d 重点是要知道可以分别考虑每一位,按后几位排序后进位的一定是一个前缀,这样就可以优化状态数 code:
阅读全文
摘要:https://www.luogu.com.cn/problem/CF704D 假设 首先肯定是建成二分图,通关简单分析可以知道每个点可以取的范围是 都是下取整 所以跑个上下界有源汇最大流即可 code: #include<
阅读全文
摘要:https://www.luogu.com.cn/problem/P6031 首先发现每次洗牌都是独立的,所以概率 ...
阅读全文
摘要:https://www.luogu.com.cn/problem/CF605E 首先肯定对E排序 式子推出来这样 然后类似dijk...
阅读全文
摘要:https://www.luogu.com.cn/problem/CF590E 本质上就是要求最长反链 首先可以用AC自动机建出一个...
阅读全文
摘要:https://www.luogu.com.cn/problem/CF516D 注意到 ...
阅读全文
摘要:https://www.luogu.com.cn/problem/AT4995 枚举最后移动到的那个点,然后考虑DP 设 ...
阅读全文
摘要:https://www.luogu.com.cn/problem/AT5140 奇妙的构造题 首先发现 ...
阅读全文
摘要:https://www.luogu.com.cn/problem/AT4994 考虑将曼哈顿距离的绝对值拆开,变成 又因为题目要求...
阅读全文
摘要:https://www.luogu.com.cn/problem/AT4928 NB题,大受震撼 ...
阅读全文
摘要:https://www.luogu.com.cn/problem/AT4927 ...
阅读全文
摘要:https://www.luogu.com.cn/problem/AT4518 考虑如果有解,一定存在欧拉回路 那么所有点到度数一定...
阅读全文
摘要:https://www.luogu.com.cn/problem/AT4514 往01中间插一根红线,10中间插一根蓝线,如上图 ...
阅读全文
摘要:https://www.luogu.com.cn/problem/AT4505 考虑建图,每个集合连向集合内的点,连出一个二分图 得...
阅读全文
摘要:https://www.luogu.com.cn/problem/CF755F 还是有点意思的这题 首先考虑少的,显然每个环先放 ...
阅读全文
摘要:https://www.luogu.com.cn/problem/CF1439B ...
阅读全文
摘要:https://www.luogu.com.cn/problem/CF1301F 因为 ...
阅读全文
摘要:https://www.luogu.com.cn/problem/CF576D 不小心点了一下推荐题目,然后这题就会了 首先每条边按...
阅读全文
摘要:https://www.luogu.com.cn/problem/CF1110F 考虑先把问题离线下来, 用线段树维护当前点到所有叶...
阅读全文
摘要:https://www.luogu.com.cn/problem/CF1325E 有些启发性的题目 首先发现 ...
阅读全文
摘要:https://www.luogu.com.cn/problem/CF741C 怎么在ZR做过两次的题还是没想出来,逊捏 考虑对于 ...
阅读全文
摘要:https://www.luogu.com.cn/problem/CF464E 晚修结束前十分钟打开,想了一会没半点思路 杨队过来一...
阅读全文
摘要:真实水平好吧 8说了,卷起来 ABC230G - GCD Permutation 考虑 ...
阅读全文