摘要: Merry ChristmasTime Limit : 8 sec, Memory Limit : 65536 KBProblem J:Merry ChristmasInternational Christmas Present Company (ICPC) is a company to employ Santa and deliver presents on Christmas. Many parents request ICPC to deliver presents to their children at specified time of December 24. Although 阅读全文
posted @ 2014-03-18 22:33 hyx1 阅读(239) 评论(0) 推荐(0) 编辑
摘要: Muddy FieldsTime Limit:1000MSMemory Limit:65536KTotal Submissions:7557Accepted:2791DescriptionRain has pummeled the cows' field, a rectangular grid of R rows and C columns (1 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 #define maxn 5510 #define maxnode 250511 12 c... 阅读全文
posted @ 2014-03-18 20:52 hyx1 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Purifying MachineTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 4014Accepted: 1127DescriptionMike is the owner of a cheese factory. He has 2N cheeses and each cheese is given a binary number from 00...0 to 11...1. To keep his cheese free from viruses, he made himself a purifying machine to 阅读全文
posted @ 2014-03-15 17:33 hyx1 阅读(257) 评论(0) 推荐(0) 编辑
摘要: KindergartenTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 4787Accepted: 2326DescriptionIn a kindergarten, there are a lot of kids. All girls of the kids know each other and all boys also know each other. In addition to that, some girls and boys know each other. Now the teachers want to pi 阅读全文
posted @ 2014-03-15 16:18 hyx1 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Girls and BoysTime Limit: 5000MSMemory Limit: 10000KTotal Submissions: 10008Accepted: 4427DescriptionIn the second year of the university somebody started a study on the romantic relations between the students. The relation "romantically involved" is defined between one girl and one boy. F 阅读全文
posted @ 2014-03-15 15:53 hyx1 阅读(193) 评论(0) 推荐(0) 编辑
摘要: The Perfect StallTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 17246Accepted: 7872DescriptionFarmer John completed his new barn just last week, complete with all the latest milking technology. Unfortunately, due to engineering problems, all the stalls in the new barn are different. For th 阅读全文
posted @ 2014-03-15 14:03 hyx1 阅读(139) 评论(0) 推荐(0) 编辑
摘要: K BestTime Limit: 8000MSMemory Limit: 65536KTotal Submissions: 5177Accepted: 1411Case Time Limit: 2000MSSpecial JudgeDescriptionDemy has n jewels. Each of her jewels has some value vi and weight wi.Since her husband John got broke after recent financial crises, Demy has decided to sell some jewels. 阅读全文
posted @ 2014-03-14 14:18 hyx1 阅读(165) 评论(0) 推荐(0) 编辑
摘要: MedianTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 3528Accepted: 1001DescriptionGiven N numbers, X1, X2, ... , XN, let us calculate the difference of every pair of numbers: ∣Xi - Xj∣ (1 ≤ i < j ≤ N). We can get C(N,2) differences through this work, and now your task is to find the median 阅读全文
posted @ 2014-03-14 12:32 hyx1 阅读(286) 评论(0) 推荐(0) 编辑
摘要: Cow AcrobatsTime Limit:1000MSMemory Limit:65536KTotal Submissions:2302Accepted:912DescriptionFarmer John's N (1 2 #include 3 #include 4 5 using namespace std; 6 7 #define maxn 50005 8 9 #define INF (1 << 30)10 11 struct node {12 int w,s;13 };14 15 node s[maxn];16 int n;17 18 bool cmp(n... 阅读全文
posted @ 2014-03-14 00:29 hyx1 阅读(348) 评论(0) 推荐(0) 编辑
摘要: DryingTime Limit:2000MSMemory Limit:65536KTotal Submissions:7959Accepted:2014DescriptionIt is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has decided to use a radiator to make drying faster. But the radiator 阅读全文
posted @ 2014-03-13 22:28 hyx1 阅读(252) 评论(0) 推荐(0) 编辑