自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

懒鬼的私人泳池

水水更健康~

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

原创 Codeforces1119D-Frets On Fire

题目链接:http://codeforces.com/contest/1119/problem/D题目大意:有N行数,每行有1E18+1个数。第i行数以Si开头,并且是一个等差为1的递增数列,比如第i行的数字为Si,Si+1,Si+2,Si+3…现在有q个询问,每个询问给出l和r,问在这N行数中,第l到第r列中有多少个不同的数。题解:令w=r-l+1.对于第i行数,如果s[i+1]-...

2019-04-07 16:44:10 256

原创 树形DP-HDU-2196-Computer

ComputerTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6050 Accepted Submission(s): 3055Problem Description A school bought the first comp

2016-09-16 21:31:48 473

原创 树形DP-POJ-2342-Anniversary party

Anniversary party Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7067 Accepted: 4072 DescriptionThere is going to be a party to celebrate the 80-th Anniversary of the Ural State

2016-09-16 20:20:18 443

原创 图中环长-Codeforces Round #369 Div.2-D

D. Directed Roads time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output ZS the Coder and Chris the Baboon has explored Udayland for quite some t

2016-08-30 22:55:12 481

原创 DP-Codeforces Round #369 Div.2-C

C. Coloring Trees time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output ZS the Coder and Chris the Baboon has arrived at Udayland! They walked i

2016-08-30 22:47:00 505

原创 水题-Codeforces Round #369 Div.2-B

B. Chris and Magic Square time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output ZS the Coder and Chris the Baboon arrived at the entrance of Uda

2016-08-30 22:35:01 600

原创 水题-Codeforces Round #369 Div.2-A

A. Bus to Udayland time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output ZS the Coder and Chris the Baboon are travelling to Udayland! To get th

2016-08-30 22:31:06 452

原创 DP-HDU-5773-The All-purpose Zero

The All-purpose ZeroTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 279 Accepted Submission(s): 129Problem Description ?? gets an sequence

2016-07-28 20:39:08 564

原创 树状数组-HDU-5775-Bubble Sort

Bubble SortTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 122 Accepted Submission(s): 85Problem Description P is a permutation of the inte

2016-07-28 20:17:59 476

原创 STL签到题-HDU-5774-Where Amazing Happens

Where Amazing HappensTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 85 Accepted Submission(s): 79Problem Description As the premier men’s

2016-07-28 20:07:02 831

原创 DP-HDU-5763-Another Meaning

Another MeaningTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 46 Accepted Submission(s): 14Problem Description As is known to all, in many

2016-07-28 20:04:55 584

原创 化简-HDU-5734-Acperience

AcperienceTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 236 Accepted Submission(s): 125Problem Description Deep neural networks (DNN) hav

2016-07-21 20:57:44 380

原创 贪心-HDU-5742-It's All In The Mind

It’s All In The MindTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 146 Accepted Submission(s): 73Problem Description Professor Zhang has a

2016-07-21 19:39:15 460

原创 水题-HDU-5744-Keep On Movin

Keep On MovinTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 87 Accepted Submission(s): 73Problem Description Professor Zhang has kinds of

2016-07-21 19:34:43 825

原创 最小生成树+树的平均距离-HDU-5723-Abandoned country

Abandoned countryTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 2325 Accepted Submission(s): 592Problem Description An abandoned country h

2016-07-20 23:52:04 505

原创 并查集+最大流-HDU-3038-Marriage Match II

Marriage Match II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3447 Accepted Submission(s): 1113Problem Description Presumably, you all

2016-05-19 20:45:34 365

原创 最大流-HDU-3605-Escape

Escape Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 8376 Accepted Submission(s): 1893Problem Description 2012 If this is the end of the

2016-05-18 22:38:32 495

原创 最大流-HDU-3338-Kakuro Extension

Kakuro Extension Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1678 Accepted Submission(s): 579 Special JudgeProblem Description If you

2016-05-18 22:03:38 708

原创 最大流-HDU-2732-Leapin' Lizards

Leapin’ Lizards Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2121 Accepted Submission(s): 884Problem Description Your platoon of wander

2016-05-18 16:06:05 413

原创 最大流最小割-HDU-4289-Control

Control Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2645 Accepted Submission(s): 1148Problem Description   You, the head of Department

2016-05-18 12:51:48 433

原创 拆点最大流-HDU-4292-Food

Food Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4539 Accepted Submission(s): 1536Problem Description   You, a part-time dining servic

2016-05-17 22:07:15 497

原创 栈优化最大流-HDU-4280-Island Transport

Island Transport Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 7225 Accepted Submission(s): 2256Problem Description   In the vast wate

2016-05-17 21:31:21 394

原创 最大流-POJ-1459-Power Network

Power Network Time Limit: 2000MS Memory Limit: 32768K Total Submissions: 26592 Accepted: 13821Description A power network consists of nodes (power stations, consumers and dispatchers) co

2016-05-17 21:08:46 533

原创 拆网最小费用最大流-POJ-2516-Minimum Cost

Minimum Cost Time Limit: 4000MS Memory Limit: 65536K Total Submissions: 15546 Accepted: 5393Description Dearboy, a goods victualer, now comes to a big problem, and he needs your help. In

2016-05-17 15:18:35 413

原创 最小费用最大流-POJ-2195-Going Home

Going Home Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 21046 Accepted: 10629Description On a grid map there are n little men and n houses. In each unit time, every little

2016-05-17 12:26:22 355

原创 最大流-POJ-1087-A Plug for UNIX

A Plug for UNIX Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15582 Accepted: 5305Description You are in charge of setting up the press room for the inaugural meeting of the

2016-05-16 20:37:04 476

原创 拆点最大流-POJ-3281-Dining

Dining Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 14091 Accepted: 6408DescriptionCows are such finicky eaters. Each cow has a preference for certain foods and drinks, and

2016-05-16 17:31:48 353

原创 二维树状数组-POJ-2155-Matrix

Matrix Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 23707 Accepted: 8762Description Given an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the

2016-05-10 18:03:15 727

原创 树状数组-HDU-1556-Color the ball

Color the ball Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 15579 Accepted Submission(s): 7766Problem Description N个气球排成一排,从左到右依次编号为1,2

2016-05-10 16:22:16 816

原创 树状数组-HDU-1166-敌兵布阵

敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 71309 Accepted Submission(s): 29893Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子D

2016-05-10 16:19:58 783

原创 贪心-BZOJ-1628-[Usaco2007 Demo]City skyline

Input 第一行给出N,W 第二行到第N+1行:每行给出二个整数x,y,输入的x严格递增,并且第一个x总是1 Output输出一个整数,表示城市中最少包含的建筑物数量 Sample Input 10 261 12 25 16 38 111 015 217 320 222 1INPUT DETAILS:The case mentioned aboveSample Output 6题解:

2016-04-26 16:51:36 666

原创 BFS-BZOJ-1627-[Usaco2007 Dec]穿越泥地

Description清早6:00,Farmer John就离开了他的屋子,开始了他的例行工作:为贝茜挤奶。前一天晚上,整个农场刚经受过一场瓢泼大雨的洗礼,于是不难想见,FJ 现在面对的是一大片泥泞的土地。FJ的屋子在平面坐标(0, 0)的位置,贝茜所在的牛棚则位于坐标(X,Y) (-500 <= X <= 500; -500 <= Y <= 500)处。当然咯, FJ也看到了地上的所有N(1 <=

2016-04-26 16:48:26 414

原创 最小生成树-BZOJ-1626-[Usaco2007 Dec]Building Roads 修建道路

DescriptionFarmer John最近得到了一些新的农场,他想新修一些道路使得他的所有农场可以经过原有的或是新修的道路互达(也就是说,从任一个农场都可以经过一些首尾相连道路到达剩下的所有农场)。有些农场之间原本就有道路相连。 所有N(1 <= N <= 1,000)个农场(用1..N顺次编号)在地图上都表示为坐标为(X_i, Y_i)的点(0 <= X_i <= 1,000,000;0 <

2016-04-26 16:46:23 566

原创 01背包-BZOJ-1625-[Usaco2007 Dec]宝石手镯

Description贝茜在珠宝店闲逛时,买到了一个中意的手镯。很自然地,她想从她收集的 N(1 <= N <= 3,402)块宝石中选出最好的那些镶在手镯上。对于第i块宝石,它的重量为W_i(1 <= W_i <= 400),并且贝茜知道它在镶上手镯后能为自己增加的魅力值D_i(1 <= D_i <= 100)。由于贝茜只能忍受重量不超过M(1 <= M <= 12,880)的手镯,她可能无法把所

2016-04-26 16:44:10 524

原创 floyd-BZOJ-1624-[Usaco2008 Open] Clear And Present Danger 寻宝之路

Description 农夫约翰正驾驶一条小艇在牛勒比海上航行. 海上有N(1≤N≤100)个岛屿,用1到N编号.约翰从1号小岛出发,最后到达N号小岛.一 张藏宝图上说,如果他的路程上经过的小岛依次出现了Ai,A2,…,AM(2≤M≤10000)这样的序列(不一定相邻),那他最终就能找到古老的宝藏. 但是,由于牛勒比海有海盗出没.约翰知道任意两个岛屿之间的航线上海盗出没的概率

2016-04-26 16:40:05 450

原创 贪心-BZOJ-1623-[Usaco2008 Open]Cow Cars 奶牛飞车

Description 编号为1到N的N只奶牛正各自驾着车打算在牛德比亚的高速公路上飞驰.高速公路有M(1≤M≤N)条车道.奶牛i有一个自己的车速上限Si(l≤Si≤1,000,000). 在经历过糟糕的驾驶事故之后,奶牛们变得十分小心,避免碰撞的发生.每条车道上,如果某一只奶牛i的前面有K只奶牛驾车行驶,那奶牛i的速度上限就会下降K*D个单位,也就是说,她的速度不会超过Si - k

2016-04-26 16:37:17 424

原创 暴力遍历-BZOJ-1622- [Usaco2008 Open]Word Power 名字的能量

Description 约翰想要计算他那N(1≤N≤1000)只奶牛的名字的能量.每只奶牛的名字由不超过1000个字待构成,没有一个名字是空字体串, 约翰有一张“能量字符串表”,上面有M(1≤M≤100)个代表能量的字符串.每个字符串由不超过30个字体构成,同样不存在空字符串.一个奶牛的名字蕴含多少个能量字符串,这个名字就有多少能量.所谓“蕴含”,是指某个能量字符串的所有字符都在名字串中

2016-04-26 16:34:45 558

原创 BZOJ-1621-[Usaco2008 Open]Roads Around The Farm分岔路口

Description 约翰的N(1≤N≤1,000,000,000)只奶牛要出发去探索牧场四周的土地.她们将沿着一条路走,一直走到三岔路口(可以认为所有的路口都是这样的).这时候,这一群奶牛可能会分成两群,分别沿着接下来的两条路继续走.如果她们再次走到三岔路口,那么仍有可能继续分裂成两群继续走. 奶牛的分裂方式十分古怪:如果这一群奶牛可以精确地分成两部分,这两部分的牛数恰好相差K(

2016-04-26 16:32:52 893

原创 BZOJ-1620- [Usaco2008 Nov]Time Management 时间管理

DescriptionEver the maturing businessman, Farmer John realizes that he must manage his time effectively. He has N jobs conveniently numbered 1..N (1 <= N <= 1,000) to accomplish (like milking the cows,

2016-04-26 16:30:07 341

原创 DFS-BZOJ-1619-[Usaco2008 Nov]Guarding the Farm 保卫牧场

DescriptionThe farm has many hills upon which Farmer John would like to place guards to ensure the safety of his valuable milk-cows. He wonders how many guards he will need if he wishes to put one on t

2016-04-26 16:27:03 543

空空如也

空空如也

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

TA关注的人

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