上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 17 下一页
摘要: 比赛链接: "Educational Codeforces Round 73 (Rated for Div. 2)" 官方题解: "Educational Codeforces Round 73 Editorial" A. 2048 Game 题意 如果一个只包含 $2$ 的幂次的集合,问能否从中选 阅读全文
posted @ 2019-09-26 20:28 wuli涛涛 阅读(205) 评论(0) 推荐(1) 编辑
摘要: 题目链接: "P3369 【模板】普通平衡树" 题意 构造一种数据结构满足给出的 6 种操作。 思路 平衡树 平衡树的模板题。 先学习了一下 Treap。 Treap 在插入结点时给该结点随机生成一个额外的权值,然后用该权值维护一个大根堆,如果某个结点不满足大根堆的性质,就通过旋转与父节点交换。 对 阅读全文
posted @ 2019-09-25 22:37 wuli涛涛 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 题目链接: "MAXMATCH Maximum Self Matching" Description You're given a string s consisting of letters 'a', 'b' and 'c'. The matching function $m_s( i )$ is 阅读全文
posted @ 2019-09-24 23:34 wuli涛涛 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 题目链接: "P4173 残缺的字符串" 题意 给定长度为 $m$ 的模式串和长度为 $n$ 的目标串,两个串都带有通配符,求所有匹配的位置。 思路 FFT 带有通配符的字符串匹配问题。 设模式串为 $p$,目标串为 $t$,将两个串的内容都根据字母先后顺序映射到 $1$ 到 $26$。 如果不带有 阅读全文
posted @ 2019-09-23 22:25 wuli涛涛 阅读(165) 评论(0) 推荐(0) 编辑
摘要: "Codeforces Round 488 by NEAR (Div. 1)" 题目链接: "Nikita and Order Statistics" "CF993E Nikita and Order Statistics" Nikita likes tasks on order statistic 阅读全文
posted @ 2019-09-22 15:53 wuli涛涛 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 题目链接: "P2756 飞行员配对方案问题" 题意 给定 $m$ 个外籍飞行员和 $n m$ 个英国飞行员,每一架飞机需要一名英国飞行员和一名外籍飞行员,求最多能派出几架飞机。 思路 最大流 二分图最大匹配的模板题。 建立一个超级源点 $s$ 和一个超级汇点 $t$。让 $s$ 与所有的外籍飞行员 阅读全文
posted @ 2019-09-21 23:10 wuli涛涛 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 题目链接: "HDU 1879" Problem Description 省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。现得到城镇道路统计表,表中列出了任意两城镇间修建道路的费用,以及该道路是否已经修通的状态。现请你编写程序 阅读全文
posted @ 2019-09-20 23:32 wuli涛涛 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 题目链接: "POJ 3090" Description A lattice point $(x, y)$ in the first quadrant ($x$ and $y$ are integers greater than or equal to $0$), other than the or 阅读全文
posted @ 2019-09-19 19:54 wuli涛涛 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 题目链接: "VFMUL Very Fast Multiplication" Description Multiply the given numbers. Input n [the number of multiplications l1 l2 [numbers to multiply (at m 阅读全文
posted @ 2019-09-18 21:19 wuli涛涛 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 题目链接: "P3803 【模板】多项式乘法(FFT)" 题意 给定一个 $n$ 次多项式 $F(x)$ 和一个 $m$ 次多项式 $G(x)$,求 $F(x)$ 和 $G(x)$ 的卷积。 思路 FFT 又是一道 $FFT$ 的模板题,不过用递归的 $FFT$ 会超时。 代码 cpp includ 阅读全文
posted @ 2019-09-17 22:45 wuli涛涛 阅读(149) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 17 下一页