# LeetCode 1723. Find Minimum Time to Finish All Jobs

```class Solution {
public:

int p[15];
int ans;
int n;
int minimumTimeRequired(vector<int>& jobs, int k) {

n = jobs.size();
ans=INT_MAX;
fun(0,k,0,jobs);

return ans;
}

void fun(int i, int k, int m, vector<int>& jobs)
{
if (i == n)
{
if (ans > m)
ans = m;
return;
}

for (int j = 0; j < k; j++)
{
p[j] += jobs[i];
if (p[j] > ans)
{
p[j] -= jobs[i];

continue;
}
if (p[j] > m)
fun(i + 1, k, p[j], jobs);
else
fun(i + 1, k, m, jobs);

p[j] -= jobs[i];

if(p[j]==0)
break;
}
}
};```

0 条评论

• ### HOJ 2317 Pimp My Ride(状态压缩DP)

Pimp My Ride My Tags (Edit) Source : TUD 2005 Time limit : 3 sec Me...

• ### LeetCode Weekly Contest 43解题思路

版权声明：本文为博主原创文章，未经博主允许不得转载。 https://blog.csdn.n...

• ### 【Dr.Elephant中文文档-6】度量指标和启发式算法

我们将作业的资源使用量定义为任务容器大小和任务运行时间的乘积。因此，作业的资源使用量可以定义为mapper和reducer任务的资源使用量总和。

• ### 【GitLab CI/CD】：Pipelines

Pipelines are the top-level component of continuous integration, delivery, and d...

• ### Baozi Training Leetcode solution 135: Candy

Blogger:https://blog.baozitraining.org/2019/11/leetcode-solution-135-candy.html

• ### Simulate a Windows Service using ASP.NET to run scheduled jobs

Introduction How to run scheduled jobs from ASP.NET without requiring a Windows ...

• ### 多机调度的几何

摘要：我们考虑以下一般调度问题：在时间0处有m个相同的机器和n个作业都被释放。每个作业j具有处理时间pj，以及指定j的成本的任意非递减函数fj，对于每个可能的完...

The Head Elder of the tropical island of Lagrishan has a problem. A burst of ...

• ### LeetCode Weekly Contest 38解题思路

版权声明：本文为博主原创文章，未经博主允许不得转载。 https://blog.csdn.n...

• ### uva----(10794) A Different Task

A Different Task  The (Three peg) Tower of Hanoi problem is a popular ...

• ### How to find “hidden” remote jobs using Google Search.

By using a special search operator with Google search, you can find remote jobs ...

• ### 关关的刷题日记82 – Leetcode 453. Minimum Moves to Equal Array Elements

关关的刷题日记82 – Leetcode 453. Minimum Moves to Equal Array Elements 题目 Given a non-e...

• ### codeforce893C (并查集)

Vova promised himself that he would never play computer games… But recently Fire...

• ### leetcode502. IPO

Suppose LeetCode will start its IPO soon. In order to sell a good price of its s...

• ### Azkaban 2.5 Documentation

Azkaban was implemented at LinkedIn to solve the problem of Hadoop job dependenc...

• ### 图论--差分约束--HDU\HDOJ 4109 Instrction Arrangement

Ali has taken the Computer Organization and Architecture course this term. He l...