自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

千山鸟飞绝

Hello world

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

原创 Number Sequence

Number Sequence Given 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[1], a[K + 1]

2017-08-16 16:53:22 162

原创 百度之星初赛A 今夕何夕

今夕何夕 今天是2017年8月6日,农历闰六月十五。 小度独自凭栏,望着一轮圆月,发出了“今夕何夕,见此良人”的寂寞感慨。 为了排遣郁结,它决定思考一个数学问题:接下来最近的哪一年里的同一个日子,和今天的星期数一样?比如今天是8月6日,星期日。下一个也是星期日的8月6日发生在2023年。 小贴士:在公历中,能被4整除但不能被100整除,或能被400整除的年份即为闰年。 Input 第一行为T,表

2017-08-12 20:36:37 275

原创 士兵杀敌(三)

士兵杀敌(三) 时间限制:2000 ms | 内存限制:65535 KB 难度:5 描述 南将军统率着N个士兵,士兵分别编号为1~N,南将军经常爱拿某一段编号内杀敌数最高的人与杀敌数最低的人进行比较,计算出两个人的杀敌数差值,用这种方法一方面能鼓舞杀敌数高的人,另一方面也算是批评杀敌数低的人,起到了很好的效果。所以,南将军经常问军师小工第i号士兵到第j号士兵中,杀敌数最高的人与杀敌数最低

2017-08-12 17:49:48 139

原创 最长递增子序列(模板)

最长公共子序列 (模板) 时间复杂度nlog(n);原理解释:我推荐看这篇博客,慢慢理解。#include<cstdio>#include<algorithm>using namespace std;const int maxn=100010;const int inf=0x3f3f3f3f;int a[maxn];int dp[maxn];int main(){ int

2017-08-08 20:01:06 248

原创 hdu 1257最少拦截系统

最少拦截系统某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹. 怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了,请帮助计算一下最少需要多

2017-08-07 17:04:24 184

原创 poj 2533Longest Ordered Subsequence

Longest Ordered SubsequenceDescriptionA numeric sequence of ai is ordered if a1 < a2 < … < aN. Let the subsequence of the given numeric sequence (a1, a2, …, aN) be any sequence (ai1, ai2, …, aiK), wher

2017-08-07 13:47:53 143

原创 POJ1789-Truck History

Truck HistoryAdvanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture, or for bricks. The company has its own code describing each

2017-08-03 20:38:42 317

原创 HDU1301 Jungle Roads

Jungle RoadsThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relen

2017-08-03 20:24:56 156

原创 HDU 1875 畅通工程再续

畅通工程再续相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离不能小于10米,也不能大于1000米。当然,为了节省资金,只要求实现

2017-08-03 20:12:38 125

原创 poj-1751-Highways-(最小生成树)

Highwayshe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware of this problem and has already constructed

2017-08-03 20:08:15 204

原创 POJ 1287 Networking

NetworkingYou are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables that may connect p

2017-08-03 19:56:11 125

原创 POJ 2485 Highways

Highways The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Flatopian government is aware of this problem. The

2017-08-03 19:53:41 138

原创 hdu 1325 Is It A Tree? (并查集)

Is It A Tree? A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following proper

2017-08-02 22:31:11 170

原创 HDOJ 2120 Ice_cream's world I

Ice_cream’s world Iice_cream’s world is a rich country, it has many fertile lands. Today, the queen of ice_cream wants award land to diligent ACMers. So there are some watchtowers are set up, and wall

2017-08-02 22:06:51 194

原创 HDU1272小希的迷宫

小希的迷宫上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小希现在把她的设计图给你,让你帮忙

2017-08-02 22:02:42 103

原创 hdu 1856 More is better

More is better Mr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it will be. Of course there are certain requirements. Mr Wang se

2017-08-02 21:52:56 122

原创 The Suspects POJ 1611

The Suspects Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best stra

2017-08-02 21:45:38 119

原创 HDU 5631 Rikka with Graph

Rikka with GraphAs we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them: Yuta has a non-direct graph with n vertice

2017-08-02 21:38:31 178

原创 poj 1383 Labyrinth

poj 1383 Labyrinth 【 BFS实现 树的直径裸题】 The northern part of the Pyramid contains a very large and complicated labyrinth. The labyrinth is divided into square blocks, each of them either filled by rock, or

2017-08-01 20:52:17 387

空空如也

空空如也

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

TA关注的人

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