码迷,mamicode.com
首页 >  
搜索关键字:zoj 3456    ( 3447个结果
bzoj 1093: [ZJOI2007]最大半连通子图【tarjan+拓扑排序+dp】
先tarjan缩成DAG,然后答案就变成了最长链,dp的同时计数即可 就是题面太唬人了,没反应过来 ...
分类:编程语言   时间:2018-07-31 21:37:45    阅读次数:129
Bzoj1511---OKR-Periods of Words(KMP)
(传送门) 大意:对于给定串的每个前缀i,求最长的,使这个字符串重复两边能覆盖原前缀i的前缀(就是前缀i的一个前缀),求所有的这些“前缀的前缀”的长度和 利用 p 的性质:前缀 i 的长度为 p[i] 的前缀和后缀是相等的 这说明:如果i有一个公共前后缀长度为j,那么这个前缀i就有一个周期为i-j ...
分类:其他好文   时间:2018-07-31 19:08:21    阅读次数:242
CSU-ACM2018暑假集训6—BFS
可以吃饭啦!!! A:连通块 ZOJ 1709 Oil Deposits(dfs,连通块个数) B:素数变换 打表+bfs POJ 3216 Prime Path(打表+bfs) C:水bfs HDU 2717 Catch That Cow(常规bfs) D:bfs+状态压缩 HDU 1429 胜利 ...
分类:其他好文   时间:2018-07-30 20:19:30    阅读次数:201
ZOJ 1709 Oil Deposits(dfs,连通块个数)
The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of ...
分类:其他好文   时间:2018-07-30 18:08:12    阅读次数:160
ZOJ 4029 - Now Loading!!! - [前缀和+二分]
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4029 Time Limit: 1 Second Memory Limit: 131072 KB AC代码: ...
分类:其他好文   时间:2018-07-30 16:34:33    阅读次数:182
【bzoj3512】DZY Loves Math IV 杜教筛+记忆化搜索+欧拉函数
Description 给定n,m,求$\sum_{i=1}^{n}\sum_{j=1}^{m}\varphi(ij)$模10^9+7的值。 Input 仅一行,两个整数n,m。 Output 仅一行答案。 Sample Input 100000 1000000000 Sample Output 8 ...
分类:其他好文   时间:2018-07-30 13:24:12    阅读次数:186
ZOJ - 2110 Tempter of the Bone
The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could f ...
分类:其他好文   时间:2018-07-28 13:49:09    阅读次数:147
bzoj1833数字计数
题目链接 找$[1$ ~ $a-1]$和$[1$ ~ $b]$中各数码出现的次数之后相减就是答案 上代码: ...
分类:其他好文   时间:2018-07-27 01:15:54    阅读次数:114
bzoj2306: [Ctsc2011]幸福路径(倍增+Floyed 逼近答案)
www.cnblogs.com/shaokele/ bzoj2306: [Ctsc2011]幸福路径 Time Limit: 10 Sec Memory Limit: 256 MB Description 有向图 G有n个顶点 1, 2, …, n,点i 的权值为 w(i)。现在有一只蚂蚁,从给定的 ...
分类:其他好文   时间:2018-07-26 21:22:15    阅读次数:176
bzoj 3029 守卫者的挑战——概率期望dp+状态数思考
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=3029 先随便写了个dfs,记录“前 i 次、成功 j 次、容量-残片=k”的概率。因为是否可行只和“成功次数”还有“容量-残片个数”有关,和容量、残片具体数量无关。准备记忆化,但发现状态存不下 ...
分类:其他好文   时间:2018-07-24 22:21:00    阅读次数:165
3447条   上一页 1 ... 32 33 34 35 36 ... 345 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!