上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 99 下一页

2012年3月3日

Treap树各种操作

摘要: 今天写了Treap树的各种操作。。1.插入元素2.删除元素3.查找元素4.求第K小元素5确定一个元素秩6求最大值7求最小值8遍历View Code #include <stdio.h>#include <string.h>#include <stdlib.h>#include <time.h>typedef struct node{ node *lchild, *rchild, *pf;//左孩子,右孩子 int v, pri, size;//值和优先值}*Node;void update( Node &q ){ if( q->rc 阅读全文

posted @ 2012-03-03 21:53 more think, more gains 阅读(256) 评论(0) 推荐(0) 编辑

2012年2月29日

递归输出图形

摘要: 以前都是用for循环解决这类题目的。。用递归输出真的是太方便了。递归输出正方形:View Code #include <stdio.h>#include <string.h>#include <algorithm>#include <stdlib.h>#include <math.h>#include <algorithm>#include <vector>#include <queue>#include <deque>#include <stack>#include < 阅读全文

posted @ 2012-02-29 15:22 more think, more gains 阅读(449) 评论(0) 推荐(0) 编辑

2012年2月28日

五种数据结构解HNOI 营业额统计

摘要: 1588: [HNOI2002]营业额统计Time Limit:5 SecMemory Limit:162 MBSubmit:2572Solved:773[Submit][Status][Discuss]Description营业额统计 Tiger最近被公司升任为营业部经理,他上任后接受公司交给的第一项任务便是统计并分析公司成立以来的营业情况。 Tiger拿出了公司的账本,账本上记录了公司成立以来每天的营业额。分析营业情况是一项相当复杂的工作。由于节假日,大减价或者是其他情况的时候,营业额会出现一定的波动,当然一定的波动是能够接受的,但是在某些时候营业额突变得很高或是很低,这就证明公司此时的经 阅读全文

posted @ 2012-02-28 22:31 more think, more gains 阅读(209) 评论(0) 推荐(0) 编辑

2011年9月1日

Text Formatting

摘要: Text FormattingpTime Limit:3000MSMemory Limit:Unknown64bit IO Format:%lld & %llu[Submit] [Go Back] [Status]DescriptionYour chief judge is getting long in the tooth and it is getting increasingly difficult for him to read through the densely-written messages of complaints about the problems and s 阅读全文

posted @ 2011-09-01 14:44 more think, more gains 阅读(202) 评论(0) 推荐(0) 编辑

happy 2009

摘要: Happy 2009Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1242Accepted Submission(s): 429Problem DescriptionNo matter you know me or not. Bless you happy in 2009.InputThe input contains multiple test cases.Each test case included one string. There 阅读全文

posted @ 2011-09-01 14:34 more think, more gains 阅读(175) 评论(0) 推荐(0) 编辑

上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 99 下一页

导航