- 博客(15)
- 收藏
- 关注
原创 poj1436之线段树成段更新
Language:DefaultHorizontally Visible SegmentsTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 2925 Accepted: 1105DescriptionThere is a number of di
2013-05-29 19:50:14 3241 6
原创 hdu4521之线段树单点更新
http://acm.hdu.edu.cn/showproblem.php?pid=4521#include#include#include#include#include#include#include#include#include#define INF 99999999using namespace std;const int MAX=100000+10;
2013-05-28 13:46:53 997
原创 poj2481之线段树单点更新
CowsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 9813 Accepted: 3214DescriptionFarmer John's cows have discovered that the clover growing along the ridge of the hill (which we c
2013-05-28 09:04:32 1299
原创 hdu2203之KMP入门
亲和串Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5578 Accepted Submission(s): 2518Problem Description人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界
2013-05-23 10:32:57 2261
原创 hdu1711之入门KMP
Problem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which make a[K] = b
2013-05-23 09:01:36 831
原创 hdu1686之KMP
Problem DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book:Tout avait Pa
2013-05-22 23:01:20 1805
原创 二分查找
#include<iostream>#include<cstdio>#include<cstdlib>#include<cstring>#include<string>#include<algorithm>#include<queue>#include<map>#include<...
2013-05-21 19:38:13 946
原创 hdu4288之线段树单点更新
Problem Description In mathematics and computer science, an algorithm describes a set of procedures or instructions that define a procedure. The term has become increasing popular since the adven
2013-05-21 16:56:08 914
原创 hdu2886之线段树单点更新
DescriptionN children are sitting in a circle to play a game.The children are numbered from 1 to N in clockwise order. Each of them has a card with a non-zero integer on it in his/her hand. The
2013-05-19 20:36:39 795
原创 poj2828之线段树单点更新
#include#include#include#include#include#include#include#include#include#define INF 99999999using namespace std;const int MAX=200000+10;int sum[MAX<<2];//表示区间内含有空位的个数int s[MAX][2];//记录刚开
2013-05-15 21:37:19 757
原创 hdu1828线段树+扫描线
http://acm.hdu.edu.cn/showproblem.php?pid=1828(矩形求周长类似矩形合并求面积,只是多了需要统计竖边的个数,对于每次求到的下底边长还要增加目前底边与下一条底边之间的竖边总长)1,n个矩形有2*n条线段,按从小到大排列,如上图得到的线段顺序2:开始扫描第一条线段,得到总底边长sum为a这部分,得到竖边个数segnum=2,(每增加一
2013-05-15 18:08:03 2803 2
原创 hdu1542线段树+离散化+扫描线详解
用struct tree{double l,r,h;int d;tree(){}tree(double x1,double x2,double y,int c):l(x1),r(x2),h(y),d(c){}bool operator return h}}s[MAX];s表示一条线段,分别有线段的左右端点l,r,线段的高h,线段是矩形的上底边还是还是下底边d
2013-05-14 21:15:08 6643 4
原创 13南京邀请赛c题之数位DP
//http://icpc.njust.edu.cn/Local/1739#include#include#include#include#include#include#include#include#include#define INF 1000000using namespace std;const int MAX=70;long long sum[MAX],nu
2013-05-13 21:22:15 1125
原创 poj3667线段树区间合并
/*本题是线段树区间合并所谓区间合并我理解为父节点的某些值是由左孩子和右孩子的某些值合并而得到的对这题,父节点最大连续可用区间可能是由左孩子最大可用右区间和右孩子的最大可用左区间合并得到的 */#include#include#include#include#include#include#include#include#include#define INF 99999
2013-05-08 17:04:21 1235
原创 poj3225
Online JudgeProblem SetAuthorsOnline ContestsUserWeb BoardHome PageF.A.QsStatistical ChartsProblemsSubmit ProblemOnline StatusProb.ID:RegisterUpdate your infoAu
2013-05-04 21:52:33 2546 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人