随笔分类 -  竞赛

摘要:题目链接: "UVA 11178" Description Input Output Sample Input Sample Output Solution 题意 $Morley's\ theorem$ 指任意三角形的每个内角的三等分线相交的三角形为等边三角形。 给出三角形的每个点的坐标,求根据 $ 阅读全文
posted @ 2019-09-29 22:30 wuli涛涛 阅读(231) 评论(0) 推荐(0)
摘要:题目链接: "HDU 1700" Problem Description There is a cycle with its center on the origin. Now give you a point on the cycle, you are to find out the other 阅读全文
posted @ 2019-09-28 20:59 wuli涛涛 阅读(187) 评论(0) 推荐(0)
摘要:"Codeforces Global Round 2" 题目链接: "E. Pavel and Triangles" Pavel has several sticks with lengths equal to powers of two. He has $a_0$ sticks of length 阅读全文
posted @ 2019-09-27 21:56 wuli涛涛 阅读(294) 评论(0) 推荐(0)
摘要:比赛链接: "Educational Codeforces Round 73 (Rated for Div. 2)" 官方题解: "Educational Codeforces Round 73 Editorial" A. 2048 Game 题意 如果一个只包含 $2$ 的幂次的集合,问能否从中选 阅读全文
posted @ 2019-09-26 20:28 wuli涛涛 阅读(214) 评论(0) 推荐(1)
摘要:题目链接: "P3369 【模板】普通平衡树" 题意 构造一种数据结构满足给出的 6 种操作。 思路 平衡树 平衡树的模板题。 先学习了一下 Treap。 Treap 在插入结点时给该结点随机生成一个额外的权值,然后用该权值维护一个大根堆,如果某个结点不满足大根堆的性质,就通过旋转与父节点交换。 对 阅读全文
posted @ 2019-09-25 22:37 wuli涛涛 阅读(245) 评论(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涛涛 阅读(441) 评论(0) 推荐(0)
摘要:题目链接: "P4173 残缺的字符串" 题意 给定长度为 $m$ 的模式串和长度为 $n$ 的目标串,两个串都带有通配符,求所有匹配的位置。 思路 FFT 带有通配符的字符串匹配问题。 设模式串为 $p$,目标串为 $t$,将两个串的内容都根据字母先后顺序映射到 $1$ 到 $26$。 如果不带有 阅读全文
posted @ 2019-09-23 22:25 wuli涛涛 阅读(177) 评论(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涛涛 阅读(257) 评论(0) 推荐(0)
摘要:题目链接: "P2756 飞行员配对方案问题" 题意 给定 $m$ 个外籍飞行员和 $n m$ 个英国飞行员,每一架飞机需要一名英国飞行员和一名外籍飞行员,求最多能派出几架飞机。 思路 最大流 二分图最大匹配的模板题。 建立一个超级源点 $s$ 和一个超级汇点 $t$。让 $s$ 与所有的外籍飞行员 阅读全文
posted @ 2019-09-21 23:10 wuli涛涛 阅读(143) 评论(0) 推荐(0)
摘要:题目链接: "HDU 1879" Problem Description 省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。现得到城镇道路统计表,表中列出了任意两城镇间修建道路的费用,以及该道路是否已经修通的状态。现请你编写程序 阅读全文
posted @ 2019-09-20 23:32 wuli涛涛 阅读(186) 评论(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涛涛 阅读(281) 评论(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涛涛 阅读(288) 评论(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涛涛 阅读(168) 评论(0) 推荐(0)
摘要:题目链接: "P1919 【模板】A B Problem升级版(FFT快速傅里叶)" 题意 给定两个 $n$ 位 $10$ 进制整数 $x$ 和 $y$,求 $x y$。 思路 FFT $FFT$ 的模板题,好像也可以直接用高精度乘法做。 代码 cpp include using namespace 阅读全文
posted @ 2019-09-16 22:03 wuli涛涛 阅读(183) 评论(0) 推荐(0)
摘要:题目链接: "Light bulbs" 比赛链接: "The Preliminary Contest for ICPC Asia Shanghai 2019" 题意 给定 $N$ 个灯泡 (编号从 $0$ 到 $N 1$),初始都是关闭的。 给定 $M$ 个操作,每个操作包含 $L$ 和 $R$,对 阅读全文
posted @ 2019-09-15 22:43 wuli涛涛 阅读(462) 评论(0) 推荐(1)
摘要:题目链接: "POJ 1474" Description A friend of yours has taken the job of security officer at the Star Buy Company, a famous depart ment store. One of his t 阅读全文
posted @ 2019-09-14 18:58 wuli涛涛 阅读(248) 评论(0) 推荐(0)
摘要:题目链接: "HDU 5119" Problem Description Matt has N friends. They are playing a game together. Each of Matt’s friends has a magic number. In the game, Mat 阅读全文
posted @ 2019-09-13 23:37 wuli涛涛 阅读(268) 评论(0) 推荐(0)
摘要:题目链接: "P1613 跑路" 题意 给定包含 $n$ 个点和 $m$ 条边的有向图,每条边的长度为 $1$ 千米。每秒钟可以跑 $2^k$ 千米,问从点 $1$ 到点 $n$ 最少需几秒。 思路 倍增 DP Floyd 令 $dp[i][j][k]$ 表示从 $i$ 到 $j$ 是否存在长度为 阅读全文
posted @ 2019-09-12 23:00 wuli涛涛 阅读(362) 评论(2) 推荐(1)
摘要:题目链接: "POJ 1279" Problem Description The art galleries of the new and very futuristic building of the Center for Balkan Cooperation have the form of p 阅读全文
posted @ 2019-09-11 18:28 wuli涛涛 阅读(211) 评论(0) 推荐(0)
摘要:题目链接: "POJ 3130" Problem Description After counting so many stars in the sky in his childhood, Isaac, now an astronomer and a mathematician uses a big 阅读全文
posted @ 2019-09-11 18:28 wuli涛涛 阅读(221) 评论(0) 推荐(0)