- 博客(15)
- 资源 (4)
- 收藏
- 关注
原创 最大子序列和(O(n))
下面介绍一个线性的算法,这个算法是许多聪明算法的典型:运行时间是明显的,但是正确性则很不明显(不容易理解)。//线性的算法O(N) long maxSubSum4(const vector& a) { long maxSum = 0, thisSum = 0; for (int j = 0; j < a.size(); j++) {
2015-11-29 10:25:44 785
原创 POJ 3308 Paratroopers(最小割EK(邻接表&矩阵))
DescriptionIt is year 2500 A.D. and there is a terrible war between the forces of the Earth and the Mars. Recently, the commanders of the Earth are informed by their spies that the invaders of M
2015-11-28 11:21:39 1100
原创 POJ3352 Road Construction (边双连通分量)
Road ConstructionTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionIt's almost summer time, and that means that it's almost summer cons
2015-11-24 13:29:44 1167
原创 强连通分量(模板)
对图深度优先搜索,定义DFS(u)为u在搜索树(以下简称为树)中被遍历到的次序号。定义Low(u)为u或u的子树中能通过非父子边追溯到的最早的节点,即DFS序号最小的节点。根据定义,则有:Low(u)=Min{DFS(u)DFS(v) (u,v)为后向边(返祖边) 等价于 DFS(v)#include#include#include#include#include#defin
2015-11-24 12:46:16 941
原创 图基本概念
一、割点、割边、双连通分支概念挂接点(Articulation point)就是割点(Cut Vertex)桥(Bridge)就是割边(Cut Edge)割点:v为割点,则去掉v后,图的连通分支增加。割边:v为割边,则去掉v后,图的连通分支增加。割点形式化的定义:a是割点当且仅当存在两个点u,v使得u到v的每条路径都会经过a。(去掉a后,u到v没有路径)边双连通分支
2015-11-24 11:20:59 1220
原创 Air Raid(最小路径覆盖)
DescriptionConsider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starting from an intersection and walking through town's
2015-11-17 11:50:02 850
原创 Machine Schedule(最小覆盖)
其实也是个最小覆盖问题DescriptionAs we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history. Scheduling problems differ widely in the
2015-11-17 10:19:33 939
原创 Asteroids (最小覆盖)
题目很简单,但是需要推到出二分图最大匹配 = 最小覆盖最小覆盖:证明过程http://blog.sina.com.cn/s/blog_51cea4040100h152.htmlDescriptionBessie wants to navigate her spaceship through a dangerous asteroid field in the shap
2015-11-16 18:42:05 802
转载 二分图基础
二分图大讲堂——彻底搞定最大匹配数(最小覆盖数)、最大独立数、最小路径覆盖、带权最优匹配文本内容框架:§1图论点、边集和二分图的相关概念和性质§2二分图最大匹配求解匈牙利算法、Hopcroft-Karp算法§3二分图最小覆盖集和最大独立集的构造§4二分图最小路径覆盖求解§5二分图带权最优匹配求解Kuhn-Munkers算法§6小结每章节都详细地讲解了问题介绍
2015-11-16 18:38:42 2144
原创 BC-Clarke and five-pointed star(水)
Clarke and five-pointed starAccepts: 237Submissions: 591Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionClarke is a patient
2015-11-14 21:24:53 890
原创 hdu 1255 覆盖的面积(线段树 面积交+离散化)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1255Description给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积. Input输入数据的第一行是一个正整数T(1<=T<=100),代表测试数据的数量.每个测试数据的第一行是一个正整数N(1<=N<=1000)
2015-11-13 16:06:18 1311
原创 POJ 1542 Atlantis(线段树 面积并+离散化)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1542Problem DescriptionThere are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even incl
2015-11-13 11:34:02 1567
原创 Count the Colors(线段树染色)
Count the ColorsTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmitStatusDescriptionPainting some colored segments on a line, some previously painted segment
2015-11-10 10:41:29 1524 2
原创 uva 11488 Hyper Prefix Sets(狂水)
Prefix goodness of a set string is length of longest common prefix*number of strings in the set. Forexample the prefix goodness of the set {000,001,0011} is 6.You are given a set of binary strings.
2015-11-04 21:49:38 962
原创 Hardwood Species(水)
Time Limit:10000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionHardwoods are the botanical group of trees that have broad leaves, produce a fruit or nu
2015-11-04 19:08:50 955
Redis-x64-3.2.100.msi
2017-10-14
坦克大战游戏,支持声音,配置等
2015-03-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人