自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

kongming_acm的专栏

如果不能正常显示代码 ,请右键->查看源文件 来查看源代码 里面有代码部分 另外由于网站原因 \n在博客里都显示是/n 请自己更改

  • 博客(747)
  • 资源 (7)
  • 收藏
  • 关注

原创 个人github

欢迎大家来参观:https://github.com/kongzhidea?tab=repositories欢迎大家来参观:https://github.com/kongzhidea?tab=repositories

2016-09-07 10:43:32 720

原创 程序员编程艺术 pdf下载

http://pan.baidu.com/s/1jGFSuiy

2014-03-25 11:33:27 3516 1

原创 fzu count 求区间之间x的个数 离线+树状数组

Problem A CountAccept: 60    Submit: 327Time Limit: 1000 mSec    Memory Limit : 65536 KB Problem DescriptionGiven an array of positive integers and m queries.Each query contains i, j, x,

2012-03-25 15:00:22 1066

原创 nankai 2082: 靶形数独 数独(9*9)求所有解 DLX+精确覆盖

2082: 靶形数独 Time Limit: 2000 ms    Memory Limit:131072 kB   Judge type: Multi-cases (Detailed Mode - 20 cases)Total Submit : 181 (41 users)   Accepted Submit :25 (15 users)   Page View : 17

2011-11-11 19:14:17 1346

原创 hdu 4107 Gangster 线段树 成段更新 最后求每一位的值

Problem DescriptionThere are two groups of gangsters fighting with each other. The first group stands in a line, but the other group has a magic gun that can shoot a range [a, b], and everyone in th

2011-10-31 22:01:40 783

原创 zoj 3551 Bloodsucker 概率DP

In 0th day, there are n-1 people and 1 bloodsucker. Every day, two and only two of them meet. Nothing will happen if they are of the same species, that is, a people meets a people or a bloodsucker mee

2011-10-31 13:44:48 912

原创 zoj 3554 A Miser Boss BFS+DP 减少废状态

There are three different lathes in a factory namely A,B,C. They are all able to work on all kinds of workpieces. And there aren workpieces to be processed, denoted by 1,2,..,n. Due to different i

2011-10-31 13:40:04 950 1

原创 hdu 4109 Instrction Arrangement 求关键路径的长度

Problem DescriptionAli has taken the Computer Organization and Architecture course this term. He learned that there may be dependence between instructions, like WAR (write after read), WAW, RAW.If

2011-10-31 12:34:58 1267

原创 hdu 4104 求不能有已知n个数组成的最小的数

Problem DescriptionAll the shops use discount to attract customers, but some shops doesn’t give direct discount on their goods, instead, they give discount only when you bought more than a cer

2011-10-31 10:10:45 1016

原创 hdu 4101 Ali and Baba 求包含-1的外围

Problem DescriptionThere is a rectangle area (with N rows and M columns) in front of Ali and Baba, each grid might be one of the following:1. Empty area, represented by an integer 0.2. A Stone,

2011-10-31 10:05:40 1179

原创 hdu 4105 Electric wave DP

Problem DescriptionAli was doing a physic experiment which requires him to observe an electric wave. He needs the height of each peak value and valley value for further study (a peak value means t

2011-10-30 16:52:13 995

原创 zoj 3557 How Many Sets II 求Comb(n,m)%p p很大素数 m<=1e4

Given a set S = {1, 2, ..., n}, number m and p, your job is to count how many set T satisfies the following condition:T is a subset of S|T| = mT does not contain continuous numbers, that is to say

2011-10-29 15:49:18 1278

原创 2011 北京赛区 A bupt 238

//#include#include#include#include#include#includeusing namespace std;const int maxn=1100;struct Point{    double x,y;    int peo;};int n;Point pi[maxn];doubl

2011-10-27 21:11:57 573

原创 2011 北京赛区 I bupt 246 Activation

After 4 years' waiting, the game "Chinese Paladin 5" finally comes out. Tomato is a crazyfan,andluckilyhegotthefirstrelease.Nowheisathome,readytobeginhisjourney. Butbeforestartingthegame,hemustfir

2011-10-27 21:09:31 659

原创 113C - Double Happiness 求区间%4=1的素数--可以表示成平方和的形式--的个数(素数筛选法)

On the math lesson a teacher asked each pupil to come up with his own lucky numbers. As a fan of number theory Peter chose prime numbers. Bob was more original. He said that number t is his lucky nu

2011-10-22 19:48:44 841

原创 joj 2672 Hanoi Tower Once More 有向无环图的最小路径覆盖=N-最大匹配

2010 Yuanguang Cup ACM-ICPC Collegiate Programming Contest                  Problem I: Hanoi Tower Once More                                 Input File: i.in  Output: stdout      Description

2011-10-20 22:59:51 609

原创 Interesting Game SG函数 有一堆石子,每次将一堆石子分解成连续几个数的和,不能分解的人输。问先手胜,败。

Two best friends Serozha and Gena play a game.Initially there is one pile consisting of n stones on the table. During one move one pile should be taken and divided into an arbitrary number of pile

2011-10-20 19:56:33 809

原创 joj 2262: Brackets 最多有多少括号匹配

We give the following inductive definition of a " regular brackets " sequence:the empty sequence is a regular brackets sequence, if s is a regular brackets sequence, then (s) and [s] are regular b

2011-10-19 23:40:38 726

原创 hdu 3455 Leap Frog

Problem DescriptionJack and Jill play a game called "Leap Frog" in which they alternate turns jumping over each other. Both Jack and Jill can jump a maximum horizontal distance of 10 units in any si

2011-10-19 22:29:29 602

原创 poj 2723 Get Luffy Out 2-SAT+二分答案

DescriptionRatish is a young man who always dreams of being a hero. One day his friend Luffy was caught by Pirate Arlong. Ratish set off at once to Arlong's island. When he got there, he found the s

2011-10-19 21:29:31 660

原创 poj 2296 Map Labeler 2-SAT+二分答案

DescriptionMap generation is a difficult task in cartography. A vital part of such task is automatic labeling of the cities in a map; where for each city there is text label to be attached to its lo

2011-10-19 20:39:37 898

原创 hdu 3829 Cat VS Dog 最大点独立集

Problem DescriptionThe zoo have N cats and M dogs, today there are P children visiting the zoo, each child has a like-animal and a dislike-animal, if the child's like-animal is a cat, then his/hers

2011-10-19 20:02:09 672

原创 joj 2623: BeautifulSky 将空间n个点分成两部分,求sigma(dis[ai,aj])的最大值

The sky is beautiful, there are many stars in it. Xiaoming is curious, he came out with a strange idea. He want to divide the stars into two

2011-10-19 11:45:44 800

原创 joj 2620: Count Square 状态压缩DP N*M的0,1方格,每一个2*2的小方格有一个价值,求整个方格的最大价值

Xiaoming is a 5-year old boy. He has many toys. Among them there is a magic box. On the top of the box there are n * m grids. One can color

2011-10-18 20:54:18 915

原创 Minimum Sum 平面最近点对

You are given a set of n vectors on a plane. For each vector you are allowed to multiply any of its coordinates by -1. Thus, each vector v

2011-10-18 19:13:09 603

原创 Brevity is Soul of Wit 二分图匹配 将n个字符串缩短(slen<=4且是subsequ,缩短后字符串不能相同)

As we communicate, we learn much new information. However, the process of communication takes too much time. It becomes clear if we look at

2011-10-18 18:40:26 723

原创 Spiders 求树的直径(距离最远的两个点)

One day mum asked Petya to sort his toys and get rid of some of them. Petya found a whole box of toy spiders. They were quite dear to him an

2011-10-18 17:21:58 982

原创 poj 3678 Katu Puzzle 2-SAT 有n个变量,每个可以取0或者1,再给出m组关系,每组关系都是两个变量进行运算可以得到的结果,运算有AND OR XOR三种,问能否满足这些关系,

DescriptionKatu Puzzle is presented as a directed graph G(V, E) with each edgee(a, b) labeled by a boolean operator op (one of AND,

2011-10-17 22:44:10 953

原创 poj 3207 Ikki's Story 2-SAT

Descriptionliympanda, one of Ikki’s friend, likes playing games with Ikki. Today after minesweeping with Ikki and winning so many time

2011-10-17 21:32:47 407

原创 hdu 3452 Bonsai 求最少去掉多少权值的边使得所有的叶子节点和根节点断开连接

Problem DescriptionAfter being assaulted in the parking lot by Mr. Miyagi following the "All Valley Karate Tournament", John Kreese has

2011-10-17 21:13:47 595

原创 hdu 3622 Bomb Game 2-SAT+二分答案 有N对点,求最大的半径R,使从每对点中选择一个点,且这N个点以自己为圆心,半径为R的圆两两不相交.(最大半径在所有半径相同情况下)

Problem DescriptionRobbie is playing an interesting computer game. The game field is an unbounded 2-dimensional region. There are N roun

2011-10-17 20:19:52 974

原创 hdu 3627 Giant For 离散化+线段树 在一个二维平面内任意的添加一个点和删除一个点,然后来寻找一个横纵坐标都比已经添加的点大的点,首先选择横坐标最小的,其次是纵坐标最小的

Problem DescriptionIt is known to us all that YY and LMY are mathematics lovers. They like to find and solve interesting mathematic proble

2011-10-16 13:59:32 905

原创 hdu 3551 Hard Problem 一般图最大匹配+给出一个无向图,存在重边,没有自环。问能否删除一些边,使得每个顶点的度数为指定度数

Problem DescriptionThis is the most tough task in this contest, do not try it until you solve all the other tasks or you feel boring on ot

2011-10-13 16:56:22 2140

原创 hdu 3446 daizhenyang's chess 一般图最大匹配+博弈 在一个棋盘上,两个人轮流走,每个人可以移动king走到没被走过的幸运的格子上。问,先手是否能赢。

Problem DescriptionAs we know,daizhenyang likes playing chess,but he always lose,so one day,he invented a brand new chess game with the ne

2011-10-13 12:19:19 1652

原创 zoj 3316 Game 一般图最大匹配+博弈 有N个棋子在棋盘上,2个人轮流拿走一个棋子,第一步可以拿任意一个,而之后每一步必须拿上一步拿走的棋子曼哈顿长度L以内的棋子,问,后手是否能赢

Fire and Lam are addicted to the game of Go recently. Go is one of the oldest board games. It is rich in strategy despite its simple rules.

2011-10-12 19:56:17 1549

原创 hdu 1466 Girls and Boys 最大点独立集=N-最大匹配

DescriptionIn the second year of the university somebody started a study on the romantic relations between the students. The relation "rom

2011-10-11 22:28:33 540

原创 ural 1099. Work Scheduling 一般图最大匹配

There is certain amount of night guards that are available to protect the local junkyard from possible junk robberies. These guards need to

2011-10-11 21:52:38 623

原创 Petya and Spiders DLX+重复覆盖 最小支配集(最少多少个点能覆盖所有的点)

Little Petya loves training spiders. Petya has a board n × m in size. Each cell of the board initially has a spider sitting on it. After one

2011-10-11 21:47:06 1132 1

原创 hdu 3450 Counting Sequences 树状数组+DP 求相邻两个数字的绝对值小于等于H并且序列长度的序列个数

Problem DescriptionFor a set of sequences of integers{a1,a2,a3,...an}, we define a sequence{ai1,ai2,ai3...aik}in which 1<=i1<i2<i3<...<ik<

2011-10-10 22:02:50 895

原创 hdu 3449 Consumer 条件背包 有钱w,给出n种选择,每种选择有m[i]个物品,但必须先买盒子,价格p[i],求买的物品的最大价值

Problem DescriptionFJ is going to do some shopping, and before that, he needs some boxes to carry the different kinds of stuff he is going

2011-10-10 12:49:54 1241

自己的ACM题库和模板

自己的ACM题库和模板

2012-02-04

java聊天室

java聊天室

2011-12-29

dancing links

DLX dancinglinks 跳舞链

2011-12-29

acm动态规划总结

Pku acm 1163 the Triangle 动态规划题目总结(一) 题目:http://acm.pku.edu.cn/JudgeOnline/problem?id=1163 对于一个有数字组成的二叉树,求由叶子到根的一条路径,使数字和最大,如: 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 这个是经典的动态规划,也是最最基础、最最简单的动态规划,典型的多段图。思路就是建立一个数组,由下向上动态规划,保存页子节点到当前节点的最大值,Java核心代码如下: for(int i=num-2;i>

2011-12-29

拓展 KMP edtend MP

给定一个串S,定义n=|S|,extend[i]表示S与S[i…n]的最长公共前缀长度。我们可以在线性时间内得到所有的extend[i]。 鉴于已有论文对这个算法进行细致、感性的描述,在此就不花费篇幅赘述这一算法。如果您想详细了解这一算法,可以参见《寻找最大重复子串》(作者林希德)和《求最长回文子串与最长重复子串》(作者何林)。

2011-04-14

joj 部分题目答案 自己做的 仅供参考

joj 部分题目答案 自己做的 仅供参考 joj 部分题目答案 自己做的 仅供参考 joj 部分题目答案 自己做的 仅供参考 joj 部分题目答案 自己做的 仅供参考 joj 部分题目答案 自己做的 仅供参考

2010-07-10

递推求解 集合了递推的一些题目

在一个平面上有一个圆和n条直线,这些直线中每一条在圆内同其他直线相交,假设没有3条直线相交于一点,试问这些直线将圆分成多少区域。

2010-07-10

空空如也

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

TA关注的人

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