自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(27)
  • 问答 (1)
  • 收藏
  • 关注

原创 UVa 11134 Fabled Rooks(贪心+优先队列)

题目链接题目大意:    在一个棋盘上,放置N个国际象棋的城堡,每个城堡给出可以放置的范围,要求这些城堡不能相互攻击到,求这些城堡的摆放方案。解题思路:    这题非常关键的一点就是横纵坐标可以分开独立考虑。对于每一个方向,我们维护一个下限小(其次上线小)的区间优先出堆的堆,以及当前要填充的坐标。每次去堆顶区间。如果上限小于要填充坐标说明无法填充。如果下限小于当

2016-08-31 18:49:44 447

原创 Codeforces 388B Fox and Minimal path(构造最短路条数为N的图)

B. Fox and Minimal pathtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFox Ciel wants to write a task for a programmi

2016-08-31 16:39:44 869

原创 Codeforces 711D Directed Roads(所有点出度为1的图反向边去环)

D. Directed Roadstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputZS the Coder and Chris the Baboon has explored Uday

2016-08-30 12:53:43 1125

原创 HDU 1365 & ZOJ 1456 Minimum Transport Cost(记录路径Floyd)

Minimum Transport CostTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10091    Accepted Submission(s): 2749Problem DescriptionThese

2016-08-28 17:12:04 604

原创 HDU Eight II(BFS+康托展开)

Eight IITime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 130000/65536 K (Java/Others)Total Submission(s): 2347    Accepted Submission(s): 504Problem DescriptionEight-puzzle, which i

2016-08-26 18:45:44 968

原创 HDU 3608 0 or 1(求一个数因子和的奇偶)

0 or 1Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3460    Accepted Submission(s): 988Problem DescriptionSolving problem is a int

2016-08-26 09:45:45 797

原创 POJ 1511 Invitation Cards(SPFA)

Invitation CardsTime Limit: 8000MS Memory Limit: 262144KTotal Submissions: 25322 Accepted: 8383DescriptionIn the age of television, not many people attend theater p

2016-08-25 10:05:02 473

原创 UVa 10269 & ZOJ 1232 Adventure of Super Mario(最短路+DP)

题目链接题目大意:    马里奥在救出公主后要从城堡回家。有A个村庄,B个城堡,他现在在城堡A+B,要回到家1中,给出一些地点之间的距离。不过马里奥可以进行K次快速奔跑,每次不超过距离L,而且快速奔跑不能进过城堡,快速奔跑可以瞬间跑到目的地。求回家的最短距离。解题思路:    图上dp,我们可以先用Floyd求出任意两点不经过城堡的最短距离。然后很容易想到用dp

2016-08-24 20:10:49 612

原创 HDU 1536 S-Nim(SG博弈)

S-NimTime Limit: 5000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7117    Accepted Submission(s): 3012Problem DescriptionArthur and his sister Ca

2016-08-24 15:39:26 488

原创 POJ 3420 Quad Tiling(轮廓线DP+矩阵快速幂)

Quad TilingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4076 Accepted: 1856DescriptionTired of the Tri Tiling game finally, Michael turns to a more

2016-08-24 09:44:15 1178 1

原创 HDU 4411 Arrest(Floyd+最小费用最大流)

ArrestTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1932    Accepted Submission(s): 765Problem DescriptionThere are (N+1) cities o

2016-08-24 08:30:16 1008

原创 POJ 3687 Labeling Balls(拓扑排序+反向思考)

Labeling BallsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 13776 Accepted: 3983DescriptionWindy has N balls of distinct weights from 1 unit to N un

2016-08-21 20:06:01 463

原创 Codeforces 707D Persistent Bookcase(操作建树)

D. Persistent Bookcase time limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputRecently in school Alina has learned what are

2016-08-21 17:22:55 692

原创 Codeforces 707C Pythagorean Triples(已知直角三角形一边求另两边)

C. Pythagorean Triplestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputKatya studies in a fifth grade. Recently her cl

2016-08-21 07:52:47 1639

原创 HDU 5860 Death Sequence(DP+约瑟夫问题·改)

Death SequenceTime Limit: 16000/8000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 295    Accepted Submission(s): 123Problem DescriptionYou may heard of

2016-08-19 17:52:46 698

原创 ZOJ 1136&&POJ 1465 Multiple(BFS+同余定理)

MultipleTime Limit: 1000MS Memory Limit: 32768KTotal Submissions: 7215 Accepted: 1546Descriptiona program that, given a natural number N between 0 and 4999 (inclusi

2016-08-17 20:04:49 664

原创 HDU 5811 Colosseo(竞赛图+拓普排序+LIS)

ColosseoTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 732    Accepted Submission(s): 147Problem DescriptionMr. Chopsticks keeps N

2016-08-15 10:26:08 1218

原创 Codeforces 706D Vasiliy's Multiset(异或字典树)

D. Vasiliy's Multisettime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAuthor has gone out of the stories about Vasili

2016-08-12 09:42:22 1187

原创 HDU 5821 Ball(贪心)

BallTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 138    Accepted Submission(s): 77Problem DescriptionZZX has a sequence of boxes

2016-08-11 19:18:24 491

原创 POJ 1236 Network of Schools(使DAG强联通最小加边数)

Network of SchoolsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 15788 Accepted: 6255DescriptionA number of schools are connected to a computer network.

2016-08-09 09:34:51 668

转载 POJ 2079 Triangle 题解 《挑战程序设计竞赛》

原文地址POJ 2079 Triangle凸包三角:求N个点组成的三角形的最大面积?3.6与平面和空间打交道的计算几何 凸包 不难想到最大三角形一定由凸包的顶点构成,难点在于怎么搜索。O(N^3)枚举会超时,旋转卡壳法O(N^2)解决问题。如图,先固定一条边(红色实线),然后搜索下一个顶点1st,三角形面积必然是先增后减的(极值在固定边的法线方向的最远点

2016-08-08 16:42:57 499

原创 Codeforces 704A Thor (脑洞题)

A. Thortime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThor is getting used to the Earth. As a gift Loki gave him a

2016-08-08 09:35:27 1176

原创 POJ 3608 Bridge Across Islands(求两凸包间的最小距离)

Bridge Across IslandsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10108 Accepted: 2969 Special JudgeDescriptionThousands of thousands years ago t

2016-08-07 20:00:31 1135 7

原创 POJ 1912 A highway and the seven dwarfs(O(log N)求直线与凸包是否相交)

A highway and the seven dwarfsTime Limit: 8000MS Memory Limit: 30000KTotal Submissions: 2454 Accepted: 485Case Time Limit: 3000MSDescriptionOnce upon a time,

2016-08-07 16:14:43 623

原创 Codeforces 703C Chris and Road(转换参考系)

C. Chris and Roadtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAnd while Mishka is enjoying her trip...Chris is

2016-08-06 19:23:44 867

原创 Google Code Jam 2009 Round2 A (脑洞题)

Problem A. Crazy RowsThis contest is open for practice. You can try every problem as many times as you like, though we won't keep track of which problems you solve. Read theQuick-Start Gui

2016-08-03 15:01:28 785

原创 HDU 5792 World is Exploding (容斥原理+离散化+树状数组)

World is ExplodingTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 330    Accepted Submission(s): 151Problem DescriptionGiven a seque

2016-08-03 09:01:05 728

空空如也

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

TA关注的人

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