Doing Homework again (贪心)

Doing Homework again  Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadl...

2018-08-17 11:13:55

阅读数 62

评论数 0

Cleaning Shifts(贪心)

Cleaning Shifts Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He ...

2018-08-17 10:51:58

阅读数 58

评论数 0

Crossing River (贪心)

 Crossing River A group of N people wishes to go across a river with only one boat, which can at most carry two persons. Therefore some sort of shut...

2018-08-17 10:34:40

阅读数 37

评论数 0

Radar Installation(贪心)

 Radar Installation Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a poin...

2018-08-17 10:03:26

阅读数 93

评论数 0

POJ1323 Game Prediction(贪心)

Game Prediction Suppose there are M people, including you, playing a special card game. At the beginning, each player receives N cards. The pip of a...

2018-08-16 18:31:04

阅读数 68

评论数 0

Yogurt factory (贪心)

Yogurt factory The cows have purchased a yogurt factory that makes world-famous Yucky Yogurt. Over the next N (1 <= N <= 10,00...

2018-08-16 17:42:38

阅读数 37

评论数 0


Pie My birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various si...

2018-08-16 17:28:09

阅读数 20

评论数 0

River Hopscotch (二分+贪心)

River Hopscotch Every year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a r...

2018-08-16 17:12:17

阅读数 89

评论数 0


迷瘴 通过悬崖的yifenfei,又面临着幽谷的考验—— 幽谷周围瘴气弥漫,静的可怕,隐约可见地上堆满了骷髅。由于此处长年不见天日,导致空气中布满了毒素,一旦吸入体内,便会全身溃烂而死。 幸好yifenfei早有防备,提前备好了解药材料(各种浓度的万能药水)。现在只需按照配置成不同比例的浓度。 现...

2018-07-14 14:34:42

阅读数 25

评论数 0

Filthy Rich

Filthy Rich They say that in Phrygia, the streets are paved with gold. You’re currently on vacation in Phrygia, and to your astonishment you discover...

2018-07-14 11:59:16

阅读数 25

评论数 0

Repair the Wall

Repair the Wall   Long time ago , Kitty lived in a small village. The air was fresh and the scenery was very beautiful. The only thing that trouble...

2018-07-14 11:48:47

阅读数 20

评论数 0

Flying to the Mars

Flying to the Mars In the year 8888, the Earth is ruled by the PPF Empire . As the population growing , PPF needs to find more land for the newborns ...

2018-07-14 11:33:45

阅读数 16

评论数 0

Tian Ji -- The Horse Racing

Tian Ji -- The Horse Racing Here is a famous story in Chinese history. "That was about 2300 years ago. General Tian Ji was a high official i...

2018-07-14 11:16:12

阅读数 175

评论数 0

Wooden Sticks

Wooden SticksThere is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodwo...

2018-07-14 11:02:35

阅读数 138

评论数 0

Moving Tables

Moving TablesThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has ...

2018-07-14 10:34:43

阅读数 18

评论数 0

FatMouse' Trade (贪心)

FatMouse' TradeFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean. Th...

2018-07-14 10:15:46

阅读数 39

评论数 0


找点 题目描述 上数学课时,老师给了LYH一些闭区间,让他取尽量少的点,使得每个闭区间内至少有一个点。但是这几天LYH太忙了,你们帮帮他吗? 输入 多组测试数据。 每组数据先输入一个N,表示有N个闭区间(N≤100)。 接下来N行,每行输入两个数a,b(0≤a≤b≤...

2017-11-07 21:44:41

阅读数 66

评论数 0

NYOJ 会场安排问题

会场安排问题 题目描述 学校的小礼堂每天都会有许多活动,有时间这些活动的计划时间会发生冲突,需要选择出一些活动进行举办。小刘的工作就是安排学校小礼堂的活动,每个时间最多安排一个活动。现在小刘有一些活动计划的时间表,他想尽可能的安排更多的活动,请问他该如何安排。 输入 ...

2017-11-07 21:07:04

阅读数 55

评论数 0

NYOJ 过河问题

过河问题 题目描述 在漆黑的夜里,N位旅行者来到了一座狭窄而且没有护栏的桥边。如果不借助手电筒的话,大家是无论如何也不敢过桥去的。不幸的是,N个人一共只带了一只手电筒,而桥窄得只够让两个人同时过。如果各自单独过桥的话,N人所需要的时间已知;而如果两人同时过桥,所需要的时间就是走得比...

2017-11-07 20:51:30

阅读数 53

评论数 0

NYOJ +-字符串

+-字符串 题目描述 Shiva得到了两个只有加号和减号的字符串,字串长度相同。Shiva一次可以把一个加号和它相邻的减号交换。他想知道最少需要多少次操作才能把第一个字符串变换成第二个字符串。你现在要去帮助他完成那个这个问题。 输入 多组测试数据 每组数据有两行,...

2017-11-07 20:48:56

阅读数 66

评论数 0

取消 删除