Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Design and analysis of algorithms / Practicum / Maycamp-198_Beach.cpp
diff options
context:
space:
mode:
Commitfe5a64bc48dd8b440fe13883f47c8fe5938ba080 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-04-10 09:39:52 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-04-10 09:39:52 +0300
Files51bb5c65a26d5bba1e273ec42ccec15ed4da7019 /Year 2/Design and analysis of algorithms/Practicum/Maycamp-198_Beach.cpp
uni-projects-fe5a64bc48dd8b440fe13883f47c8fe5938ba080.tar
uni-projects-fe5a64bc48dd8b440fe13883f47c8fe5938ba080.tar.gz
uni-projects-fe5a64bc48dd8b440fe13883f47c8fe5938ba080.zip
Parent279f7c5a31c9e90cae0f3645a3aa6c528a008e0b (diff)
[DAA/i198] Added current work on maycamp previous exam exercises
1 files changed, 21 insertions, 0 deletions
-rw-r--r--Year 2/Design and analysis of algorithms/Practicum/Maycamp-198_Beach.cpp21
diff --git a/Year 2/Design and analysis of algorithms/Practicum/Maycamp-198_Beach.cpp b/Year 2/Design and analysis of algorithms/Practicum/Maycamp-198_Beach.cpp
new file mode 100644
index 0000000..7cacde5
--- /dev/null
+++ b/Year 2/Design and analysis of algorithms/Practicum/Maycamp-198_Beach.cpp
@@ -0,0 +1,21 @@
+#include <cstdio>
+#include <vector>
+#include <algorithm>
+using namespace std;
+
+int main() {
+ int T = 0;
+ scanf("%d", &T);
+ vector<vector<int>> a;
+ int t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0;
+ for (int i = 0; i < T; i++) {
+ scanf("%d %d %d %d %d %d", &t1, &t2, &t3, &t4, &t5, &t6);
+ a.push_back({t1, t2, t3, t4, t5, t6});
+ }
+ for (vector<int>& b : a) {
+ l*p + r*(1-p) = 0
+ (l-r)p + r = 0
+ p = r/(r-l)
+ p = b[]
+ }
+}