-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c52ffb3
commit df810c0
Showing
12 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
## Problem: Project Decorations | ||
|
||
### Description | ||
You are managing a software development team, and you need to assign developers to projects. You have `f` frontend engineers, `b` backend engineers, and `d` devops engineers. To fully staff a single project, you need exactly three engineers, there can be 2 engineers of the same type but all 3 should not be the same. | ||
|
||
What is the maximum number of projects that can be fully staffed given the number of developers of each specialization? | ||
|
||
### Input | ||
The input consists of a single line containing three integers `f`, `b`, and `d` (0 ≤ `f`, `b`, `d` ≤ 2·10^9) — the number of frontend, backend, and database engineers respectively. The numbers are separated by exactly one space. | ||
|
||
### Output | ||
Print a single integer — the maximum number of projects that can be fully staffed in the required manner. | ||
|
||
### Example | ||
|
||
#### Input | ||
``` | ||
5 4 3 | ||
``` | ||
|
||
#### Output | ||
``` | ||
4 | ||
``` | ||
|
||
#### Input | ||
``` | ||
1 1 1 | ||
``` | ||
|
||
#### Output | ||
``` | ||
1 | ||
``` | ||
|
||
#### Input | ||
``` | ||
2 3 3 | ||
``` | ||
|
||
#### Output | ||
``` | ||
2 | ||
``` | ||
|
||
### Note | ||
|
||
In the first example, you can fully staff the projects with the following sets of developers: "frontend-backend-backend", "backend-devops-devops", "devops-frontend-frontend", "frontend-frontend-backend", where "frontend", "backend", and "devops" represent the specializations of the developers, respectively. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Problem Name: "Software-Dev" | ||
Function Name: solve | ||
Input Structure: | ||
Input Field: int F | ||
Input Field: int B | ||
Input Field: int D | ||
Output Structure: | ||
Output Field: int F |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
5 | ||
4 | ||
3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
1 | ||
1 | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
2 | ||
3 | ||
3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
0 | ||
1 | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
1000 | ||
1000 | ||
1002 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1000 |