摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=3613 【题解】 其实挺显然。。就是最大逆序对差/2 # include <stdio.h> # include <string.h> # include <iostream> # includ 阅读全文
posted @ 2017-05-28 22:42 Galaxies 阅读(211) 评论(0) 推荐(0)
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=3622 【题解】 XJOI noip模拟题的一题吧 这题统计方法用容斥 f[i,j]表示前i个人,j个一定赢,其他不管的方案数。 先考虑一定赢的转移,最后乘不论输赢的排列即可。 那么ans[n] 阅读全文
posted @ 2017-05-28 21:26 Galaxies 阅读(450) 评论(0) 推荐(0)
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4128 【题解】 矩阵版本的BSGS。 至于如何不需要求逆,详见:http://www.cnblogs.com/galaxies/p/bzoj2480.html # include <map> 阅读全文
posted @ 2017-05-28 14:49 Galaxies 阅读(250) 评论(0) 推荐(0)
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=2480 【题解】 大步小步算法(BSGS) 一直觉得BSGS不大优美因为算法里混杂着一个求逆元,这对推exgcd要好久的人不大兹磁啊。。 参考:http://blog.miskcoo.com/2 阅读全文
posted @ 2017-05-28 14:35 Galaxies 阅读(591) 评论(0) 推荐(0)
摘要: 传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4886 【题解】 跟bzoj4883:http://www.cnblogs.com/galaxies/p/bzoj4833.html很相似啊 我们对于a,b离散后建点,那么一个卡片就相当于a到b 阅读全文
posted @ 2017-05-28 09:04 Galaxies 阅读(475) 评论(0) 推荐(0)