![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
acm_数学
文章平均质量分 74
ascii991
这个作者很懒,什么都没留下…
展开
-
poj3150 矩阵
(我想写的和这位博主一样,就转载了,表示这是一道好题,对矩阵乘法的优化有所启示)【题意】一个n个位置的环,每经过一次置换,每个位置的值会变成上一次周围d范围之内的和,求mod m后置换过k次后每个位置的值很容易可以看出是矩阵乘法n如果构建n*n的矩阵,矩阵乘法复杂度为n^3,那么总体复杂度为n^3log k 是不能接受的但是可以发原创 2012-04-11 09:26:11 · 373 阅读 · 0 评论 -
poj 1830 异或方程组
【题意】有N个相同的开关,每个开关都与某些开关有着联系,每当你打开或者关闭某个开关的时候,其他的与此开关相关联的开关也会相应地发生变化,即这些相联系的开关的状态如果原来为开就变为关,如果为关就变为开。你的目标是经过若干次开关操作后使得最后N个开关达到一个特定的状态。对于任意一个开关,最多只能进行一次开关操作。你的任务是,计算有多少种可以达到指定状态的方法。(不计开关操作的顺序)【题解】原创 2012-06-06 10:25:52 · 1300 阅读 · 0 评论 -
topcoder SRM 500 div2 level3
Problem Statement NOTE: This problem statement contains superscripts that may not display properly if viewed outside of the applet.You are given two geometric progressions S1 = (b1*q1i,原创 2012-05-19 10:41:14 · 483 阅读 · 0 评论 -
topcoder SRM500 div1 Level3
Problem Statement NOTE: This problem statement contains superscripts that may not display properly if viewed outside of the applet.A positive integer is called nice if the sum of its di原创 2012-05-19 10:36:40 · 967 阅读 · 0 评论 -
【2012百度之星 / 资格赛】I:地图的省钱计划
时间限制: 1000ms 内存限制: 65536kB描述百度地图有自己的一套坐标系(你可以把它看作一个笛卡尔坐标系),在这套坐标系里,一个标准单位为1km。而在这坐标系上针对地理信息进行标注的数据,大多数时候是通过购买的方式完成的。为了节约数据更新的成本,数据组里的鑫哥想出了一个好主意——自己测数据。鑫哥按照他的预想开始实验;在每组试验中,鑫哥选取了三个已经被准确标原创 2012-06-06 10:10:57 · 464 阅读 · 0 评论 -
topcoder SRM495 div1 level3
Problem Statement When cat Taro went to an internship, he found a strange elevator in the office's skyscraper. The skyscraper contains 58 floors. The elevator is composed of 2 boxes and thes原创 2012-05-28 14:05:50 · 726 阅读 · 0 评论 -
topcoder SRM495 div1 level2
Problem Statement There are N boxes numbered 0 through N-1. Every box except for one contains carrots, but Rabbit Hanako does not know which box is the empty one. Each box has the same proba原创 2012-05-28 13:54:07 · 624 阅读 · 0 评论 -
poj 1284
转自:http://www.cnblogs.com/ACShiryu/archive/2011/08/06/poj1284.html/**************************************************************************************************/题意:就是给出一个奇素数,求出他的原根的个数转载 2012-04-13 16:29:08 · 474 阅读 · 0 评论 -
poj 3156 用hash存状态的DP
NEERC2006的题,有点难度,好题。题目大意:给一个有n个点,m条边的无向图,两点之间可以存在多条边。现在每次随机增加一条边,问使得全部点都连通需要增加多少次(期望值)。求期望的题,由于期望的线性性,自然想到dp首先是状态表示,f(s1,s2,s3,...sn)表示当前合并到了有n个连通分量,每个连通分量有s1,s2,s3,...sn个点,且s1则有两种转移:一种是连边原创 2012-04-11 09:07:33 · 1169 阅读 · 0 评论