1 2 3 4 5 ··· 13 下一页
摘要: 对于$(i,j)$,令$i=2^{a_1} \times 3^{a_2}\times 5^{a_3}\times...$,$j=2^{b_1}\times 3^{b_2}\times 5^{b_3}\times...$$dist(i,j)=\displaystyle \sum_{k=1}p_k|a_ 阅读全文
posted @ 2022-04-25 19:54 Stump 阅读(36) 评论(0) 推荐(0) 编辑
摘要: Finding Expected Value简易题解 Part1 先不考虑有 \(-1\) 的情况 我们可以将本题转化成这样一个模型。一共有$k$个人,每人手上有$x_i$个饼干,保证$\sum x_i=n$。($k,n$同原题意) 现在有如下操作: 1.每次等概率随机一个人$i$,保证$i$手头上 阅读全文
posted @ 2021-10-05 09:26 Stump 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 题目:https://www.nowcoder.com/acm/contest/157/F 题解:https://www.nowcoder.com/discuss/93531?type=101&order=0&pos=2&page=0 #include<cstdio> #include<algori 阅读全文
posted @ 2018-08-13 16:30 Stump 阅读(144) 评论(0) 推荐(0) 编辑
摘要: https://www.lydsy.com/JudgeOnline/problem.php?id=5093 markdown:https://www.zybuluo.com/mdeditor#1221753 #include<cstdio> #include<algorithm> #define r 阅读全文
posted @ 2018-07-21 20:38 Stump 阅读(152) 评论(0) 推荐(0) 编辑
摘要: https://www.lydsy.com/JudgeOnline/problem.php?id=5104 https://www.zybuluo.com/mdeditor#1210359 #include<iostream> #include<cstdio> #include<cstdlib> # 阅读全文
posted @ 2018-07-11 17:49 Stump 阅读(405) 评论(0) 推荐(0) 编辑
摘要: https://www.lydsy.com/JudgeOnline/problem.php?id=5329 把仙人掌建成圆方树 对于每次询问建出一棵虚树 然后统计两两点对之间的不同圆点个数和 即为答案 #include<cstdio> #include<algorithm> #include<cst 阅读全文
posted @ 2018-07-08 22:11 Stump 阅读(172) 评论(0) 推荐(0) 编辑
摘要: https://www.lydsy.com/JudgeOnline/problem.php?id=1095 动态点分治 其实就是做点分治时把当前找出来的重心向上一次找到的重心连边, 这样可以是重构后的树高为log的。 重构后的数称为点分树。 构造出点分树, 每个节点开两个堆分别维护子树到它的所有链和 阅读全文
posted @ 2018-06-23 17:18 Stump 阅读(239) 评论(0) 推荐(0) 编辑
摘要: https://www.lydsy.com/JudgeOnline/problem.php?id=3992 有a*bΞx(mod m),则ord(a)+ord(b)Ξord(x)(mod φ(m)) 对Σxord(si)循环卷积FFT即可 #include<cstdio> #include<algo 阅读全文
posted @ 2018-06-18 16:40 Stump 阅读(176) 评论(0) 推荐(0) 编辑
摘要: https://www.lydsy.com/JudgeOnline/problem.php?id=2648 存个kd-tree板子 阅读全文
posted @ 2018-06-16 20:10 Stump 阅读(315) 评论(0) 推荐(0) 编辑
摘要: Day1一试 T1写了玄学离线+O(n^2)暴力做法=65,怎么全场都会T1正解QWQ. T2写了6分暴力+9分排列组合=15. T3爆0,没时间肛QWQ. Day2二试 T1写了n种假做法,爆0,然而全场仅有10人得分. T2暴力树形DP+分治NTT=55. T3没认真看提示最后只拿了5分QWQ 阅读全文
posted @ 2018-06-07 18:50 Stump 阅读(263) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 13 下一页