From eb4bc75111da45a17604fdff2f9eed0977f93dff Mon Sep 17 00:00:00 2001 From: MZuenni Date: Tue, 14 Feb 2023 16:41:24 +0100 Subject: moved more stuff --- other/other.tex | 24 ++++++++++++------------ other/stuff.cpp | 1 - 2 files changed, 12 insertions(+), 13 deletions(-) (limited to 'other') 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 set1(comp); // STL-Debugging, Compiler flags. -- cgit v1.2.3