随笔分类 - ACM--DP
摘要:Help JimmyTime Limit:1000MSMemory Limit:10000KTotal Submissions:8405Accepted:2688Description"Help Jimmy" 是在下图所示的场景上完成的游戏。场景中包括多个长度和高度各不相同的平台。地面是最低的平台,高度为零,长度无限。Jimmy老鼠在时刻0从高于所有平台的某处开始下落,它的下落速度始终为1米/秒。当Jimmy落到某个平台上时,游戏者选择让它向左还是向右跑,它跑动的速度也是1米/秒。当Jimmy跑到平台的边缘时,开始继续下落。Jimmy每次下落的高度不能超过MAX米,不然就会
阅读全文
摘要:Tree CuttingTime Limit:1000MSMemory Limit:65536KTotal Submissions:3525Accepted:2083DescriptionAfter Farmer John realized that Bessie had installed a "tree-shaped" network among his N (1 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 vectorQ[10
阅读全文
摘要:Balancing ActTime Limit:1000MSMemory Limit:65536KTotal Submissions:8048Accepted:3322DescriptionConsider a tree T with N (1 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 vectorQ[20002];11 int num[20002];12 int dp[20002][2];13 //DP[I][0] 统计子节点的最大个数14 //.
阅读全文
摘要:ComputerTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2679Accepted Submission(s): 1373Problem DescriptionA school bought the first computer some time ago(so this computer's id is 1). During the recent years the school bought N-1 new computers
阅读全文
摘要:龟兔赛跑Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10119Accepted Submission(s): 3818Problem Description据说在很久很久以前,可怜的兔子经历了人生中最大的打击——赛跑输给乌龟后,心中郁闷,发誓要报仇雪恨,于是躲进了杭州下沙某农业园卧薪尝胆潜心修炼,终于练成了绝技,能够毫不休息得以恒定的速度(VR m/s)一直跑。兔子一直想找机会好好得教训一下乌龟,以雪前耻。最近正值HDU举办50周年校庆,社
阅读全文
摘要:Feel GoodTime Limit:3000MSMemory Limit:65536KTotal Submissions:8753Accepted:2367Case Time Limit:1000MSSpecial JudgeDescriptionBill is developing a new mathematical theory for human emotions. His recent investigations are dedicated to studying how good or bad days influent people's memories about
阅读全文
摘要:NecklaceTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1566Accepted Submission(s): 455Problem DescriptionYou are given a necklace consists of N beads linked as a circle. Each bead is either crystal or jade.Now, your task is:1.Choose an arbitrary p
阅读全文
摘要:Non-negative Partial SumsTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1420Accepted Submission(s): 544Problem DescriptionYou are given a sequence of n numbers a0,..., an-1. A cyclic shift by k positions (0=0 的个数。 7 想了一下,思路有了。可以这样子。 8 任意前i数和都满足>
阅读全文
摘要:Max Sum of Max-K-sub-sequenceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5335Accepted Submission(s): 1939Problem DescriptionGiven a circle sequence A[1],A[2],A[3]......A[n]. Circle sequence means the left neighbour of A[1] is A[n] , and the rig
阅读全文
摘要:Sliding WindowTime Limit:12000MSMemory Limit:65536KTotal Submissions:35031Accepted:10343Case 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 win
阅读全文
摘要:Problem 1894 志愿者选拔Accept: 1205Submit: 3808Time Limit: 1500 mSecMemory Limit : 32768 KB Problem Description世博会马上就要开幕了,福州大学组织了一次志愿者选拔活动。参加志愿者选拔的同学们排队接受面试官们的面试。参加面试的同学们按照先来先面试并且先结束的原则接受面试官们的考查。面试中每个人的人品是主要考查对象之一。(提高人品的方法有扶老奶奶过街,不闯红灯等)作为主面试官的John想知道当前正在接受面试的同学队伍中人品值最高的是多少。于是他请你帮忙编写一个程序来计算。 Input输入数据第一行为
阅读全文
摘要:A Famous Stone CollectorTime Limit: 30000/15000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 793Accepted Submission(s): 292Problem DescriptionMr. B loves to play with colorful stones. There are n colors of stones in his collection. Two stones with the same color are
阅读全文
摘要:BombTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 5247Accepted Submission(s): 1815Problem DescriptionThe counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bom
阅读全文
摘要:String painterTime Limit: 5000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1312Accepted Submission(s): 554Problem DescriptionThere are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter.
阅读全文
摘要:胜利大逃亡(续)Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4328Accepted Submission(s): 1458Problem DescriptionIgnatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)……这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的门,钥匙藏在地牢另外的某些地方。刚开始Ignatius被关在(sx,sy)的位置,离开地牢的门在(ex,ey)的位置。I
阅读全文
摘要:Doing HomeworkTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4362Accepted Submission(s): 1760Problem DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of ha
阅读全文
摘要:PebblesTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 795Accepted Submission(s): 439Problem DescriptionYou're given an unlimited number of pebbles to distribute across an N x N game board (N drawn from [3, 15]), where each square on the board
阅读全文
摘要:郑厂长系列故事——排兵布阵Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1338Accepted Submission(s): 478Problem Description 郑厂长不是正厂长 也不是副厂长 他根本就不是厂长 事实上 他是带兵打仗的团长 一天,郑厂长带着他的军队来到了一个n*m的平原准备布阵。 根据以往的战斗经验,每个士兵可以攻击到并且只能攻击到与之曼哈顿距离为2的位置以及士兵本身所在的位置。当然,一个士兵不能站...
阅读全文
摘要:C. Dima and Saladtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDima, Inna and Seryozha have gathered in a room. That's right, someone's got to go. To cheer Seryozha up and inspire him to have a walk, Inna decided to cook something.Dima a
阅读全文
摘要:NecklaceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 327680/327680 K (Java/Others)Total Submission(s): 522Accepted Submission(s): 168Problem DescriptionOne day , Partychen gets several beads , he wants to make these beads a necklace . But not every beads can link to each other, every bead sho
阅读全文
浙公网安备 33010602011771号