diff options
author | Franciszek Malinka <franciszek.malinka@gmail.com> | 2021-03-16 19:33:09 +0100 |
---|---|---|
committer | Franciszek Malinka <franciszek.malinka@gmail.com> | 2021-03-16 19:33:09 +0100 |
commit | ff6ee7e5e195321afaf4883b6b289527f1f7a989 (patch) | |
tree | 26544c73de6dcf799fe7d0957c527bf4a0dbb8ea /Semestr 4 | |
parent | 5c974d1f80d6bbbcbbe7138fec974a79379702b2 (diff) | |
parent | 46dcd7f2e1bc5cf0234c35a4a2fbdf79708ec9e8 (diff) |
Merge branch 'main' of https://github.com/korbiniak/wmiuwr into main
Diffstat (limited to 'Semestr 4')
-rw-r--r-- | Semestr 4/Pstwo/L2Z11.pdf | bin | 407522 -> 409088 bytes | |||
-rw-r--r-- | Semestr 4/Pstwo/Wyklad 3.pdf | bin | 0 -> 2970744 bytes | |||
-rw-r--r-- | Semestr 4/aisd/Lista 0/Rozw L0.pdf | bin | 1984913 -> 1983735 bytes | |||
-rw-r--r-- | Semestr 4/aisd/Lista 1/Lista 1.pdf | bin | 0 -> 810791 bytes | |||
-rw-r--r-- | Semestr 4/aisd/Wykłady/Notatka 3 - Zachłany.pdf | bin | 0 -> 243598 bytes | |||
-rw-r--r-- | Semestr 4/aisd/Wykłady/Notatka 4 - divide and conquer.pdf | bin | 0 -> 326839 bytes | |||
-rw-r--r-- | Semestr 4/aisd/rozw.cpp | 70 | ||||
-rw-r--r-- | Semestr 4/ask/lista 1/ask21_lista_1.pdf | bin | 0 -> 118889 bytes | |||
-rw-r--r-- | Semestr 4/ask/lista 1/test.c | 11 | ||||
-rw-r--r-- | Semestr 4/rownania rozniczkowe/lista 1/L1Z3.pdf | bin | 0 -> 1210433 bytes | |||
-rw-r--r-- | Semestr 4/rownania rozniczkowe/lista 1/RR1R-01.pdf (renamed from Semestr 4/rownania rozniczkowe/RR1R-01.pdf) | bin | 100982 -> 100982 bytes | |||
-rw-r--r-- | Semestr 4/rownania rozniczkowe/lista 2/L2Z4.pdf | bin | 0 -> 137162 bytes | |||
-rw-r--r-- | Semestr 4/rownania rozniczkowe/lista 2/RR1R-02.pdf (renamed from Semestr 4/rownania rozniczkowe/RR1R-02.pdf) | bin | 100435 -> 100435 bytes | |||
-rw-r--r-- | Semestr 4/rownania rozniczkowe/lista 3/RR1R-03.pdf (renamed from Semestr 4/rownania rozniczkowe/RR1R-03.pdf) | bin | 90514 -> 90514 bytes | |||
-rw-r--r-- | Semestr 4/sieci/wykład1.pdf | bin | 0 -> 8280250 bytes | |||
-rw-r--r-- | Semestr 4/sieci/wykład2.pdf | bin | 0 -> 5058364 bytes |
16 files changed, 81 insertions, 0 deletions
diff --git a/Semestr 4/Pstwo/L2Z11.pdf b/Semestr 4/Pstwo/L2Z11.pdf Binary files differindex 02cd896..bf6f8d3 100644 --- a/Semestr 4/Pstwo/L2Z11.pdf +++ b/Semestr 4/Pstwo/L2Z11.pdf diff --git a/Semestr 4/Pstwo/Wyklad 3.pdf b/Semestr 4/Pstwo/Wyklad 3.pdf Binary files differnew file mode 100644 index 0000000..32e902d --- /dev/null +++ b/Semestr 4/Pstwo/Wyklad 3.pdf diff --git a/Semestr 4/aisd/Lista 0/Rozw L0.pdf b/Semestr 4/aisd/Lista 0/Rozw L0.pdf Binary files differindex 7472d55..d39c13b 100644 --- a/Semestr 4/aisd/Lista 0/Rozw L0.pdf +++ b/Semestr 4/aisd/Lista 0/Rozw L0.pdf diff --git a/Semestr 4/aisd/Lista 1/Lista 1.pdf b/Semestr 4/aisd/Lista 1/Lista 1.pdf Binary files differnew file mode 100644 index 0000000..7e2f5ae --- /dev/null +++ b/Semestr 4/aisd/Lista 1/Lista 1.pdf diff --git a/Semestr 4/aisd/Wykłady/Notatka 3 - Zachłany.pdf b/Semestr 4/aisd/Wykłady/Notatka 3 - Zachłany.pdf Binary files differnew file mode 100644 index 0000000..5403789 --- /dev/null +++ b/Semestr 4/aisd/Wykłady/Notatka 3 - Zachłany.pdf diff --git a/Semestr 4/aisd/Wykłady/Notatka 4 - divide and conquer.pdf b/Semestr 4/aisd/Wykłady/Notatka 4 - divide and conquer.pdf Binary files differnew file mode 100644 index 0000000..205b505 --- /dev/null +++ b/Semestr 4/aisd/Wykłady/Notatka 4 - divide and conquer.pdf diff --git a/Semestr 4/aisd/rozw.cpp b/Semestr 4/aisd/rozw.cpp new file mode 100644 index 0000000..0b5c3ba --- /dev/null +++ b/Semestr 4/aisd/rozw.cpp @@ -0,0 +1,70 @@ +#include<bits/stdc++.h> +using namespace std; + +vector<int> v; + +int p(int n, int k, int m) { + if (k == 0 && n != 0) return 0; + if (k == 0 && n == 0) { + for (int i = 0; i < v.size(); i++) cout << v[i] << " "; + cout << "\n"; + return 1; + } + int value = 0; + for (int i = 0; i <= min(n, m); i++) { + v.push_back(i); + if (i == 25) { + cout << "ELO\n"; + } + value += p(n - i, k - 1, i); + v.pop_back(); + } + return value; +} + +int tab[30][30]; +int cnt = 0; + + +int d(int n, int k) { + if (tab[n][k] != -1) return tab[n][k]; + cout << n << " " << k << " " << ++cnt << "\n"; + if (n == 0 && k == 0) return tab[n][k] = 1; + if (k > n || k <= 0) if (k >= 0) return tab[n][k] = 0; + return tab[n][k] = d(n-1, k-1) + d(n-k, k); +} + +// int e(int n, int k) { +// if (n == 0 && k == 0) return tab[n][k] = 1; +// // if (n == 0 && k > 0) return tab[n][k] = 0; +// if (n > 0 && k <= 0) { +// if (k >= 0) +// tab[n][k] = 0; +// return 0; +// } +// if (n < 0) return 0; +// if (tab[n][k] != -1) return tab[n][k]; +// return tab[n][k] = e(n, k-1) + e(n-k, k); +// } +// DP[i][j] = max(DP[i-1][j-1], DP[i-2][j], DP[i][j - 2], DP[i][j-2]) + +int main() { + int n, k; + cin >> n >> k; + for (int i = 0; i < 30; i++) { + for (int j = 0; j < 30; j++) + tab[i][j] = -1; + } + cout << d(n,k) << "\n"; + // cout << p(n, k, n) << "\n"; + // cout << e(n,k) << "\n"; + + for (int i = 0; i < 26; i++) { + cout << i << ": "; + for (int j = 0; j < 6; j++) { + cout << tab[i][j] << " "; + } + cout << "\n"; + } + // cout << p(n, k, n) << "\n"; +}
\ No newline at end of file diff --git a/Semestr 4/ask/lista 1/ask21_lista_1.pdf b/Semestr 4/ask/lista 1/ask21_lista_1.pdf Binary files differnew file mode 100644 index 0000000..9afcd65 --- /dev/null +++ b/Semestr 4/ask/lista 1/ask21_lista_1.pdf diff --git a/Semestr 4/ask/lista 1/test.c b/Semestr 4/ask/lista 1/test.c new file mode 100644 index 0000000..0f3c11e --- /dev/null +++ b/Semestr 4/ask/lista 1/test.c @@ -0,0 +1,11 @@ +#include <stdint.h>
+#include <stdio.h>
+
+int main()
+{
+ int x;
+ short y;
+ x = -10;
+ y = (short)x;
+ printf("%d %hd", x, y);
+}
\ No newline at end of file diff --git a/Semestr 4/rownania rozniczkowe/lista 1/L1Z3.pdf b/Semestr 4/rownania rozniczkowe/lista 1/L1Z3.pdf Binary files differnew file mode 100644 index 0000000..5646667 --- /dev/null +++ b/Semestr 4/rownania rozniczkowe/lista 1/L1Z3.pdf diff --git a/Semestr 4/rownania rozniczkowe/RR1R-01.pdf b/Semestr 4/rownania rozniczkowe/lista 1/RR1R-01.pdf Binary files differindex 464de00..464de00 100644 --- a/Semestr 4/rownania rozniczkowe/RR1R-01.pdf +++ b/Semestr 4/rownania rozniczkowe/lista 1/RR1R-01.pdf diff --git a/Semestr 4/rownania rozniczkowe/lista 2/L2Z4.pdf b/Semestr 4/rownania rozniczkowe/lista 2/L2Z4.pdf Binary files differnew file mode 100644 index 0000000..bfa182a --- /dev/null +++ b/Semestr 4/rownania rozniczkowe/lista 2/L2Z4.pdf diff --git a/Semestr 4/rownania rozniczkowe/RR1R-02.pdf b/Semestr 4/rownania rozniczkowe/lista 2/RR1R-02.pdf Binary files differindex 7d1a845..7d1a845 100644 --- a/Semestr 4/rownania rozniczkowe/RR1R-02.pdf +++ b/Semestr 4/rownania rozniczkowe/lista 2/RR1R-02.pdf diff --git a/Semestr 4/rownania rozniczkowe/RR1R-03.pdf b/Semestr 4/rownania rozniczkowe/lista 3/RR1R-03.pdf Binary files differindex 22c3214..22c3214 100644 --- a/Semestr 4/rownania rozniczkowe/RR1R-03.pdf +++ b/Semestr 4/rownania rozniczkowe/lista 3/RR1R-03.pdf diff --git a/Semestr 4/sieci/wykład1.pdf b/Semestr 4/sieci/wykład1.pdf Binary files differnew file mode 100644 index 0000000..5da8f03 --- /dev/null +++ b/Semestr 4/sieci/wykład1.pdf diff --git a/Semestr 4/sieci/wykład2.pdf b/Semestr 4/sieci/wykład2.pdf Binary files differnew file mode 100644 index 0000000..edb1398 --- /dev/null +++ b/Semestr 4/sieci/wykład2.pdf |