From 7f43b8ffb8208086f37b4af0cf9e7d8de7ec8615 Mon Sep 17 00:00:00 2001 From: Franciszek Malinka Date: Mon, 15 Mar 2021 18:52:18 +0100 Subject: aktualizacja --- Semestr 4/Pstwo/L2Z11.pdf | Bin 0 -> 409088 bytes Semestr 4/Pstwo/Wyklad 3.pdf | Bin 0 -> 2970744 bytes Semestr 4/aisd/Lista 0/Rozw L0.pdf | Bin 1984913 -> 1983735 bytes Semestr 4/aisd/Lista 1/Lista 1.pdf | Bin 0 -> 810791 bytes .../Notatka 3 - Zach\305\202any.pdf" | Bin 0 -> 243598 bytes .../Notatka 4 - divide and conquer.pdf" | Bin 0 -> 326839 bytes Semestr 4/aisd/rozw.cpp | 70 +++++++++++++++++++++ Semestr 4/ask/lista 1/ask21_lista_1.pdf | Bin 0 -> 118889 bytes Semestr 4/ask/lista 1/test.c | 11 ++++ Semestr 4/rownania rozniczkowe/RR1R-01.pdf | Bin 100982 -> 0 bytes Semestr 4/rownania rozniczkowe/RR1R-02.pdf | Bin 100435 -> 0 bytes Semestr 4/rownania rozniczkowe/RR1R-03.pdf | Bin 90514 -> 0 bytes Semestr 4/rownania rozniczkowe/lista 1/L1Z3.pdf | Bin 0 -> 1210433 bytes Semestr 4/rownania rozniczkowe/lista 1/RR1R-01.pdf | Bin 0 -> 100982 bytes Semestr 4/rownania rozniczkowe/lista 2/L2Z4.pdf | Bin 0 -> 137162 bytes Semestr 4/rownania rozniczkowe/lista 2/RR1R-02.pdf | Bin 0 -> 100435 bytes Semestr 4/rownania rozniczkowe/lista 3/RR1R-03.pdf | Bin 0 -> 90514 bytes "Semestr 4/sieci/wyk\305\202ad1.pdf" | Bin 0 -> 8280250 bytes "Semestr 4/sieci/wyk\305\202ad2.pdf" | Bin 0 -> 5058364 bytes 19 files changed, 81 insertions(+) create mode 100644 Semestr 4/Pstwo/L2Z11.pdf create mode 100644 Semestr 4/Pstwo/Wyklad 3.pdf create mode 100644 Semestr 4/aisd/Lista 1/Lista 1.pdf create mode 100644 "Semestr 4/aisd/Wyk\305\202ady/Notatka 3 - Zach\305\202any.pdf" create mode 100644 "Semestr 4/aisd/Wyk\305\202ady/Notatka 4 - divide and conquer.pdf" create mode 100644 Semestr 4/aisd/rozw.cpp create mode 100644 Semestr 4/ask/lista 1/ask21_lista_1.pdf create mode 100644 Semestr 4/ask/lista 1/test.c delete mode 100644 Semestr 4/rownania rozniczkowe/RR1R-01.pdf delete mode 100644 Semestr 4/rownania rozniczkowe/RR1R-02.pdf delete mode 100644 Semestr 4/rownania rozniczkowe/RR1R-03.pdf create mode 100644 Semestr 4/rownania rozniczkowe/lista 1/L1Z3.pdf create mode 100644 Semestr 4/rownania rozniczkowe/lista 1/RR1R-01.pdf create mode 100644 Semestr 4/rownania rozniczkowe/lista 2/L2Z4.pdf create mode 100644 Semestr 4/rownania rozniczkowe/lista 2/RR1R-02.pdf create mode 100644 Semestr 4/rownania rozniczkowe/lista 3/RR1R-03.pdf create mode 100644 "Semestr 4/sieci/wyk\305\202ad1.pdf" create mode 100644 "Semestr 4/sieci/wyk\305\202ad2.pdf" (limited to 'Semestr 4') diff --git a/Semestr 4/Pstwo/L2Z11.pdf b/Semestr 4/Pstwo/L2Z11.pdf new file mode 100644 index 0000000..bf6f8d3 Binary files /dev/null and b/Semestr 4/Pstwo/L2Z11.pdf differ diff --git a/Semestr 4/Pstwo/Wyklad 3.pdf b/Semestr 4/Pstwo/Wyklad 3.pdf new file mode 100644 index 0000000..32e902d Binary files /dev/null and b/Semestr 4/Pstwo/Wyklad 3.pdf differ diff --git a/Semestr 4/aisd/Lista 0/Rozw L0.pdf b/Semestr 4/aisd/Lista 0/Rozw L0.pdf index 7472d55..d39c13b 100644 Binary files a/Semestr 4/aisd/Lista 0/Rozw L0.pdf and b/Semestr 4/aisd/Lista 0/Rozw L0.pdf differ diff --git a/Semestr 4/aisd/Lista 1/Lista 1.pdf b/Semestr 4/aisd/Lista 1/Lista 1.pdf new file mode 100644 index 0000000..7e2f5ae Binary files /dev/null and b/Semestr 4/aisd/Lista 1/Lista 1.pdf differ diff --git "a/Semestr 4/aisd/Wyk\305\202ady/Notatka 3 - Zach\305\202any.pdf" "b/Semestr 4/aisd/Wyk\305\202ady/Notatka 3 - Zach\305\202any.pdf" new file mode 100644 index 0000000..5403789 Binary files /dev/null and "b/Semestr 4/aisd/Wyk\305\202ady/Notatka 3 - Zach\305\202any.pdf" differ diff --git "a/Semestr 4/aisd/Wyk\305\202ady/Notatka 4 - divide and conquer.pdf" "b/Semestr 4/aisd/Wyk\305\202ady/Notatka 4 - divide and conquer.pdf" new file mode 100644 index 0000000..205b505 Binary files /dev/null and "b/Semestr 4/aisd/Wyk\305\202ady/Notatka 4 - divide and conquer.pdf" differ 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 +using namespace std; + +vector 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 new file mode 100644 index 0000000..9afcd65 Binary files /dev/null and b/Semestr 4/ask/lista 1/ask21_lista_1.pdf differ 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 +#include + +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/RR1R-01.pdf b/Semestr 4/rownania rozniczkowe/RR1R-01.pdf deleted file mode 100644 index 464de00..0000000 Binary files a/Semestr 4/rownania rozniczkowe/RR1R-01.pdf and /dev/null differ diff --git a/Semestr 4/rownania rozniczkowe/RR1R-02.pdf b/Semestr 4/rownania rozniczkowe/RR1R-02.pdf deleted file mode 100644 index 7d1a845..0000000 Binary files a/Semestr 4/rownania rozniczkowe/RR1R-02.pdf and /dev/null differ diff --git a/Semestr 4/rownania rozniczkowe/RR1R-03.pdf b/Semestr 4/rownania rozniczkowe/RR1R-03.pdf deleted file mode 100644 index 22c3214..0000000 Binary files a/Semestr 4/rownania rozniczkowe/RR1R-03.pdf and /dev/null differ diff --git a/Semestr 4/rownania rozniczkowe/lista 1/L1Z3.pdf b/Semestr 4/rownania rozniczkowe/lista 1/L1Z3.pdf new file mode 100644 index 0000000..5646667 Binary files /dev/null and b/Semestr 4/rownania rozniczkowe/lista 1/L1Z3.pdf differ diff --git a/Semestr 4/rownania rozniczkowe/lista 1/RR1R-01.pdf b/Semestr 4/rownania rozniczkowe/lista 1/RR1R-01.pdf new file mode 100644 index 0000000..464de00 Binary files /dev/null and b/Semestr 4/rownania rozniczkowe/lista 1/RR1R-01.pdf differ diff --git a/Semestr 4/rownania rozniczkowe/lista 2/L2Z4.pdf b/Semestr 4/rownania rozniczkowe/lista 2/L2Z4.pdf new file mode 100644 index 0000000..bfa182a Binary files /dev/null and b/Semestr 4/rownania rozniczkowe/lista 2/L2Z4.pdf differ diff --git a/Semestr 4/rownania rozniczkowe/lista 2/RR1R-02.pdf b/Semestr 4/rownania rozniczkowe/lista 2/RR1R-02.pdf new file mode 100644 index 0000000..7d1a845 Binary files /dev/null and b/Semestr 4/rownania rozniczkowe/lista 2/RR1R-02.pdf differ diff --git a/Semestr 4/rownania rozniczkowe/lista 3/RR1R-03.pdf b/Semestr 4/rownania rozniczkowe/lista 3/RR1R-03.pdf new file mode 100644 index 0000000..22c3214 Binary files /dev/null and b/Semestr 4/rownania rozniczkowe/lista 3/RR1R-03.pdf differ diff --git "a/Semestr 4/sieci/wyk\305\202ad1.pdf" "b/Semestr 4/sieci/wyk\305\202ad1.pdf" new file mode 100644 index 0000000..5da8f03 Binary files /dev/null and "b/Semestr 4/sieci/wyk\305\202ad1.pdf" differ diff --git "a/Semestr 4/sieci/wyk\305\202ad2.pdf" "b/Semestr 4/sieci/wyk\305\202ad2.pdf" new file mode 100644 index 0000000..edb1398 Binary files /dev/null and "b/Semestr 4/sieci/wyk\305\202ad2.pdf" differ -- cgit v1.2.3