随笔分类 -  数据结构

摘要:1503: [NOI2004]郁闷的出纳员http://www.lydsy.com/JudgeOnline/problem.php?id=1503Time Limit:5 SecMemory Limit:64 MBSubmit:4094Solved:1496[Submit][Status]DescriptionOIER公司是一家大型专业化软件公司,有着数以万计的员工。作为一名出纳员,我的任务之一便是统计每位员工的工资。这本来是一份不错的工作,但是令人郁闷的是,我们的老板反复无常,经常调整员工的工资。如果他心情好,就可能把每位员工的工资加上一个相同的量。反之,如果心情不好,就可能把他们的工资扣除 阅读全文
posted @ 2013-08-08 09:47 Jack Ge 阅读(716) 评论(0) 推荐(0) 编辑
摘要:SequenceTime Limit:6000MSMemory Limit:65536KTotal Submissions:6120Accepted:1897DescriptionGiven m sequences, each contains n non-negative integer. Now we may select one number from each sequence to form a sequence with m integers. It's clear that we may get n ^ m this kind of sequences. Then we 阅读全文
posted @ 2013-07-29 16:38 Jack Ge 阅读(410) 评论(0) 推荐(0) 编辑
摘要:Fence RepairTime Limit:2000MSMemory Limit:65536KTotal Submissions:19660Accepted:6236DescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needsN(1 ≤N≤ 20,000) planks of wood, each having some integer lengthLi(1 ≤Li≤ 50,000) uni 阅读全文
posted @ 2013-07-29 16:00 Jack Ge 阅读(332) 评论(0) 推荐(0) 编辑
摘要:StripiesTime Limit:1000MSMemory Limit:30000KTotal Submissions:10263Accepted:4971DescriptionOur chemical biologists have invented a new very useful form of life called stripies (in fact, they were first called in Russian - polosatiki, but the scientists had to invent an English name to apply for an i 阅读全文
posted @ 2013-07-29 15:45 Jack Ge 阅读(1037) 评论(0) 推荐(0) 编辑
摘要:StonesTime Limit: 5000/3000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 662Accepted Submission(s): 391Problem DescriptionBecause of the wrong status of the bicycle, Sempr begin to walk east to west every morning and walk back every evening. Walking may cause a littl 阅读全文
posted @ 2013-07-29 15:30 Jack Ge 阅读(425) 评论(0) 推荐(0) 编辑
摘要:The order of a TreeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 835Accepted Submission(s): 453Problem DescriptionAs we know,the shape of a binary search tree is greatly related to the order of keys we insert. To be precisely:1.insert a key k to 阅读全文
posted @ 2013-07-29 14:40 Jack Ge 阅读(1202) 评论(0) 推荐(0) 编辑
摘要:Binary Tree TraversalsTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2442Accepted Submission(s): 1063Problem DescriptionA binary tree is a finite set of vertices that is either empty or consists of a root r and two disjoint binary trees called the 阅读全文
posted @ 2013-07-29 14:05 Jack Ge 阅读(3325) 评论(0) 推荐(0) 编辑
摘要:The kth great numberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 5049Accepted Submission(s): 2069Problem DescriptionXiao Ming and Xiao Bao are playing a simple Numbers game. In a round Xiao Ming can choose to write down a number, or ask Xiao Bao 阅读全文
posted @ 2013-07-28 17:02 Jack Ge 阅读(363) 评论(0) 推荐(0) 编辑
摘要:比赛难度Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 330Accepted Submission(s): 83Problem Description 最近,小明出了一些ACM编程题,决定在HDOJ举行一场公开赛。 假设题目的数量一共是n道,这些题目的难度被评级为一个不超过1000的非负整数,并且一场比赛至少需要一个题,而这场比赛的难度,就是所有题目的难度之和,同时,我们认为一场比赛与本场题目的顺序无关,而且题目也不会重复。 显而易见,... 阅读全文
posted @ 2013-05-19 00:24 Jack Ge 阅读(414) 评论(0) 推荐(0) 编辑
摘要:1504: ZZ的橱柜http://www.acmore.net/problem.php?id=1504Time Limit:1 SecMemory Limit:64 MBSubmit:315Solved:38SubmitStatusWeb BoardDescriptionZZ不仅喜欢买衣服,还是个吃货,天哪!现在的妹纸是怎么了?╮(╯_╰)╭,ZZ有两个大型橱柜A和B,里面放满了零食,每个橱柜里面有N个方格,每个方格里面放了不同重量的美味,现在ZZ要从A、B里面各取一个方格的美味,可是ZZ不想变得太胖,于是他会尽量的选择重量少的美味,当然不是所有的组合都是ZZ喜欢吃的美味,所以她想了一个特别 阅读全文
posted @ 2013-04-28 18:16 Jack Ge 阅读(359) 评论(0) 推荐(0) 编辑
摘要:Sliding WindowTime Limit:12000MSMemory Limit:65536KTotal Submissions:29829Accepted:8863Case Time Limit:5000MSDescriptionAn array of sizen≤ 106is given to you. There is a sliding window of sizekwhich is moving from the very left of the array to the very right. You can only see theknumbers in the wind 阅读全文
posted @ 2013-04-15 17:47 Jack Ge 阅读(1697) 评论(0) 推荐(0) 编辑
摘要:Tree RecoveryTime Limit:1000MSMemory Limit:65536KTotal Submissions:8946Accepted:5647DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital letters in the nodes. This is an example of one of her creations: . 阅读全文
posted @ 2013-03-20 14:06 Jack Ge 阅读(438) 评论(0) 推荐(0) 编辑
摘要:二叉搜索树Time Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 2Accepted Submission(s) : 2Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem Description判断两序列是否为同一二叉搜索树序列Input开始一个数n,(1#include#includeusing namespace std;const int N=2010;char str[30];int n 阅读全文
posted @ 2013-03-12 15:15 Jack Ge 阅读(455) 评论(0) 推荐(0) 编辑
摘要:Ultra-QuickSorthttp://poj.org/problem?id=2299Time Limit: 7000MSMemory Limit: 65536KTotal Submissions: 30129Accepted: 10760DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elemen 阅读全文
posted @ 2013-01-03 22:20 Jack Ge 阅读(205) 评论(0) 推荐(0) 编辑
摘要:Minimum Inversion Numberhttp://acm.hdu.edu.cn/showproblem.php?pid=1394Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5566 Accepted Submission(s): 3411 Problem DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the numb 阅读全文
posted @ 2013-01-03 20:15 Jack Ge 阅读(1321) 评论(0) 推荐(0) 编辑
摘要:小陈老师、雪人http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1176Time Limit: 1000 MSMemory Limit: 65536 KTotal Submit: 79(22 users)Total Accepted: 32(14 users)Rating:Special Judge: YesDescription东北的冬季,尤其是过年的时候,小陈老师喜欢去堆雪人。 每个雪人主要由三个雪球构成:大雪球、中雪球、小雪球。 他已经准备好了N个雪球,半径分别等于r1, r2 阅读全文
posted @ 2012-12-29 09:29 Jack Ge 阅读(262) 评论(0) 推荐(0) 编辑
摘要:Train Problem Ihttp://acm.hdu.edu.cn/showproblem.php?pid=1022Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 12861 Accepted Submission(s): 4705 Problem DescriptionAs the new term comes, the Ignatius Train Station is very busy nowadays. A lot of s 阅读全文
posted @ 2012-12-28 22:39 Jack Ge 阅读(449) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示