summaryrefslogtreecommitdiff
path: root/other
diff options
context:
space:
mode:
authorMZuenni <michi.zuendorf@gmail.com>2023-02-14 16:41:24 +0100
committerMZuenni <michi.zuendorf@gmail.com>2023-02-14 16:41:24 +0100
commiteb4bc75111da45a17604fdff2f9eed0977f93dff (patch)
treeffd990c0cc12a73c897a6e5c0d8216ce178a78c5 /other
parentf07738a30c46f0a277af5609a3b4c4b01674ad84 (diff)
moved more stuff
Diffstat (limited to 'other')
-rw-r--r--other/other.tex24
-rw-r--r--other/stuff.cpp1
2 files changed, 12 insertions, 13 deletions
diff --git a/other/other.tex b/other/other.tex
index a5a05b0..454cf5a 100644
--- a/other/other.tex
+++ b/other/other.tex
@@ -12,6 +12,10 @@
\sourcecode{other/pragmas.cpp}
\end{algorithm}
+\begin{algorithm}{Sonstiges}
+ \sourcecode{other/stuff.cpp}
+\end{algorithm}
+
\begin{algorithm}{Compiletime}
\begin{itemize}
\item überprüfen ob Compilezeit Berechnungen erlaubt sind!
@@ -46,20 +50,16 @@
\begin{algorithm}{Overflow-sichere arithmetische Operationen}
Gibt zurück, ob es einen Overflow gab. Wenn nicht, enthält \code{c} das Ergebnis.
\begin{expandtable}
- \begin{tabularx}{\linewidth}{|lR|}
- \hline
- Addition & \code{__builtin_saddll_overflow(a, b, &c)} \\
- Subtraktion & \code{__builtin_ssubll_overflow(a, b, &c)} \\
- Multiplikation & \code{__builtin_smulll_overflow(a, b, &c)} \\
- \hline
- \end{tabularx}
+ \begin{tabularx}{\linewidth}{|lR|}
+ \hline
+ Addition & \code{__builtin_saddll_overflow(a, b, &c)} \\
+ Subtraktion & \code{__builtin_ssubll_overflow(a, b, &c)} \\
+ Multiplikation & \code{__builtin_smulll_overflow(a, b, &c)} \\
+ \hline
+ \end{tabularx}
\end{expandtable}
\end{algorithm}
-\begin{algorithm}{Sonstiges}
- \sourcecode{other/stuff.cpp}
-\end{algorithm}
-
\begin{algorithm}{DP Optimizations}
Aufgabe: Partitioniere Array in genau $k$ zusammenhängende Teile mit minimalen Kosten:
$dp[i][j] = \min_{k<j}\{dp[i-1][k]+C[k][j]\}$. Es sei $A[i][j]$ das \emph{minimale} optimale
@@ -106,6 +106,7 @@
\textbf{Beachte bei der Ausgabe, dass die Personen im ersten Fall von $\boldsymbol{1, \ldots, n}$ nummeriert sind, im zweiten Fall von $\boldsymbol{0, \ldots, n-1}$!}
\end{algorithm}
+\clearpage
\subsection{Gemischtes}
\begin{itemize}
\item \textbf{(Minimum) Flow mit Demand \textit{d}:}
@@ -157,7 +158,6 @@
A = I + \frac{R}{2} - 1
\]
-\columnbreak
\item \textbf{Lemma von \textsc{Burnside}:}
Sei $G$ eine endliche Gruppe, die auf der Menge $X$ operiert.
Für jedes $g \in G$ sei $X^g$ die Menge der Fixpunkte bei Operation durch $g$, also $X^g = \{x \in X \mid g \bullet x = x\}$.
diff --git a/other/stuff.cpp b/other/stuff.cpp
index 81286d8..4462c3b 100644
--- a/other/stuff.cpp
+++ b/other/stuff.cpp
@@ -9,7 +9,6 @@ ios::sync_with_stdio(false);
cin.tie(nullptr);
// Set mit eigener Sortierfunktion.
-// Typ muss nicht explizit angegeben werden.
set<point2, decltype(comp)> set1(comp);
// STL-Debugging, Compiler flags.