diff options
| author | Paul Jungeblut <paul.jungeblut@gmail.com> | 2016-10-10 21:55:09 +0200 |
|---|---|---|
| committer | Paul Jungeblut <paul.jungeblut@gmail.com> | 2016-10-10 21:55:09 +0200 |
| commit | edecc4b024ceb59b245f888f432018a4f1b7a02c (patch) | |
| tree | 384e7bafa4b2d9f196bc7135c32e1bdf7aecdb99 | |
| parent | ef7afcfd1294c873369245a940e3aa8accb67b60 (diff) | |
Typesetting other section.
| -rw-r--r-- | other/josephus2.cpp | 4 | ||||
| -rw-r--r-- | other/josephusK.cpp | 2 | ||||
| -rw-r--r-- | other/other.tex | 1 | ||||
| -rw-r--r-- | other/split.cpp | 5 | ||||
| -rw-r--r-- | tcr.pdf | bin | 253381 -> 253149 bytes |
5 files changed, 6 insertions, 6 deletions
diff --git a/other/josephus2.cpp b/other/josephus2.cpp index c0bcc2f..a973609 100644 --- a/other/josephus2.cpp +++ b/other/josephus2.cpp @@ -1,8 +1,8 @@ -int rotateLeft(int n) { // Gibt Index des letzten Überlebenden zurück, 1-basiert. +int rotateLeft(int n) { // Der letzte Überlebende, 1-basiert. for (int i = 31; i >= 0; i--) if (n & (1 << i)) { n &= ~(1 << i); break; } n <<= 1; n++; return n; -}
\ No newline at end of file +} diff --git a/other/josephusK.cpp b/other/josephusK.cpp index 8758fee..522b584 100644 --- a/other/josephusK.cpp +++ b/other/josephusK.cpp @@ -1,4 +1,4 @@ -int josephus(int n, int k) { // Gibt Index des letzten Überlebenden zurück, 0-basiert. +int josephus(int n, int k) { // Der letzte Überlebende, 0-basiert. if (n == 1) return 0; return (josephus(n - 1, k) + k) % n; }
\ No newline at end of file diff --git a/other/other.tex b/other/other.tex index a8ebdf5..3271542 100644 --- a/other/other.tex +++ b/other/other.tex @@ -60,7 +60,6 @@ $n$ Personen im Kreis, jeder $k$-te wird erschossen. \item Bipartites Matching mit Gewichten auf linken Knoten. Minimiere Matchinggewicht. Lösung: Sortiere Knoten links aufsteigend nach Gewicht, danach nutze normlen Algorithmus (\textsc{Kuhn}, Seite \pageref{kuhn}) - \item \textbf{Tobi, cool down!} \end{itemize} \subsection{Sonstiges} diff --git a/other/split.cpp b/other/split.cpp index ea7d5ff..5e3966c 100644 --- a/other/split.cpp +++ b/other/split.cpp @@ -1,4 +1,5 @@ -vector<string> split(string &s, string delim) { // Zerlegt s anhand aller Zeichen in delim. +// Zerlegt s anhand aller Zeichen in delim. +vector<string> split(string &s, string delim) { vector<string> result; char *token; token = strtok((char*)s.c_str(), (char*)delim.c_str()); while (token != NULL) { @@ -6,4 +7,4 @@ vector<string> split(string &s, string delim) { // Zerlegt s anhand aller Zeiche token = strtok(NULL, (char*)delim.c_str()); } return result; -}
\ No newline at end of file +} Binary files differ |
