随笔分类 -  贪心

nth Permutation / LightOJ - 1060
摘要:Given a string of characters, we can permute the individual characters to make new strings. At first we order the string into alphabetical order. Then 阅读全文

posted @ 2020-03-12 22:46 LT-Y 阅读(110) 评论(0) 推荐(0)

Tian Ji -- The Horse Racing / HDU - 1052
摘要:Here is a famous story in Chinese history. "That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play hor 阅读全文

posted @ 2020-03-09 20:07 LT-Y 阅读(263) 评论(0) 推荐(0)

Task / HDU - 4864
摘要:Today the company has m tasks to complete. The ith task need xi minutes to complete. Meanwhile, this task has a difficulty level yi. The machine whose 阅读全文

posted @ 2020-03-06 23:06 LT-Y 阅读(186) 评论(0) 推荐(0)

Best Cow Line / POJ - 3617
摘要:FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his cows in a line 阅读全文

posted @ 2020-03-02 17:46 LT-Y 阅读(120) 评论(0) 推荐(0)

Radar Installation / POJ - 1328
摘要:Input The input consists of several test cases. The first line of each case contains two integers n (1<=n<=1000) and d, where n is the number of islan 阅读全文

posted @ 2020-03-01 16:07 LT-Y 阅读(121) 评论(0) 推荐(0)

「Cleaning Shifts」 Vs 「今年暑假不AC」「OpenJ_Bailian-2376 Vs HDU-2037」
摘要:总述 两题分别是通过 左端点从小到大排序 https://www.cnblogs.com/Little-Turtle--QJY/p/12388858.html 右端点从小到大排序 https://www.cnblogs.com/Little-Turtle--QJY/p/12389430.html 为 阅读全文

posted @ 2020-03-01 15:55 LT-Y 阅读(90) 评论(0) 推荐(0)

今年暑假不AC / HDU - 2037
摘要:“今年暑假不AC?” “是的。” “那你干什么呢?” “看世界杯呀,笨蛋!” “@#$%^&*%...” 确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。 作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,比如新闻联播(永 阅读全文

posted @ 2020-03-01 13:38 LT-Y 阅读(116) 评论(0) 推荐(0)

Cleaning Shifts / OpenJ_Bailian - 2376
摘要:Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one cow working on 阅读全文

posted @ 2020-03-01 11:42 LT-Y 阅读(180) 评论(0) 推荐(0)