![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
构造
ffutop
这个作者很懒,什么都没留下…
展开
-
HDU 5710 Digit-Sum (构造)
Problem DescriptionLet S(N) be digit-sum of N, i.e S(109)=10,S(6)=6. If two positive integers a,b are given, find the least positive integer n satisfying the condition a×S(n)=b×S(2n). If there is no原创 2017-05-05 18:34:23 · 789 阅读 · 0 评论 -
Codeforces Gym 101173 K. Key Knocking (构造)
题意对于给定的长为 3×N3\times N 的 01 字符串 S,求在最多变换 N 次下使得字符串 S 的 weight >= 2n 。字符串的 weight 为 相邻不同字符的个数 + 1. 如 011010100 的 weight = 7单次变换为选择连续的两个数,将 0→10\rightarrow 1 以及 1→01 \rightarrow 0 。解题思路构造,对于前 3×(N−1)3\ti原创 2017-07-01 16:35:17 · 725 阅读 · 0 评论 -
Codeforces Round #423 D. High Load
Problem要求构造 n 个点树,使得叶子节点仅有 k 个,同时树的直径尽可能短。输出最短树的直径,及构造方案。限制条件3≤n≤2⋅1053 \le n \le 2\cdot 10^52≤k≤n−12\le k\le n-1解法特判非叶子节点数为 1, 2 的情况。以任意一点为根 R,叶子节点数为 k ,即表示根 R 可以连接 k 条链。使得树直径最小即使得每条链的长度平均。此时的最长链长+最短链原创 2017-07-13 08:51:53 · 604 阅读 · 0 评论 -
Codeforces Gym 101142 J. Java2016 (构造)
题意John likes to learn esoteric programming languages. Recently he discovered the probabilistic programming language Java2K. Built-in functions of Java2K have only a certain probability to do whatever y原创 2017-06-27 09:30:20 · 842 阅读 · 0 评论 -
HDU 6090 Rikka with Graph (贪心+构造, 2017 Multi-Univ Training Contest 5)
Problem图上两点间距离被定义为 disti,jdist_{i,j} 为两点间最短路距离(任意直接相连两点距离为 1 ),若两点不连通,则记 disti,jdist_{i,j} 为该图中点数 n 。要求构造一个 n 点 m 条边的图 G ,使得 ∑ni=1∑nj=1disti,j\sum_{i=1}^n\sum_{j=1}^n dist_{i,j} 最小。Limit1≤n≤1061\le n\原创 2017-08-09 13:54:06 · 484 阅读 · 0 评论