07 2023 档案

摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF888F "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/888/F "CF 传送门") 做做简单题放松身心。 考虑区间 dp,设 $f_{i 阅读全文
posted @ 2023-07-31 23:30 zltzlt 阅读(17) 评论(0) 推荐(0) 编辑
摘要:Boruvka 算法的思想基于每个点的最短邻边一定在最小生成树上。算法流程是每轮对每个连通块找到一条连向另一连通块的最短边,然后合并两端点。因为每轮连通块数量至少减半,所以一共会进行 O(logn) 轮。 相比 Kruskal 和 Prim,Boruvka 在求稠密图的最小生成树上具有优 阅读全文
posted @ 2023-07-31 10:22 zltzlt 阅读(496) 评论(0) 推荐(5) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF1648E "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1648/E "CF 传送门") 被一道题创了三天![](//图.tk/0) 我们 阅读全文
posted @ 2023-07-31 10:18 zltzlt 阅读(27) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-28 16:30 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF1268E "洛谷传送门") [AtCoder 传送门](https://codeforces.com/problemset/problem/1268/E "AtCoder 传送门") 考虑一些简单的情况,比如树。 阅读全文
posted @ 2023-07-28 08:32 zltzlt 阅读(35) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-27 18:11 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-26 15:47 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-25 16:33 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF725F "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/725/F "CF 传送门") 不错的贪心题。 我们考虑一对照片只有一张的情况。那么 阅读全文
posted @ 2023-07-25 14:50 zltzlt 阅读(15) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_agc040_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/agc040/tasks/agc040_e "AtCoder 传送门") 比较神奇的题。 考 阅读全文
posted @ 2023-07-24 16:29 zltzlt 阅读(17) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-24 15:32 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF1810G "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1810/G "CF 传送门") 感觉是比较 educational 的题。 拿到 阅读全文
posted @ 2023-07-24 15:31 zltzlt 阅读(66) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc311_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc311/tasks/abc311_g "AtCoder 传送门") 考虑一维怎么做。 阅读全文
posted @ 2023-07-24 08:01 zltzlt 阅读(29) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-23 18:02 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF1776C "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1776/C "CF 传送门") orz p_b_p_b。 下文令 ai阅读全文
posted @ 2023-07-23 17:58 zltzlt 阅读(25) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/P8490 "洛谷传送门") [LOJ 传送门](https://loj.ac/p/3830 "LOJ 传送门") 不算很难的题,但是调起来比较恶心。 下文默认下标从 1 开始。 设第 i 列长堤的高度为 $h 阅读全文
posted @ 2023-07-22 19:38 zltzlt 阅读(77) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-21 18:56 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
摘要:[UOJ 传送门](https://uoj.ac/problem/450 "UOJ 传送门") d=1 时答案显然为 kn。 下面只讨论 d=3 的情况,d=2 类似。 设每个人的指数型生成函数(EGF)为 $G(x) = \sum\limits_{i = 0}^{+\ 阅读全文
posted @ 2023-07-20 19:08 zltzlt 阅读(27) 评论(1) 推荐(0) 编辑
摘要:式子: [nd]=1ni=0n1ωnid最常见的应用是 \([x \equiv y \pmod n] = [n \mid (x - y)] = \sum\limits_{i = 0}^{n 阅读全文
posted @ 2023-07-20 16:59 zltzlt 阅读(54) 评论(2) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_agc049_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/agc049/tasks/agc049_e "AtCoder 传送门") 好题。同时考查了 阅读全文
posted @ 2023-07-19 21:30 zltzlt 阅读(21) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-19 15:27 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
摘要:洛谷传送门 感觉跟 CF Gym 102978H Harsh Comments 很像。 考虑容斥,钦定 S[2,n] 中的人比 1 后死。设 P(S)S 中的人比 1 后死的概率,那么答案为: \[ans = \sum\limit 阅读全文
posted @ 2023-07-18 16:51 zltzlt 阅读(28) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-18 10:18 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_agc032_d "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/agc032/tasks/agc032_d "AtCoder 传送门") 设 bi阅读全文
posted @ 2023-07-18 10:17 zltzlt 阅读(13) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-17 19:57 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF1848E "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1848/E "CF 传送门") 感觉比这场的 F 简单。 发现我们要进行 x 阅读全文
posted @ 2023-07-17 19:42 zltzlt 阅读(17) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF1844G "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1844/G "CF 传送门") 出题人脑洞真大…… 设 xii 阅读全文
posted @ 2023-07-16 20:51 zltzlt 阅读(16) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF1844C "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1844/C "CF 传送门") 原题是 [[ARC092E] Both Side 阅读全文
posted @ 2023-07-16 20:00 zltzlt 阅读(28) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc092_c "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc092/tasks/arc092_c "AtCoder 传送门") Key obser 阅读全文
posted @ 2023-07-16 20:00 zltzlt 阅读(5) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/P4931 "洛谷传送门") 设 fii 对情侣完全错位的方案数,那么答案为: (nk)n!(nk)!2kfnk 分别代表选择 k 阅读全文
posted @ 2023-07-15 12:47 zltzlt 阅读(32) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/P6667 "洛谷传送门") 点值不好搞。考虑把它搞成系数一类的东西。 由二项式反演,$f(x) = \sum\limits_{i = 0}^x \binom{x}{i} b_i \Leftrightarrow b_i 阅读全文
posted @ 2023-07-14 21:47 zltzlt 阅读(49) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/P4548 "洛谷传送门") 结论:答案为 s1k=smk+1mnk。 记一下两种理解方法。 假设有人开了一个赌场,每一秒钟有一位赌 阅读全文
posted @ 2023-07-13 15:57 zltzlt 阅读(24) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-13 15:06 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc309_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc309/tasks/abc309_h "AtCoder 传送门") 挺妙的题。 考虑 阅读全文
posted @ 2023-07-13 08:03 zltzlt 阅读(36) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_agc012_d "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/agc012/tasks/agc012_d "AtCoder 传送门") 不错的题。bx E 阅读全文
posted @ 2023-07-12 21:22 zltzlt 阅读(7) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/P6892 "洛谷传送门") 感觉这题递归的思想挺值得借鉴的。 特判 n=3。 首先根据样例不难猜测最小次数为 n。事实上最小次数下界为 n,因为设 x 为当前相邻元素相同对数,不难发现除第一次操作 阅读全文
posted @ 2023-07-12 11:14 zltzlt 阅读(30) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-12 10:58 zltzlt 阅读(3) 评论(0) 推荐(0) 编辑
摘要:[CF 传送门](https://codeforces.com/gym/102900/problem/B "CF 传送门") 感觉像脑筋急转弯。 考虑所有数字之和就是相邻的 (,空地) 对数,因此翻转后这个对数不会改变。 然后由于抽屉原理,ba阅读全文
posted @ 2023-07-12 08:39 zltzlt 阅读(31) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF1364D "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1364/D "CF 传送门") 简单题。 特判掉 m=n1 的情况 阅读全文
posted @ 2023-07-12 08:10 zltzlt 阅读(30) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc164_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc164/tasks/arc164_e "AtCoder 传送门") 妙妙题。 我们考虑 阅读全文
posted @ 2023-07-11 21:56 zltzlt 阅读(57) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc309_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc309/tasks/abc309_g "AtCoder 传送门") 前置知识:[[AR 阅读全文
posted @ 2023-07-11 20:21 zltzlt 阅读(51) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF1525F "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1525/F "CF 传送门") 套路地,将 DAG 的最小不交路径覆盖转化为点数 阅读全文
posted @ 2023-07-11 17:01 zltzlt 阅读(29) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF1508C "洛谷传送门") [AtCoder 传送门](https://codeforces.com/problemset/problem/1508/C "AtCoder 传送门") 比较需要观察的题。 设 $v 阅读全文
posted @ 2023-07-10 19:33 zltzlt 阅读(20) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF920E "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/920/E "CF 传送门") 考虑直接暴力 dfs。设搜到点 u,把 u 阅读全文
posted @ 2023-07-10 19:17 zltzlt 阅读(21) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc308_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc308/tasks/abc308_h "AtCoder 传送门") 这是官方题解的 $ 阅读全文
posted @ 2023-07-10 15:35 zltzlt 阅读(30) 评论(0) 推荐(0) 编辑
摘要:[UOJ 传送门](https://uoj.ac/problem/37 "UOJ 传送门") 考虑 dp。设 fS 为点集 S 构成强连通分量的方案数。 容易想到容斥。设 edSS 内部连边数,那么 fS 就是总的方案数 2edS 减去构成的不是强连通分量 阅读全文
posted @ 2023-07-10 11:48 zltzlt 阅读(480) 评论(0) 推荐(4) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF1847F "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1847/F "CF 传送门") 我们首先观察 a 的形态。令题面中给出的 $ 阅读全文
posted @ 2023-07-10 10:45 zltzlt 阅读(58) 评论(0) 推荐(1) 编辑
该文被密码保护。
posted @ 2023-07-10 09:35 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF997C "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/997/C "CF 传送门") 考虑容斥,钦定 ij 列放同一种颜色, 阅读全文
posted @ 2023-07-09 22:04 zltzlt 阅读(57) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/P6620 "洛谷传送门") 记一下是怎么推的。 k=0nf(k)×xk×(nk) $$= \sum\limits_{p = 0 阅读全文
posted @ 2023-07-09 14:26 zltzlt 阅读(11) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_agc058_d "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/agc058/tasks/agc058_d "AtCoder 传送门") Orz H6_6Q 阅读全文
posted @ 2023-07-08 10:55 zltzlt 阅读(18) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-08 10:54 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-07 08:54 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF1142E "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1142/E "CF 传送门") 感觉很神奇啊,想了挺久的。 如果没有粉色边是容易 阅读全文
posted @ 2023-07-06 20:29 zltzlt 阅读(19) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_keyence2021_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/keyence2021/tasks/keyence2021_e "AtCoder 阅读全文
posted @ 2023-07-06 16:18 zltzlt 阅读(10) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/P7722 "洛谷传送门") 被踩爆了![](//图.tk/7)好神的题啊! 转化一下题意,给出三个数组 a,b,c,每次可以单点修改 a,b,c,询问即求 $b_i = a_j = c_k, 1 \l 阅读全文
posted @ 2023-07-05 15:37 zltzlt 阅读(64) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_agc033_d "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/agc033/tasks/agc033_d "AtCoder 传送门") 这题感觉实在太 e 阅读全文
posted @ 2023-07-05 14:53 zltzlt 阅读(17) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-05 14:51 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-04 21:14 zltzlt 阅读(0) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc163_d "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc163/tasks/arc163_d "AtCoder 传送门") 怎么连这种相对传统 阅读全文
posted @ 2023-07-03 21:28 zltzlt 阅读(83) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc153_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc153/tasks/arc153_e "AtCoder 传送门") 我们考虑给定 $X 阅读全文
posted @ 2023-07-03 21:05 zltzlt 阅读(17) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/CF1508D "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1508/D "CF 传送门") 先忽略掉所有 ai=i 的点。 考虑我 阅读全文
posted @ 2023-07-03 20:01 zltzlt 阅读(14) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2023-07-03 14:50 zltzlt 阅读(2) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc308_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc308/tasks/abc308_g "AtCoder 传送门") 考虑没有删除操作怎 阅读全文
posted @ 2023-07-03 08:47 zltzlt 阅读(30) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc163_c "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc163/tasks/arc163_c "AtCoder 传送门") 这题是不是想到裂项 阅读全文
posted @ 2023-07-03 08:12 zltzlt 阅读(73) 评论(0) 推荐(0) 编辑
摘要:[洛谷传送门](https://www.luogu.com.cn/problem/AT_agc021_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/agc021/tasks/agc021_e "AtCoder 传送门") 容易发现一个变色龙 阅读全文
posted @ 2023-07-01 19:39 zltzlt 阅读(6) 评论(0) 推荐(0) 编辑

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