上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页

2015年11月11日

ACM学习历程—POJ 3764 The xor-longest Path(xor && 字典树 && 贪心)

摘要: 题目链接:http://poj.org/problem?id=3764题目大意是在树上求一条路径,使得xor和最大。由于是在树上,所以两个结点之间应有唯一路径。而xor(u,v)=xor(0,u)^xor(0,v)。所以如果预处理出0结点到所有结点的xor路径和,问题就转换成了求n个数中取出两个数,... 阅读全文

posted @ 2015-11-11 20:22 AndyQsmart 阅读(202) 评论(0) 推荐(0) 编辑

ACM学习历程—SGU 275 To xor or not to xor(xor高斯消元)

摘要: 题目链接:http://acm.sgu.ru/problem.php?contest=0&problem=275这是一道xor高斯消元。题目大意是给了n个数,然后任取几个数,让他们xor和最大。首先根据题目意思可以列出下列方程组://a11x1+a21x2……=d[1]//a12x1+a22x2……... 阅读全文

posted @ 2015-11-11 19:58 AndyQsmart 阅读(215) 评论(0) 推荐(0) 编辑

2015年11月10日

ACM学习历程—CSU 1216 异或最大值(xor && 贪心 && 字典树)

摘要: 题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1216题目大意是给了n个数,然后取出两个数,使得xor值最大。首先暴力枚举是C(n,2),显然不行。考虑每一个数,显然,从最高位开始,如果它能和某一个数xor,让最高位为1,效果肯定是最佳的... 阅读全文

posted @ 2015-11-10 17:40 AndyQsmart 阅读(2298) 评论(0) 推荐(0) 编辑

2015年11月7日

ACM学习历程—HDU 5512 Pagodas(数学)

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5512学习菊苣的博客,只粘链接,不粘题目描述了。题目大意就是给了初始的集合{a,b},然后取集合里的两个元素进行加或者减的操作,生成新的元素。问最后最多能生成多少个元素。问答案的奇偶性。首先一开始有a,b... 阅读全文

posted @ 2015-11-07 20:40 AndyQsmart 阅读(658) 评论(0) 推荐(0) 编辑

ACM学习历程—HDU5521 Meeting(图论)

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5521学习菊苣的博客,只粘链接,不粘题目描述了。题目大意就是一个人从1开始走,一个人从n开始走。让最后相遇的时间最短。题目就是个最短路,不过唯一不同的是,题目图的描述方式比较特别。从规模上来看,想把这张图... 阅读全文

posted @ 2015-11-07 20:31 AndyQsmart 阅读(212) 评论(0) 推荐(0) 编辑

2015年11月1日

ACM学习历程—HDU1030 Delta-wave(数学)

摘要: DescriptionAtrianglefieldisnumberedwithsuccessiveintegersinthewayshownonthepicturebelow.ThetravellerneedstogofromthecellwithnumberMtothecellwithnumber... 阅读全文

posted @ 2015-11-01 20:49 AndyQsmart 阅读(222) 评论(0) 推荐(0) 编辑

ACM学习历程—HDU1041 Computer Transformation(递推 && 大数)

摘要: DescriptionAsequenceconsistingofonedigit,thenumber1isinitiallywrittenintoacomputer.Ateachsuccessivetimestep,thecomputersimultaneouslytranformseachdigi... 阅读全文

posted @ 2015-11-01 20:35 AndyQsmart 阅读(446) 评论(0) 推荐(0) 编辑

ACM学习历程—HDU1023 Train Problem II(递推 && 大数)

摘要: DescriptionAsweallknowtheTrainProblemI,thebossoftheIgnatiusTrainStationwanttoknowifallthetrainscomeinstrict-increasingorder,howmanyordersthatallthetra... 阅读全文

posted @ 2015-11-01 20:02 AndyQsmart 阅读(187) 评论(0) 推荐(0) 编辑

2015年10月25日

ACM学习历程—BZOJ2956 模积和(数论)

摘要: Description 求∑∑((n mod i)*(m mod j))其中1#include #include #include #include #include #include #include #include #include #define LL long long#define MO... 阅读全文

posted @ 2015-10-25 16:19 AndyQsmart 阅读(194) 评论(0) 推荐(0) 编辑

2015年10月24日

ACM学习历程—HDU 5073 Galaxy(数学)

摘要: DescriptionGood news for us: to release the financial pressure, the government started selling galaxies and we can buy them from now on! The first one... 阅读全文

posted @ 2015-10-24 21:21 AndyQsmart 阅读(164) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页

导航