数据结构基础
Kefault
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
二叉树建立 以及 bfs层次遍历
Problem description: 输入一颗二叉树,你的任务是按从上到下、从左到右的顺序输出各个节点的值。每个节点都按照从根节点到他的移动序列给出(L表示左,R表示右)。在输入中,每个节点的左括号和有括号之间没有空格,相邻节点之间有一个空格。每棵树的输入用括号()结束。 注意:如果从根到某个叶节点的路径上有的节点没有在输入中给出或者给出了超过一次,应当输出-1。借点数不原创 2013-08-08 13:55:55 · 1221 阅读 · 0 评论 -
hdu 5057 Argestes and Sequence
Argestes and Sequence Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 511 Accepted Submission(s): 127 Problem Description Argest原创 2014-09-30 20:03:00 · 1168 阅读 · 0 评论 -
acdream 1427 Nice Sequence
Nice Sequence Time Limit: 12000/6000MS (Java/Others)Memory Limit: 128000/64000KB (Java/Others) SubmitStatisticNext Problem Problem Description Let us consider the sequence a1, a2,.原创 2014-10-07 11:43:44 · 1330 阅读 · 0 评论 -
hdu 4970 Killing Monsters
Killing Monsters Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 160 Accepted Submission(s): 86 Problem Description Kingdom Ru原创 2014-08-19 18:55:53 · 1094 阅读 · 0 评论 -
poj 2182 Lost Cows
Lost Cows Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9201 Accepted: 5917 Description N (2 <= N <= 8,000) cows have unique brands in the range 1..N.原创 2014-08-15 18:26:45 · 660 阅读 · 0 评论 -
poj 2352 Stars
Stars Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 32548 Accepted: 14221 Description Astronomers often examine star maps where stars are represented b原创 2014-08-16 13:22:33 · 872 阅读 · 0 评论 -
hdu 4893 Wow! Such Sequence!
Wow! Such Sequence! Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1894 Accepted Submission(s): 585 Problem Description Recent原创 2014-07-30 18:08:34 · 734 阅读 · 0 评论 -
poj 2418 Hardwood Species
Hardwood Species Time Limit: 10000MS Memory Limit: 65536K Total Submissions: 18603 Accepted: 7361 Description Hardwoods are the botanical group of trees that have b原创 2014-08-16 14:37:00 · 830 阅读 · 0 评论 -
poj 2777 Count Color(线段树)
Count Color Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 35248 Accepted: 10622 Description Chosen Problem Solving and Program design as an optional co原创 2014-08-15 11:49:11 · 887 阅读 · 0 评论 -
poj 3468 A Simple Problem with Integers(线段树)
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 61636 Accepted: 18840 Case Time Limit: 2000MS Description You have N原创 2014-08-15 10:59:22 · 808 阅读 · 0 评论 -
hdu 1698 Just a Hook(线段树)
Just a Hook Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 17481 Accepted Submission(s): 8731 Problem Description In the game o原创 2014-08-15 09:54:18 · 649 阅读 · 0 评论 -
poj 2886 Who Gets the Most Candies?(线段树+约瑟夫环+反素数)
Who Gets the Most Candies? Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 9934 Accepted: 3050 Case Time Limit: 2000MS Description N children are s原创 2014-08-13 20:43:35 · 978 阅读 · 0 评论 -
hdu 2795 Billboard(线段树)
Billboard Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 10890 Accepted Submission(s): 4827 Problem Description At the entranc原创 2014-08-13 19:51:27 · 855 阅读 · 0 评论 -
poj 2828 Buy Tickets
Buy Tickets Time Limit: 4000MS Memory Limit: 65536K Total Submissions: 13277 Accepted: 6595 Description Railway tickets were difficult to buy around the Lunar New Y原创 2014-08-13 20:16:09 · 843 阅读 · 0 评论 -
hdu 1394 Minimum Inversion Number(线段树)
Minimum Inversion Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 10853 Accepted Submission(s): 6676 Problem Description原创 2014-08-13 19:40:57 · 760 阅读 · 0 评论 -
poj 1703 Find them, Catch them
Find them, Catch them Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 31412 Accepted: 9677 Description The police office in Tadu City decides to say ends原创 2014-08-12 11:54:46 · 846 阅读 · 0 评论 -
codeforces 204B- Little Elephant and Cards
Description The Little Elephant loves to play with color cards. He has n cards, each has exactly two colors (the color of the front side and the color of the back side). Ini原创 2014-03-14 19:31:15 · 1477 阅读 · 0 评论 -
poj 3264 Balanced Lineup
Description For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the cows.原创 2013-09-22 10:49:38 · 945 阅读 · 0 评论 -
树链剖分学习
最近学习树链剖分,在网上搜了很多文章,这里推荐一篇博客:点击打开链接。 这篇博客讲的很仔细,在了解了基本原理之后,可以学习一下kuangbin大大的模板: 定义部分: struct Edge { int to,next; }edge[2*maxn];//树的边 int head[maxn],tot;//邻接表 int top[maxn];//节点所在重链的最原创 2014-10-09 21:10:48 · 1344 阅读 · 2 评论
分享