- 博客(19)
- 收藏
- 关注
原创 poj 3468 A Simple Problem with Integers(线段树成段更新lazy)
DescriptionYou have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is
2016-03-30 14:22:44 244
原创 hdu 1698 Just a Hook(线段树成段更新lazy)
Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the sa
2016-03-30 14:20:54 251
原创 hdu 1754 I Hate It(线段树单点更新求区间最大值)
Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input本题目包含多组测试,请处理到文件结束。在每个测试的第一行,有两个正整数 N
2016-03-30 14:17:40 415
原创 hdu 1166 敌兵布阵(线段树单点更新求和)
Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视
2016-03-30 14:14:50 488
原创 hdu 1501 Zipper(dfs或dp)
Problem DescriptionGiven three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. The first two strings can be mixed arbitra
2016-03-28 17:05:59 405
原创 hdu 1016 Prime Ring Problem(dfs)
Problem DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime
2016-03-28 16:20:17 216
原创 bzoj 1043 下落的圆盘(计算几何-圆的周长并)
Description有n个圆盘从天而降,后面落下的可以盖住前面的。求最后形成的封闭区域的周长。看下面这副图, 所有的红色线条的总长度即为所求. Inputn ri xi y1 ... rn xn ynOutput最后的周长,保留三位小数Sample Input21 0 01 1 0Sample Output10.472
2016-03-28 08:49:13 920
原创 poj 3169 Layout(差分约束)
DescriptionLike everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N <= 1,000) cows numbered 1..N standing along a straight line waiting for feed. The c
2016-03-27 21:57:12 593
原创 hdu 5646 DZY Loves Partition(整数拆分)
Problem DescriptionDZY loves partitioning numbers. He wants to know whether it is possible to partition n into the sum of exactly k distinct positive integers.After some thinking he finds this
2016-03-22 18:58:20 321
原创 poj 1062 昂贵的聘礼(最短路)
Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。"探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币
2016-03-17 18:56:51 263
原创 codeforces 607 B Zuma(区间dp)
Genos recently installed the game Zuma on his phone. In Zuma there exists a line of n gemstones, the i-th of which has color ci. The goal of the game is to destroy all the gemstones in the line as
2016-03-10 22:06:46 523
原创 codeforces 607 A Chain Reaction (二分)
There are n beacons located at distinct positions on a number line. The i-th beacon has position ai and power level bi. When the i-th beacon is activated, it destroys all beacons to its left (di
2016-03-10 21:43:04 371
原创 hdu 5120 Intersection(求相交环面积)
Problem DescriptionMatt is a big fan of logo design. Recently he falls in love with logo made up by rings. The following figures are some famous examples you may know.A ring is a 2-D figur
2016-03-06 13:57:26 372
原创 hdu 5122 K.Bro Sorting(单调栈)
Problem DescriptionMatt’s friend K.Bro is an ACMer.Yesterday, K.Bro learnt an algorithm: Bubble sort. Bubble sort will compare each pair of adjacent items and swap them if they are in the wron
2016-03-06 13:54:12 290
原创 hdu 5115 Dire Wolf(区间dp)
Problem DescriptionDire wolves, also known as Dark wolves, are extraordinarily large and powerful wolves. Many, if not all, Dire Wolves appear to originate from Draenor.Dire wolves look like norma
2016-03-06 13:50:01 308
原创 hdu 5112 A Curious Matt(排序)
Problem DescriptionThere is a curious man called Matt.One day, Matt's best friend Ted is wandering on the non-negative half of the number line. Matt finds it interesting to know the maximal sp
2016-03-06 13:47:04 313
原创 poj 2431Expedition(优先队列+贪心)
DescriptionA group of cows grabbed a truck and ventured on an expedition deep into the jungle. Being rather poor drivers, the cows unfortunately managed to run over a rock and puncture the truck's
2016-03-02 16:07:29 231
原创 hdu 1423 Greatest Common Increasing Subsequence(最长公共上升子序列dp)
Problem DescriptionThis is a problem from ZOJ 2432.To make it easyer,you just need output the length of the subsequence. InputEach sequence is described with M - its length (1
2016-03-01 23:53:27 273
原创 poj 2127 Greatest Common Increasing Subsequence(最长公共上升子序列dp)
DescriptionYou are given two sequences of integer numbers. Write a program to determine their common increasing subsequence of maximal possible length. Sequence S1 , S2 , . . . , SN of length N
2016-03-01 23:51:36 337
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人