随笔分类 -  贪心

摘要:/*摘抄(简单贪心)FatMouse' TradeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 33765 Accepted Submission(s): 10999Problem DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorit.. 阅读全文
posted @ 2013-08-06 20:42 myth_HG 阅读(356) 评论(0) 推荐(0)
摘要:/*Doing Homework againTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4568 Accepted Submission(s): 2675Problem DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him ... 阅读全文
posted @ 2013-08-06 20:03 myth_HG 阅读(308) 评论(0) 推荐(0)
摘要:Moving TablesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 23681 Accepted: 7839DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north side and south side ... 阅读全文
posted @ 2013-08-06 19:09 myth_HG 阅读(1860) 评论(1) 推荐(0)
摘要:/*Physical ExaminationTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3390 Accepted Submission(s): 931Problem DescriptionWANGPENG is a freshman. He is requested to have a physical examination when entering the university.Now WANGPENG arrives... 阅读全文
posted @ 2013-08-03 15:24 myth_HG 阅读(390) 评论(0) 推荐(0)
摘要:/*StripiesTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 10270 Accepted: 4976DescriptionOur 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 ... 阅读全文
posted @ 2013-08-03 09:00 myth_HG 阅读(436) 评论(0) 推荐(0)
摘要:/*Fence RepairTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 19914 Accepted: 6314DescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer l... 阅读全文
posted @ 2013-08-02 09:22 myth_HG 阅读(5383) 评论(0) 推荐(0)
摘要:/*ZOJ Problem Set - 3230Solving the Problems--------------------------------------------------------------------------------Time Limit: 2 Seconds Memory Limit: 32768 KB--------------------------------------------------------------------------------Programming is fun, Aaron is addicted to it. In... 阅读全文
posted @ 2013-07-31 17:16 myth_HG 阅读(273) 评论(0) 推荐(0)
摘要:/*ZOJ Problem Set - 3410Layton's Escape--------------------------------------------------------------------------------Time Limit: 2 Seconds Memory Limit: 65536 KB--------------------------------------------------------------------------------Professor Layton is a renowned archaeologist from Lo. 阅读全文
posted @ 2013-07-31 10:45 myth_HG 阅读(385) 评论(0) 推荐(0)
摘要:/*Gu Jian Qi Tan--------------------------------------------------------------------------------Time Limit: 2 Seconds Memory Limit: 65536 KB --------------------------------------------------------------------------------Gu Jian Qi Tan is a very hot Chinese RPG in this summer vacation. SuSu is ... 阅读全文
posted @ 2013-07-30 20:10 myth_HG 阅读(487) 评论(0) 推荐(0)
摘要:/*AssignmentsTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1301 Accepted Submission(s): 599Problem DescriptionIn a factory, there are N workers to finish two types of tasks (A and B). Each type has N tasks. Each task of type A needs xi tim... 阅读全文
posted @ 2013-07-30 15:09 myth_HG 阅读(198) 评论(0) 推荐(0)
摘要:/*hdu-1052Tian Ji -- The Horse RacingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14456 Accepted Submission(s): 4125Problem DescriptionHere is a famous story in Chinese history."That was about 2300 years ago. General Tian Ji was a high of. 阅读全文
posted @ 2013-07-30 10:44 myth_HG 阅读(2996) 评论(0) 推荐(0)
摘要:/* SupermarketTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 7856 Accepted: 3343DescriptionA supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from ... 阅读全文
posted @ 2013-07-29 19:54 myth_HG 阅读(252) 评论(0) 推荐(0)
摘要:/* The Dragon of LoowaterOnce upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.The shores of Rellau Creek in central Loowater had always been a prime breeding ground for geese. Due to the lack of predators, the geese population was out of control. The people of L 阅读全文
posted @ 2013-07-29 16:45 myth_HG 阅读(275) 评论(0) 推荐(0)
摘要:/*GCommando WarInput: Standard InputOutput: Standard Output “Waiting for orders we held in the wood, word from the front never cameBy evening the sound of the gunfire was miles awayAh softly we moved through the shadows, slip away through the treesCrossing their lines in the mists in the fields on . 阅读全文
posted @ 2013-07-29 15:22 myth_HG 阅读(367) 评论(0) 推荐(0)
摘要:/*GCommando WarInput: Standard InputOutput: Standard Output“Waiting for orders we held in the wood, word from the front never cameBy evening the sound of the gunfire was miles awayAh softly we moved through the shadows, slip away through the treesCrossing their lines in the mists in the fields on ou 阅读全文
posted @ 2012-11-18 00:39 myth_HG 阅读(520) 评论(0) 推荐(0)
摘要:/*O - Dragon of LoowaterTime Limit:1000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmitStatusDescriptionProblem C: The Dragon of Loowater Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem. The shores of Rellau Creek in central Loowater had always... 阅读全文
posted @ 2012-11-18 00:25 myth_HG 阅读(222) 评论(0) 推荐(0)
摘要:#include<iostream>#include<algorithm>using namespace std;int comp(const void *a,const void *b){ return ((int *)a)[0]<((int *)b)[0];}int main(){int a[5][5] = {{5,2,3,4,5}, {4,3,2,5,6}, {9,2,4,5,7}, {3,2,4,5,7}, {2,2,4,8,7}};qsort(a[0],5,sizeof(int),comp);//a[0]被排序qsort(a,5... 阅读全文
posted @ 2012-08-01 17:58 myth_HG 阅读(456) 评论(1) 推荐(0)