diff --git a/apps/problems/Software-Dev/Problem.md b/apps/problems/Software-Dev/Problem.md new file mode 100644 index 0000000..7110dc1 --- /dev/null +++ b/apps/problems/Software-Dev/Problem.md @@ -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. \ No newline at end of file diff --git a/apps/problems/Software-Dev/template.md b/apps/problems/Software-Dev/template.md new file mode 100644 index 0000000..549f4fd --- /dev/null +++ b/apps/problems/Software-Dev/template.md @@ -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 diff --git a/apps/problems/Software-Dev/tests/inputs/0.txt b/apps/problems/Software-Dev/tests/inputs/0.txt new file mode 100644 index 0000000..3cc7a02 --- /dev/null +++ b/apps/problems/Software-Dev/tests/inputs/0.txt @@ -0,0 +1,3 @@ +5 +4 +3 \ No newline at end of file diff --git a/apps/problems/Software-Dev/tests/inputs/1.txt b/apps/problems/Software-Dev/tests/inputs/1.txt new file mode 100644 index 0000000..e8183f0 --- /dev/null +++ b/apps/problems/Software-Dev/tests/inputs/1.txt @@ -0,0 +1,3 @@ +1 +1 +1 diff --git a/apps/problems/Software-Dev/tests/inputs/2.txt b/apps/problems/Software-Dev/tests/inputs/2.txt new file mode 100644 index 0000000..4e8a2de --- /dev/null +++ b/apps/problems/Software-Dev/tests/inputs/2.txt @@ -0,0 +1,3 @@ +2 +3 +3 diff --git a/apps/problems/Software-Dev/tests/inputs/3.txt b/apps/problems/Software-Dev/tests/inputs/3.txt new file mode 100644 index 0000000..e035449 --- /dev/null +++ b/apps/problems/Software-Dev/tests/inputs/3.txt @@ -0,0 +1,3 @@ +0 +1 +0 \ No newline at end of file diff --git a/apps/problems/Software-Dev/tests/inputs/4.txt b/apps/problems/Software-Dev/tests/inputs/4.txt new file mode 100644 index 0000000..53fca78 --- /dev/null +++ b/apps/problems/Software-Dev/tests/inputs/4.txt @@ -0,0 +1,3 @@ +1000 +1000 +1002 \ No newline at end of file diff --git a/apps/problems/Software-Dev/tests/outputs/0.txt b/apps/problems/Software-Dev/tests/outputs/0.txt new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/apps/problems/Software-Dev/tests/outputs/0.txt @@ -0,0 +1 @@ +4 diff --git a/apps/problems/Software-Dev/tests/outputs/1.txt b/apps/problems/Software-Dev/tests/outputs/1.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/apps/problems/Software-Dev/tests/outputs/1.txt @@ -0,0 +1 @@ +1 diff --git a/apps/problems/Software-Dev/tests/outputs/2.txt b/apps/problems/Software-Dev/tests/outputs/2.txt new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/apps/problems/Software-Dev/tests/outputs/2.txt @@ -0,0 +1 @@ +2 diff --git a/apps/problems/Software-Dev/tests/outputs/3.txt b/apps/problems/Software-Dev/tests/outputs/3.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/apps/problems/Software-Dev/tests/outputs/3.txt @@ -0,0 +1 @@ +0 diff --git a/apps/problems/Software-Dev/tests/outputs/4.txt b/apps/problems/Software-Dev/tests/outputs/4.txt new file mode 100644 index 0000000..83b33d2 --- /dev/null +++ b/apps/problems/Software-Dev/tests/outputs/4.txt @@ -0,0 +1 @@ +1000