[Arc062] Painting Graphs with AtCoDeer Description 给定一张N点M边的无向图,每条边要染一个编号在1到K的颜色。你可以对一张染色了的图进行若干次操作,每次操作形如,在图中选择一个简单环(即不经过相同点的环),并且将其颜色逆时针旋转一个单位。形式的说, ...
分类:
其他好文 时间:
2018-08-13 21:23:28
阅读次数:
160
https://www.zybuluo.com/ysner/note/1230961 题面 有$n$个物品和$n 1$台机器,第$i$台机器会为第$i$和$i+1$个物品染色。设有$num$个方案完成全部染色需动用$x$台机器,则询问$\sum x num$。 $n\leq10^6$ 解析 一道有一 ...
分类:
系统相关 时间:
2018-07-29 20:29:01
阅读次数:
210
大致题意: 给出一个多边形,问你有多少种放法可以使得多边形稳定得立在平面上。 先对多边形求重心,在求凸包,枚举凸包的边,如果重心没有在边的范围内,则不行 判断是否在范围内可用点积来判断 1 #include<cstdio> 2 #include<iostream> 3 #include<cstrin ...
分类:
其他好文 时间:
2018-07-18 14:08:24
阅读次数:
143
问题描述: There are a row of n houses, each house can be painted with one of the k colors. The cost of painting each house with a certain color is differe ...
分类:
其他好文 时间:
2018-07-16 11:29:57
阅读次数:
224
问题描述: There are a row of n houses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a ...
分类:
其他好文 时间:
2018-07-16 11:29:43
阅读次数:
194
题面在这里! (显然首先想到反着做比较简单,每个点取第一次被覆盖到的颜色) 发现d非常小,那么是否可以暴力覆盖呢??? 考虑一个稠密图。。暴力肯定就gg了啊。。。 不过我们可以对每一个点 i 记一个max[i],表示之前到i的时候还能再往外走多少。 之后如果再到这个点并且再往外能走的距离<=max[ ...
分类:
其他好文 时间:
2018-07-13 17:36:41
阅读次数:
110
描述Painting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones.Your task is counting the segm ...
分类:
其他好文 时间:
2018-07-08 23:40:15
阅读次数:
323
题解 考虑一个点双(因为是简单环),如果没有环(两点一线),那么乘上K 如果有一个环,那么用polya定理,每个置换圈有gcd(i,n)个循环节 如果有两个及以上的环,任何一种置换都合法,那么只和每个颜色用了多少个有关,用插板法算组合数就是$\binom{n + k 1}{k 1}$ 代码 cpp ...
分类:
其他好文 时间:
2018-05-30 16:11:23
阅读次数:
380
Problem Description Eddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his sma ...
分类:
其他好文 时间:
2018-05-19 18:43:03
阅读次数:
150