自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

新月

红色春天的开始

  • 博客(49)
  • 收藏
  • 关注

原创 lower_bound()和upper_bound

转载自飘过的小牛,原网址:http://blog.csdn.net/niushuai666/article/details/6734403函数lower_bound()在first和last中的前闭后开区间进行二分查找,返回大于或等于val的第一个元素位置。如果所有元素都小于val,则返回last的位置举例如下:一个数组number序列为:4,10,11,30,69,7

2015-05-31 19:55:47 1957

原创 hdu4339 Query

Problem DescriptionYou are given two strings s1[0..l1], s2[0..l2] and Q - number of queries.Your task is to answer next queries:  1) 1 a i c - you should set i-th character in a-th string to c

2015-05-31 11:10:56 699

原创 hdu4217 Data Structure?

Problem DescriptionData structure is one of the basic skills for Computer Science students, which is a particular way of storing and organizing data in a computer so that it can be used efficientl

2015-05-31 09:47:47 1014

原创 hdu4325 Flowers

Problem DescriptionAs is known to all, the blooming time and duration varies between different kinds of flowers. Now there is a garden planted full of flowers. The gardener wants to know how many

2015-05-30 17:35:21 727

原创 hdu3397 Sequence operation

Problem Descriptionlxhgww got a sequence contains n characters which are all '0's or '1's.We have five operations here:Change operations:0 a b change all characters into '0's in [a , b]1 a

2015-05-30 14:56:33 674

原创 hdu4027 Can you answer these queries?

Problem DescriptionA lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. Each of the battleships can be

2015-05-29 19:28:37 1279

原创 hdu3577 Fast Arrangement

Problem DescriptionChinese always have the railway tickets problem because of its' huge amount of passangers and stations. Now goverment need you to develop a new tickets query system.One train

2015-05-29 12:44:47 1127

原创 hdu1541 Stars

Problem DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars t

2015-05-29 10:03:11 655

原创 Tunnel Warfare

Problem DescriptionDuring the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels

2015-05-28 20:58:58 711

原创 最长下降序列——中高级

Description给你一串整数,从左到右按顺序挑出一些数字,构成严格下降序列,问最长能构成多长如6个数4 5 2 4 2 2, 那么最长可以挑出5 4 2,长度为3Input首先输出T(T每组数据: 首先输入n表示有几个数(1后面一行跟着n个整数Output对于每个样例输出一个数字,表示最长的长度Sample Input164 5

2015-05-28 18:38:05 943

原创 hdu3564 Another LIS

Problem DescriptionThere is a sequence firstly empty. We begin to add number from 1 to N to the sequence, and every time we just add a single number to the sequence at a specific position. Now, we w

2015-05-28 12:42:26 826

原创 hdu3308 LCIS

Problem DescriptionGiven n integers.You have two operations:U A B: replace the Ath number by B. (index counting from 0)Q A B: output the length of the longest consecutive increasing subseque

2015-05-26 21:30:57 726

原创 poj1436 Horizontally Visible Segments

DescriptionThere is a number of disjoint vertical line segments in the plane. We say that two segments are horizontally visible if they can be connected by a horizontal line segment that does not

2015-05-26 17:58:13 662

原创 poj2528 Mayor's posters

Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 47849 Accepted: 13894DescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral e

2015-05-26 12:32:44 613

原创 hdu1828 Picture

Problem DescriptionA number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or horizontal. Each rectangle can be partial

2015-05-25 15:20:42 1329

原创 hdu1542 Atlantis

Problem DescriptionThere are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the island. But unfortunately, t

2015-05-22 16:13:19 766

原创 poj3667 Hotel

DescriptionThe cows are journeying north to Thunder Bay in Canada to gain cultural enrichment and enjoy a vacation on the sunny shores of Lake Superior. Bessie, ever the competent travel agent, ha

2015-05-20 13:40:41 595

原创 hdu3415 Max Sum of Max-K-sub-sequence

Problem DescriptionGiven a circle sequence A[1],A[2],A[3]......A[n]. Circle sequence means the left neighbour of A[1] is A[n] , and the right neighbour of A[n] is A[1].Now your job is to calcula

2015-05-18 20:33:55 543

原创 hdu3706 Second My Problem First

Problem DescriptionGive you three integers n, A and B. Then we define Si = Ai mod B and Ti = Min{ Sk | i-A = 1}Your task is to calculate the product of Ti (1  InputEach line will

2015-05-18 13:45:45 1195

原创 ACdream1414 Geometry Problem

Problem Description      Peter is studying in the third grade of elementary school. His teacher of geometry often gives him difficult home tasks.      At the last lesson the students were studyi

2015-05-16 19:58:54 530

原创 codeforces251A. Points on Line

Little Petya likes points a lot. Recently his mom has presented him n points lying on the line OX. Now Petya is wondering in how many ways he can choose three distinct points so that the distance be

2015-05-16 16:07:48 1108

原创 hdu3530 Subsequence

Problem DescriptionThere is a sequence of integers. Your task is to find the longest subsequence that satisfies the following condition: the difference between the maximum element and the minimum

2015-05-16 11:08:40 1136 2

原创 FZU1894 志愿者选拔

Problem Description世博会马上就要开幕了,福州大学组织了一次志愿者选拔活动。参加志愿者选拔的同学们排队接受面试官们的面试。参加面试的同学们按照先来先面试并且先结束的原则接受面试官们的考查。面试中每个人的人品是主要考查对象之一。(提高人品的方法有扶老奶奶过街,不闯红灯等)作为主面试官的John想知道当前正在接受面试的同学队伍中人品值最高的是多少。于是他请你帮

2015-05-15 16:39:10 811

原创 poj2823 Sliding Window

DescriptionAn array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the wi

2015-05-15 12:42:13 852

原创 hdu3938 Portal

Problem DescriptionZLGG found a magic theory that the bigger banana the bigger banana peel .This important theory can help him make a portal in our universal. Unfortunately, making a pair of porta

2015-05-13 18:33:29 665

原创 hdu2818 Building Block

Problem DescriptionJohn are playing with blocks. There are N blocks (1 M X Y : Put the whole pile containing block X up to the pile containing Y. If X and Y are in the same pile, just ignore t

2015-05-13 12:02:23 583

原创 hdu3038 How Many Answers Are Wrong

Problem DescriptionTT and FF are ... friends. Uh... very very good friends -________-bFF is a bad boy, he is always wooing TT to play the following game with him. This is a very humdrum game.

2015-05-13 10:35:22 837

原创 hdu3047 Zjnu Stadium

Problem DescriptionIn 12th Zhejiang College Students Games 2007, there was a new stadium built in Zhejiang Normal University. It was a modern stadium which could hold thousands of people. The audi

2015-05-12 21:48:36 618

原创 hdu3461 Code Lock

Problem DescriptionA lock you use has a code system to be opened instead of a key. The lock contains a sequence of wheels. Each wheel has the 26 letters of the English alphabet 'a' through 'z', in

2015-05-12 17:11:24 636

原创 hdu1558 Segment set

Problem DescriptionA segment and all segments which are connected with it compose a segment set. The size of a segment set is the number of segments in it. The problem is to find the size of some se

2015-05-11 19:45:28 676

原创 hdu3635 Dragon Balls

Problem DescriptionFive hundred years later, the number of dragon balls will increase unexpectedly, so it's too difficult for Monkey King(WuKong) to gather all of the dragon balls together. 

2015-05-11 13:09:38 671

原创 hdu3172 Virtual Friends

Problem DescriptionThese days, you can do all sorts of things online. For example, you can use various websites to make virtual friends. For some people, growing their social network (their friend

2015-05-09 19:09:49 581

原创 hdu1263 水果

Problem Description夏天来了~~好开心啊,呵呵,好多好多水果~~Joe经营着一个不大的水果店.他认为生存之道就是经营最受顾客欢迎的水果.现在他想要一份水果销售情况的明细表,这样Joe就可以很容易掌握所有水果的销售情况了. Input第一行正整数N(0每组测试数据的第一行是一个整数M(0 Output对于每一组测试数据,请你输出一

2015-05-08 09:03:19 1019

原创 hdu1075 What Are You Talking About

Problem DescriptionIgnatius is so lucky that he met a Martian yesterday. But he didn't know the language the Martians use. The Martian gives him a history book of Mars and a dictionary when it leave

2015-05-07 19:24:54 645

原创 hdu1217 Arbitrage

Problem DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1 US D

2015-05-07 13:34:06 758

原创 hdu1004 Let the Balloon Rise

Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest i

2015-05-07 13:05:05 667

原创 poj2531 Network Saboteur

DescriptionA university network is composed of N computers. System administrators gathered information on the traffic between nodes, and carefully divided the network into two subnetworks in order

2015-05-06 12:55:48 747

原创 poj2676 Sudoku

DescriptionSudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1

2015-05-06 10:47:12 637

原创 poj3414 Pots

DescriptionYou are given two pots, having the volume of A and B liters respectively. The following operations can be performed:FILL(i)        fill the pot i (1 ≤ i ≤ 2) from the tap;DROP(i)   

2015-05-05 19:34:42 614

原创 poj3087 Shuffle'm Up

DescriptionA common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips, S1 and S2, each stack contain

2015-05-05 11:10:09 639

空空如也

空空如也

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

TA关注的人

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