摘要: 退役... 还真的有些舍不得呢 不过也没有什么办法了啊 学习了一年还是太菜了 文化课生活重新开始了 下次再见 阅读全文
posted @ 2020-12-07 13:27 ILH 阅读(49) 评论(0) 推荐(0)
摘要: T4://还是能开大一点数组就尽量开一点 #include <stdio.h> #include <algorithm> #include <cstring> #include <cmath> using namespace std; typedef long long ll; const int 阅读全文
posted @ 2020-12-04 08:19 ILH 阅读(90) 评论(0) 推荐(0)
摘要: 其实博弈的思路已经非常明显,继续分析下去便好 这种类型的题目使用双端队列进行优化的技巧也要开始掌握了 使用队列,栈这种数据结构的时候要注意是否清零或者为空 分类讨论,发现是递归问题 while(1)处理 #include <stdio.h> #include <algorithm> #include 阅读全文
posted @ 2020-11-29 15:38 ILH 阅读(71) 评论(0) 推荐(0)
摘要: T2 总体思路:先求简单问题,通过修正值来求最小 关键思想:单个答案多个元素求答案 单个元素对多个答案做贡献 发现sum是一定的,我们只需要求出之间的修正值就可以了 二维差分就可以解决 代码如下: #include<cctype> #include<cstdio> #include<cstring> 阅读全文
posted @ 2020-11-29 08:43 ILH 阅读(110) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <algorithm> #include <cstring> #include <cctype> #define lson k<<1 #define rson k<<1|1 #define mid (l+r)>>1 using namespac 阅读全文
posted @ 2020-11-28 21:22 ILH 阅读(167) 评论(0) 推荐(0)
摘要: T1 T4: 带权中位数问题: 问题模型:节点到数轴上某一点的距离之和最短 结论:中位数或者带权中位数的点 证明:左右逼近,左边人数大于右边显然不能继续往左,那么这辆左右两边人数尽量相等的时候最优 https://www.cnblogs.com/chenhuanfa/archive/2012/11/ 阅读全文
posted @ 2020-11-04 10:16 ILH 阅读(101) 评论(0) 推荐(0)
摘要: T1: 预处理的时候没有必要所有的都处理完毕,能够只处理有效信息才是关键/ 枚举的关键就在于枚举元素和枚举个数的转移 例:我需要 li->ri的k次方的前缀和,我可以枚举k,从li->ri加到数组,也可以枚举li->ri,一次加到k的数组当中去 #请注意:在阶段划分如此明显的前提下,直接想搜索而否定 阅读全文
posted @ 2020-11-03 21:44 ILH 阅读(127) 评论(0) 推荐(0)
摘要: T2 : #include <stdio.h> #include <algorithm> #include <cstring> using namespace std; typedef long long ll; const ll mod=998244353; const int maxn=1e5+ 阅读全文
posted @ 2020-11-02 18:44 ILH 阅读(105) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <algorithm> #include <cstring> #include <queue> using namespace std; const int maxn=20020; typedef pair<int,int> pii; prio 阅读全文
posted @ 2020-11-01 21:30 ILH 阅读(121) 评论(0) 推荐(0)
摘要: 知识的迁移,题目意思的分析 T1:互质数对 显然,对于在线的题目,我们应该认真的思考(如果计算过于麻烦,我们是不是可以通过增量来计算) 推导过程: 第二步到第三步:因为每一个d要满足|ax和ay,所以对于每一个μ来说,只有对于每一个ax加入进来的约数,会产生的只有(ay中是d倍数的个数,记录并计算就 阅读全文
posted @ 2020-10-30 15:28 ILH 阅读(92) 评论(0) 推荐(0)