上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 78 下一页
1123: [POI2008]BLOTime Limit: 10 SecMemory Limit: 162 MBSubmit: 614Solved: 235[Submit][Status]DescriptionByteotia城市有n个 towns m条双向roads. 每条 road 连接 两个不... Read More
posted @ 2014-09-16 19:28 ZYF-ZYF Views(261) Comments(0) Diggs(0) Edit
割点是无向图中去掉后能把图割开的点。dfs时用dfn(u)记录u的访问时间,用low(u)数组记录u和u的子孙能追溯到的最早的节点(dfn值最小)。由于无向图的dfs只有回边和树边,且以第一次dfs时的方向作为边的方向,故有: low=min{ dfn(u), dfn(v),若(u,v)为回边(非... Read More
posted @ 2014-09-16 19:13 ZYF-ZYF Views(149) Comments(0) Diggs(0) Edit
1102: [POI2007]山峰和山谷GrzTime Limit: 10 SecMemory Limit: 162 MBSubmit: 436Solved: 227[Submit][Status]DescriptionFGD小朋友特别喜欢爬山,在爬山的时候他就在研究山峰和山谷。为了能够让他对他的旅... Read More
posted @ 2014-09-16 19:02 ZYF-ZYF Views(302) Comments(0) Diggs(0) Edit
1297: [SCOI2009]迷路Time Limit: 10 SecMemory Limit: 162 MBSubmit: 591Solved: 401[Submit][Status]Descriptionwindy在有向图中迷路了。该有向图有 N 个节点,windy从节点 0 出发,他必须恰好... Read More
posted @ 2014-09-16 18:47 ZYF-ZYF Views(259) Comments(0) Diggs(0) Edit
1856: [Scoi2010]字符串Time Limit: 5 SecMemory Limit: 64 MBSubmit: 799Solved: 415[Submit][Status]Descriptionlxhgww最近接到了一个生成字符串的任务,任务需要他把n个1和m个0组成字符串,但是任务还... Read More
posted @ 2014-09-16 10:33 ZYF-ZYF Views(418) Comments(0) Diggs(0) Edit
在MOD的情况下, (a*b/c ) %MOD 不能直接 / c 来求,需要找到一个数 inv 使得 inv * c % MOD = 1 。 这样 (a*b / c) % MOD = (a * b * inv) % MOD;性质: 逆元是积性函数 存在 a*b = c ,那么 inv[c] = i... Read More
posted @ 2014-09-15 19:16 ZYF-ZYF Views(1154) Comments(0) Diggs(0) Edit
1628: [Usaco2007 Demo]City skylineTime Limit: 5 SecMemory Limit: 64 MBSubmit: 256Solved: 210[Submit][Status]DescriptionThe best part of the day for Fa... Read More
posted @ 2014-09-15 19:04 ZYF-ZYF Views(248) Comments(1) Diggs(0) Edit
2440: [中山市选2011]完全平方数Time Limit: 10 SecMemory Limit: 128 MBSubmit: 883Solved: 425[Submit][Status]Description小 X 自幼就很喜欢数。但奇怪的是,他十分讨厌完全平方数。他觉得这些数看起来很令人难... Read More
posted @ 2014-09-15 18:54 ZYF-ZYF Views(332) Comments(3) Diggs(0) Edit
大神们都在刷usaco,我也来水一水1606: [Usaco2008 Dec]Hay For Sale 购买干草 裸背包1607: [Usaco2008 Dec]Patting Heads 轻拍牛头 神转化,筛法1609: [Usaco2008 Feb]Eating Together麻烦的聚餐 LI... Read More
posted @ 2014-09-15 12:01 ZYF-ZYF Views(571) Comments(0) Diggs(0) Edit
1816: [Cqoi2010]扑克牌Time Limit: 10 SecMemory Limit: 64 MBSubmit: 1170Solved: 430[Submit][Status]Description你有n种牌,第i种牌的数目为ci。另外有一种特殊的牌:joker,它的数目是m。你可以用... Read More
posted @ 2014-09-15 11:00 ZYF-ZYF Views(232) Comments(0) Diggs(0) Edit
上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 78 下一页