Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Design and analysis of algorithms / Practicum / Arena-119.cpp
diff options
context:
space:
mode:
Commit7ce1482f4aa4376adc2de1879d949a9da24b0b69 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-04-05 10:36:12 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-04-05 10:36:12 +0300
Files073b881c8c8903ef23c9fecdc819241cc2f698b1 /Year 2/Design and analysis of algorithms/Practicum/Arena-119.cpp
uni-projects-7ce1482f4aa4376adc2de1879d949a9da24b0b69.tar
uni-projects-7ce1482f4aa4376adc2de1879d949a9da24b0b69.tar.gz
uni-projects-7ce1482f4aa4376adc2de1879d949a9da24b0b69.zip
Parent0320df7a3aed3024a60165a7822522dc863efe0d (diff)
[DAAP] Renamed arena to action arena
1 files changed, 0 insertions, 35 deletions
-rw-r--r--Year 2/Design and analysis of algorithms/Practicum/Arena-119.cpp35
diff --git a/Year 2/Design and analysis of algorithms/Practicum/Arena-119.cpp b/Year 2/Design and analysis of algorithms/Practicum/Arena-119.cpp
deleted file mode 100644
index 5f3c9da..0000000
--- a/Year 2/Design and analysis of algorithms/Practicum/Arena-119.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <algorithm>
-#include <iostream>
-#include <string>
-
-using namespace std;
-
-int letters[100] = { 0 };
-
-int main() {
- string input;
- getline(cin, input);
-
- string cap = "BAZINGA", low = "bazinga";
- for (char c : input) {
- for (int i = 0; i < cap.size(); i++) {
- if (c == cap[i] || c == low[i]) {
- letters[i]++;
- break;
- }
- }
- }
- letters[6] = letters[1] = letters[1] / 2;
-
- int minV = letters[0];
- for (int i = 0; i < cap.size(); i++) {
- if (letters[i] == 0) {
- minV = 0;
- break;
- }
- minV = min(minV, letters[i]);
- }
-
- cout << minV << endl;
- return 0;
-}