2018年12月3日

poj 3590 The shuffle Problem——DP+置换

摘要: 题目:http://poj.org/problem?id=3590 bzoj 1025 的弱化版。大概一样的 dp 。 输出方案的时候小的环靠前。不用担心 dp 时用 > 还是 >= 来转移,因为答案的那个 lcm 有唯一分解。 阅读全文

posted @ 2018-12-03 21:37 Narh 阅读(256) 评论(0) 推荐(0)

poj 3128 Leonardo's Notebook——思路(置换)

摘要: 题目:http://poj.org/problem?id=3128 从环的角度考虑。 原来有奇数个点的环,现在点数不变; 原来有偶数个点的环(设有 k 个点),现在变成两个大小为 k/2 的环。 所以判断一下现在的有偶数个点的环是不是成双成对的就行了。 阅读全文

posted @ 2018-12-03 20:59 Narh 阅读(187) 评论(0) 推荐(0)

bzoj 1004 [HNOI2008]Cards && poj 2409 Let it Bead ——置换群

摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1004 http://poj.org/problem?id=2409 学习材料:https://www.cnblogs.com/nietzsche-oier/p/6883880.html htt 阅读全文

posted @ 2018-12-03 19:47 Narh 阅读(189) 评论(0) 推荐(0)

bzoj 1119 [POI2009]SLO && bzoj 1697 [Usaco2007 Feb]Cow Sorting牛排序——思路(置换)

摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1119 https://www.lydsy.com/JudgeOnline/problem.php?id=1697 先找到置换的循环节。发现对于同一个循环节里的元素,可以找一个代价最小的元素,用 阅读全文

posted @ 2018-12-03 18:07 Narh 阅读(160) 评论(0) 推荐(0)

AGC006 C Rabbit Exercise——思路(置换)

摘要: 题目:https://agc006.contest.atcoder.jp/tasks/agc006_c 选了 i 位置后 x[ i ] = x[ i-1 ] + x[ i+1 ] - x[ i ] 。 从差分序列来看,选 i 位置后就是 swap( a[ i ] , a[ i+1 ] ) 。 一组之 阅读全文

posted @ 2018-12-03 11:24 Narh 阅读(185) 评论(0) 推荐(0)

hdu 5730 Shell Necklace——多项式求逆+拆系数FFT

摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=5730 可以用分治FFT。但自己只写了多项式求逆。 和COGS2259几乎很像。设A(x),指数是长度,系数是方案。 \( A(x)^{k} \) 的 m 次项系数表示 k 个连续段组成长度为 m 的序列的方 阅读全文

posted @ 2018-12-03 10:12 Narh 阅读(126) 评论(0) 推荐(0)

2018.12.1 模拟赛——[FFT] [矩阵树定理+容斥]

该文被密码保护。 阅读全文

posted @ 2018-12-03 07:37 Narh 阅读(2) 评论(0) 推荐(0)

导航