国科大卜东坡算法
SL_World
中国科学院大学计算机应用技术专业在读研究生
展开
-
【线性规划】Volunteer recruitment
DescriptionSuppose you will recruit a group of volunteers for a coming event. It is estimated that this event will take N days to complete, and the i(th) day needs at least Ai volunteers. The number ...原创 2019-12-22 23:15:07 · 945 阅读 · 0 评论 -
动态规划-3.8流水作业调度
问题描述: n个作业{1,2,…,n}要在由2台机器M1和M2组成的流水线上完成加工。每个作业加工的顺序都是先在M1上加工,然后在M2上加工。M1和M2加工作业i所需的时间分别为ai和bi。 流水作业调度问题要求确定这n个作业的最优加工顺序,使得从第一个作业在机器M1上开始加工,到最后一个作业在机器M2上加工完成所需的时间最少。 分析: 直观上,一个最优调度应使机器M1没原创 2017-11-07 15:14:52 · 2914 阅读 · 0 评论 -
【贪心算法】Best Time to Buy and Sell Stocks(力扣121)
Problem DescriptionSay you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many transactions as you...原创 2019-11-30 11:37:38 · 613 阅读 · 0 评论 -
【贪心算法】Monkeys and Bananas
Problem DescriptionGiven an array of size n that has the following specifications:Each element in the array contains either a monkey or a banana.Each monkey can eat only one banana.A monkey cannot ...原创 2019-11-30 11:11:33 · 2018 阅读 · 2 评论 -
【贪心算法】Cross the river
Problem description:Some people want to cross a river by boat. Each person has a weight, and each boat can carry a maximum weight of limit. Each boat carries at most 2 people at the same time, provid...原创 2019-11-30 11:04:24 · 1415 阅读 · 4 评论 -
【动态规划+贪心算法】Maximum Product(剪绳子 or 整数拆分)
DescriptionGiven a rope whose length is n(1<=n<=501<=n<=50), please cut the rope to m parts to get the maximum product of the length of each part ∏l1+l2+…+lm=nl1∗l2∗…∗lm∏l1+l2+…+lm=nl1∗l2...原创 2019-11-30 10:59:22 · 896 阅读 · 0 评论 -
【贪心算法】Job Schedule
Description:There are nn(1<=n<=1051<=n<=105) distinct jobs, labeled J1,J2,…,JnJ1,J2,…,Jn, which can be performed completely independently of one another. Each jop consists of two stages: ...原创 2019-11-30 10:39:36 · 2117 阅读 · 5 评论 -
【贪心算法】Assign banana to monkeys
Problem description:There are N Monkeys and N bananas are placed in a straight line. Each monkey want to have a banana, if two monkeys want to own the same banana, there will be a fight! A monkey can...原创 2019-11-30 00:37:27 · 1560 阅读 · 0 评论