自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(23)
  • 收藏
  • 关注

原创 hdu 3436 Queue-jumpers(splay tree)

Queue-jumpersTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1225    Accepted Submission(s): 273Problem DescriptionPonyo and Gar

2012-10-11 13:38:20 779

原创 UESTC Journey

In Tomb-sweeping Festival, Yangsir and her friends planned to have a journey in a park. The park has N attractions which form a circle and only between adjacent attractions there is a road, so there a

2012-10-08 20:57:38 600

原创 UESTC 1647 Battery Charging (找规律模拟)

DescriptionRecently, qbwj bought a powerful cellphone which performs even better than most computers. He spent lots of time on it. However, this cellphone has a very strange feature which confused

2012-10-08 20:12:18 7895

原创 UESTCoj Grab a hole (二分+贪心)

Description"One radish, one hole"N rats migrate to a new habitat. There are exactly N holes which lie on a line one by one. The holes are numbered (starting from the leftmost one) from 1 to n.

2012-10-08 20:06:44 605

原创 poj 1470(LCA RE)

Closest Common AncestorsTime Limit: 2000MS Memory Limit: 10000KTotal Submissions: 11754 Accepted: 3875DescriptionWrite a program that takes as input a rooted

2012-10-07 19:52:52 444

原创 poj 1986 Distance Queries(LCA模板题)

Distance QueriesTime Limit: 2000MS Memory Limit: 30000KTotal Submissions: 6773 Accepted: 2380Case Time Limit: 1000MSDescriptionFarmer John's cows refused

2012-10-07 14:48:44 1632

原创 【NOI2004】郁闷的出纳员(splay tree WA中。。)

【NOI2004】郁闷的出纳员 Time Limit:10000MS  Memory Limit:65536KTotal Submit:469 Accepted:179 Case Time Limit:2000MSDescription  OIER公司是一家大型专业化软件公司,有着数以万计的员工。作为一名出纳员,我的任务之一便是统计每位员工的工资。这本来是一

2012-10-06 12:23:57 1023

原创 hdu 3487 Play with Chain(splay tree)

Play with ChainTime Limit: 6000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1841    Accepted Submission(s): 742Problem DescriptionYaoYao is f

2012-10-05 19:24:07 1195 1

原创 【HNOI2004】宠物收养所(splay tree TLE)

【HNOI2004】宠物收养所 Time Limit:10000MS  Memory Limit:65536KTotal Submit:248 Accepted:157 Case Time Limit:1000MSDescription最近,阿Q开了一间宠物收养所。收养所提供两种服务:收养被主人遗弃的宠物和让新的主人领养这些宠物。   每个领养者都希望领

2012-10-05 16:00:17 973

转载 伸展树(Splay Tree)小结

伸展树(Splay Tree)一般情况下的建树似乎和线段树差不多。1):插入一个元素:对于在原序列x位置插入一个元素(就是在x-1和x中间),那么首先找到第x-1个元素,然后将其旋转到根节点(root),这个过程就是splay的过程,然后再找到第x个元素所在位置,将其旋转到根的右子树,这样将要插入的元素就放在root->ch[R]->ch[L]上这个位置,按照中序遍历该节点就在x-

2012-10-05 10:01:07 940

原创 poj 3468 A Simple Problem with Integers(splay tree更新求和)

题目地址:http://poj.org/problem?id=3468区间更新,加上某值,区间求和,用splay  tree做,可以当模版了。。。#include#include#include#include#define ll long long#define N 200010#define Key_value ch[ch[root][1]][0]using namesp

2012-10-04 19:23:15 554

原创 【AHOI2006】文本编辑器(splay tree)

【AHOI2006】文本编辑器 Time Limit:20000MS  Memory Limit:65536KTotal Submit:77 Accepted:47 Case Time Limit:2000MSDescription  这些日子,可可不和卡卡一起玩了,原来可可正废寝忘食的想做一个简单而高效的文本编辑器。你能帮助他吗?   为了明确任务目标

2012-10-04 11:51:12 957

原创 HNOI2002 营业额统计(splay tree)

【描述 Description】   营业额统计Tiger最近被公司升任为营业部经理,他上任后接受公司交给的第一项任务便是统计并分析公司成立以来的营业情况。Tiger拿出了公司的账本,账本上记录了公司成立以来每天的营业额。分析营业情况是一项相当复杂的工作。由于节假日,大减价或者是其他情况的时候,营业额会出现一定的波动,当然一定的波动是能够接受的,但是在某些时候营业额突变得很高或是很低,

2012-10-03 16:44:47 1469

原创 poj 3468 A Simple Problem with Integers(splay tree模板题)

A Simple Problem with IntegersTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 36775 Accepted: 10613Case Time Limit: 2000MSDescriptionYou have N

2012-10-03 15:13:41 2858 1

原创 hdu 3714 Error Curves(三分)

Error CurvesTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1198    Accepted Submission(s): 460Problem DescriptionJosephina is a

2012-10-02 19:54:12 1892

原创 poj 3301 Texas Trip (三分求极值)

Texas TripTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3233 Accepted: 948DescriptionAfter a day trip with his friend Dick, Harry noticed a strange

2012-10-02 17:13:05 939 1

原创 hdu 3400 Line belt(三分)

Line beltTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1865    Accepted Submission(s): 704Problem DescriptionIn a two-dimensio

2012-10-02 15:04:58 1593

原创 heru 5081 Turn the corner(三分)

Turn the cornerTimeLimit: 1 Second MemoryLimit: 32 Megabyte Totalsubmit: 637 Accepted: 175 DescriptionMr. West bought a new car! So he is travelling around the city.One day he comes to a

2012-10-02 10:29:04 864

原创 zoj 3203 Light Bulb(三分)

Light BulbTime Limit: 1 Second Memory Limit: 32768 KB Compared to wildleopard's wealthiness, his brother mildleopard is rather poor. His house is narrow and he has only one light bulb in his

2012-10-02 09:35:48 526

转载 三分法

三分法——求解凸性函数的极值问题——czyuan原创       二分法作为分治中最常见的方法,适用于单调函数,逼近求解某点的值。但当函数是凸性函数时,二分法就无法适用,这时三分法就可以“大显身手”~~       如图,类似二分的定义Left和Right,mid = (Left + Right) / 2,midmid = (mid + Right) / 2;

2012-10-01 20:20:17 713

原创 Buaa 1033 Easy Problem(三分问题)

Easy Problem时间限制:1000 ms  |  内存限制:65536 KB描述In this problem, you're to calculate the distance between a point P(xp, yp, zp) and a segment (x1, y1, z1) ? (x2, y2, z2), in a 3D space, i.e. the

2012-10-01 20:18:58 662

原创 zoj 3645(高斯—浮点型——模板)

BiliBiliTime Limit: 2 Seconds Memory Limit: 65536 KB Shirai Kuroko is a Senior One student. Almost everyone in Academy City have super powers, andKuroko is good at using it. Her ability is "

2012-10-01 17:54:11 1210 1

原创 Zoj 3647 Gao the Grid ( 2012年浙大9月月赛)组合数学

Gao the GridTime Limit: 2 Seconds Memory Limit: 65536 KB A n * m grid as follow: Count the number of triangles, three of whose vertice must be grid-points.Note that the three ver

2012-10-01 14:33:55 2200

空空如也

空空如也

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

TA关注的人

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