![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
acm
文章平均质量分 65
wwx233
这个作者很懒,什么都没留下…
展开
-
1.1 博弈论(sg函数)
博弈论出自于省赛的丢人,算是第一篇博客吧,来学习博弈论博弈论巴什博弈威佐夫博弈Nim博弈sg函数题目+代码HOJ1847(单堆取次幂)HOJ3980(环取连续段)POJ3537(同上一题,只不过要判断好子情况实际上最大是5个单位)poj1704(阶梯博弈)poj2425(在图上的Nim博弈)斐波那契博弈 巴什博弈只有一堆n个物品,...原创 2018-05-23 14:23:19 · 1249 阅读 · 2 评论 -
hdu6441(本原勾股数)
题目:people in USSS love math very much, and there is a famous math problem .give you two integers n,a,you are required to find 2 integers b,c such that a^n+b^n=c^n.Inputone line contains one in...原创 2018-09-04 10:18:06 · 497 阅读 · 0 评论 -
hdu6438(贪心)
题目:The Power Cube is used as a stash of Exotic Power. There are n cities numbered 1,2,…,n where allowed to trade it. The trading price of the Power Cube in the i-th city is ai dollars per cube. Nosw...原创 2018-09-04 10:30:40 · 137 阅读 · 0 评论 -
hdu6440(费马小定理构造)
题目:题目不太好复制:hdu6440题意:真的是。。。太难读了。。。。。 意思就是,要你重新定义加法和乘法,使题目要求的等式:(m+n)^p=m^p+n^p能够成立,然后用这个加法和乘法来输出一个加法表和乘法表。能够使式子成立的加法和乘法,实际上这个式子就是费马小定理: 假如p是质数,且gcd(a,p)=1,那么 a^(p-1)≡1(mod p) 这里再通过取...原创 2018-09-04 10:43:46 · 354 阅读 · 0 评论 -
hdu6447(离散化+线段树+dp)(01背包)
题目:YJJ is a salesman who has traveled through western country. YJJ is always on journey. Either is he at the destination, or on the way to destination. One day, he is going to travel from city A to...原创 2018-09-04 11:25:21 · 611 阅读 · 0 评论 -
类欧几里得算法
算是知道了扩展欧几里得这个算法了吧。。。。转载自http://www.cnblogs.com/cyz666/ f的模板LL f(LL a,LL b,LL c,LL n){ if(a==0) return((b/c)*(n+1)); if(a>=c||b>=c) return f(a%c,b%c,c,n)+(a/c)*n*(n+1)/2+(b/c)*(...转载 2018-09-05 22:17:15 · 1195 阅读 · 0 评论