ACM__贪心
Spectacules
每一段代码都是艺术品
展开
-
HDU 2037 今年暑假不AC
HDU 2037 今年暑假不AC Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 28234 Accepted Submission(s): 14985Problem Description“今年暑假不AC?”原创 2015-05-03 12:15:23 · 458 阅读 · 0 评论 -
HDU 4726 Kia's Calculation
HDU 4726 Kia's CalculationTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2436 Accepted Submission(s): 501Problem DescriptionDoctor原创 2015-05-25 17:31:53 · 371 阅读 · 0 评论 -
HDU 2717 Catch That Cow
Catch That CowProblem DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and原创 2015-08-08 00:31:35 · 367 阅读 · 0 评论 -
FZU 2197 最小花费
Problem 2197 最小花费 Problem Description给一个长度为n(n Input第一行一个整数T(1 Output最小花费。 Sample Input2121100120011 Sample Output03【思路分析】 该题贪心的策略就是优先处理最后一个1和最前一原创 2015-08-29 11:16:36 · 522 阅读 · 0 评论 -
HDU 1052 Tian Ji -- The Horse Racing
Tian Ji -- The Horse RacingProblem DescriptionHere 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 pla原创 2015-08-05 12:01:47 · 437 阅读 · 0 评论 -
九度OJ 1533 最长上升子序列 (基于贪心和二分查找)
题目描述: 给定一个整型数组, 求这个数组的最长严格递增子序列的长度。 譬如序列1 2 2 4 3 的最长严格递增子序列为1,2,4或1,2,3.他们的长度为3。输入: 输入可能包含多个测试案例。对于每个测试案例,输入的第一行为一个整数n(1输入的第二行包括n个整数,代表这个数组中的数字。整数均在int范围内。输出: 对于每个测试案例,输出其最长严格递增原创 2015-10-06 16:39:10 · 453 阅读 · 0 评论