自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

AI蜗牛之家

北航烟酒僧~ 腾讯自然语言处理算法工程师~

  • 博客(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 774

原创 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 1078

原创 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 1152

原创 强连通分量(模板)

对图深度优先搜索,定义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 922

原创 图基本概念

一、割点、割边、双连通分支概念挂接点(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 1146

原创 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 831

原创 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 928

原创 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 789

转载 二分图基础

二分图大讲堂——彻底搞定最大匹配数(最小覆盖数)、最大独立数、最小路径覆盖、带权最优匹配文本内容框架:§1图论点、边集和二分图的相关概念和性质§2二分图最大匹配求解匈牙利算法、Hopcroft-Karp算法§3二分图最小覆盖集和最大独立集的构造§4二分图最小路径覆盖求解§5二分图带权最优匹配求解Kuhn-Munkers算法§6小结每章节都详细地讲解了问题介绍

2015-11-16 18:38:42 2008

原创 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 885

原创 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 1305

原创 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 1553

原创 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 1511 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 944

原创 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 936

Redis-x64-3.2.100.msi

Redis-x64-3.2.100.msi,因为官网的速度实在是太低了,所以下载下来共享,不过现在最低需要2积分,没法免费了,是在抱歉,若需要留言也可

2017-10-14

STL整理总结

C++的基本库函数STL

2017-04-24

坦克大战游戏,支持声音,配置等

自己写的坦克大战,包括声音等特效,能够对游戏进行坦克数目、地图等进行设置,代码大约1200-1300行,可在此基础上进行深度开发,是对初学者并有部分Java基础的一个很好的锻炼机会,代码由本人自主开发,较为实用。当然也可以作为大作业使用

2015-03-14

C++ API

包含C++以及C语言的库函数,在学习和使用时便于查找和理解库函数

2015-01-24

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除