Skip to content

Commit

Permalink
e200: Add project scheduling
Browse files Browse the repository at this point in the history
  • Loading branch information
XuShaohua committed Sep 18, 2024
1 parent dd83389 commit 591eaaf
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,5 +407,6 @@
- [简易压缩算法/一种字符串压缩表示的解压 - 字符串](od/2024e200/compress-string/index.md)
- [智能驾驶 - 二分查找](od/2024e200/intelligent-driving/index.md)
- [字符串拼接 - 字符串](od/2024e200/merge-string/index.md)
- [项目排期 - DFS](od/2024e200/project-scheduling/index.md)

[参考资料](refs.md)
1 change: 1 addition & 0 deletions src/od/2024e200/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
21. [简易压缩算法/一种字符串压缩表示的解压 - 字符串](compress-string/index.md)
22. [智能驾驶 - 二分查找](intelligent-driving/index.md)
23. [字符串拼接 - 字符串](merge-string/index.md)
24. [项目排期 - DFS](project-scheduling/index.md)
7 changes: 7 additions & 0 deletions src/od/2024e200/project-scheduling/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "e200-project-scheduling"
version = "0.1.0"
edition = "2021"
publish = false

[dependencies]
2 changes: 2 additions & 0 deletions src/od/2024e200/project-scheduling/assets/input1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
6 2 7 7 9 3 2 1 3 11 4
2
1 change: 1 addition & 0 deletions src/od/2024e200/project-scheduling/assets/output1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
28
33 changes: 33 additions & 0 deletions src/od/2024e200/project-scheduling/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 项目排期

## 题目描述

项目组共有N个开发人员, 项目经理接到了M个独立的需求, 每个需求的工作量不同, 且每个需求只能由一个开发人员独立完成, 不能多人合作.
假定各个需求直接无任何先后依赖关系, 请设计算法帮助项目经理进行工作安排, 使整个项目能用最少的时间交付.

### 输入描述

- 第一行输入为M个需求的工作量, 单位为天, 用逗号隔开
- 例如 X1 X2 X3 … Xm, 表示共有M个需求, 每个需求的工作量分别为X1天, X2天…Xm天
- 其中 0<M<30, 0<Xm<200
- 第二行输入为项目组人员数量N

### 输出描述

最快完成所有工作的天数.

### 示例1

输入:

```text
{{#include assets/input1.txt}}
```

输出:

```text
{{#include assets/output1.txt}}
```

## 题解
3 changes: 3 additions & 0 deletions src/od/2024e200/project-scheduling/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

0 comments on commit 591eaaf

Please sign in to comment.