diff options
| -rw-r--r-- | datastructures/datastructures.tex | 2 | ||||
| -rw-r--r-- | graph/graph.tex | 4 | ||||
| -rw-r--r-- | java/java.tex | 8 | ||||
| -rw-r--r-- | latexHeaders/commands.sty | 1 | ||||
| -rw-r--r-- | math/math.tex | 4 | ||||
| -rw-r--r-- | math/tables/twelvefold.tex | 2 | ||||
| -rw-r--r-- | other/other.tex | 10 | ||||
| -rw-r--r-- | tcr.pdf | bin | 646202 -> 482647 bytes | |||
| -rw-r--r-- | tests/test.tex | 6 |
9 files changed, 19 insertions, 18 deletions
diff --git a/datastructures/datastructures.tex b/datastructures/datastructures.tex index 761a673..200144c 100644 --- a/datastructures/datastructures.tex +++ b/datastructures/datastructures.tex @@ -122,7 +122,7 @@ \method{link}{fügt $\{x,y\}$ Kante ein}{\log(n)} \method{cut}{entfernt $\{x,y\}$ Kante}{\log(n)} \method{lca}{berechnet LCA von $x$ und $y$}{\log(n)} - \method{query}{berechnet \texttt{query} auf den Knoten des $xy$-Pfades}{\log(n)} + \method{query}{berechnet \code{query} auf den Knoten des $xy$-Pfades}{\log(n)} \method{modify}{erhöht jeden wert auf dem $xy$-Pfad}{\log(n)} \end{methods} \sourcecode{datastructures/LCT.cpp} diff --git a/graph/graph.tex b/graph/graph.tex index ab8d157..f2ad3e7 100644 --- a/graph/graph.tex +++ b/graph/graph.tex @@ -257,8 +257,8 @@ Sei $a_{ij}$ die Adjazenzmatrix von $G$ \textcolor{gray}{(mit $a_{ii} = 1$)}, da \begin{algorithm}{Dynamic Connectivity} \begin{methods} \method{Constructor}{erzeugt Baum ($n$ Knoten, $m$ updates)}{n+m} - \method{addEdge}{fügt Kannte ein,\texttt{id}=delete Zeitpunkt}{\log(n)} - \method{eraseEdge}{entfernt Kante \texttt{id}}{\log(n)} + \method{addEdge}{fügt Kannte ein,\code{id}=delete Zeitpunkt}{\log(n)} + \method{eraseEdge}{entfernt Kante \code{id}}{\log(n)} \end{methods} \sourcecode{graph/connect.cpp} \end{algorithm} diff --git a/java/java.tex b/java/java.tex index 822de74..bc656ff 100644 --- a/java/java.tex +++ b/java/java.tex @@ -16,8 +16,8 @@ \item \code{Scanner} ist sehr langsam. Nicht für lange Eingaben verwenden \end{itemize} \optional{ -\lstinputlisting{java/inputA.java} -\lstinputlisting{java/inputB.java} +\sourcecode{java/inputA.java} +\sourcecode{java/inputB.java} } \subsection{Output} @@ -27,11 +27,11 @@ \item \code{+} auf \code{String} benutzt \code{StringBuilder} $\Rightarrow$ schnell und leicht \\(bei vielen \code{+}-Operationen an unterschiedlichen Stellen doch explizit \code{StringBuilder} nutzen) \end{itemize} \optional{ -\lstinputlisting{java/output.java} +\sourcecode{java/output.java} } \optional{ \subsection{BigInteger} -\lstinputlisting{java/bigInteger.java} +\sourcecode{java/bigInteger.java} } \endgroup diff --git a/latexHeaders/commands.sty b/latexHeaders/commands.sty index dde7fa8..da78745 100644 --- a/latexHeaders/commands.sty +++ b/latexHeaders/commands.sty @@ -5,6 +5,7 @@ \fi} \newcommand{\runtime}[1]{\ensuremath{\mathcal{O}\left(#1\right)}} \newcommand{\code}[1]{\lstinline[breaklines=true]{#1}} +\let\codeSafe\lstinline \usepackage{tikz} \usetikzlibrary{angles,quotes} diff --git a/math/math.tex b/math/math.tex index 235c508..54a44f7 100644 --- a/math/math.tex +++ b/math/math.tex @@ -246,10 +246,10 @@ sich alle Lösungen von $x^2-ny^2=c$ berechnen durch: Multipliziert Polynome $A$ und $B$. \begin{itemize} \item $\deg(A \cdot B) = \deg(A) + \deg(B)$ - \item Vektoren \lstinline{a} und \lstinline{b} müssen mindestens Größe + \item Vektoren \code{a} und \code{b} müssen mindestens Größe $\deg(A \cdot B) + 1$ haben. Größe muss eine Zweierpotenz sein. - \item Für ganzzahlige Koeffizienten: \lstinline{(ll)round(real(a[i]))} + \item Für ganzzahlige Koeffizienten: \code{(ll)round(real(a[i]))} \item \emph{xor}, \emph{or} und \emph{and} Transform funktioniert auch mit \code{double} oder modulo einer Primzahl $p$ falls $p \geq 2^{\texttt{bits}}$ \end{itemize} %\lstinputlisting{math/fft.cpp} diff --git a/math/tables/twelvefold.tex b/math/tables/twelvefold.tex index b8ab56d..18d3955 100644 --- a/math/tables/twelvefold.tex +++ b/math/tables/twelvefold.tex @@ -25,7 +25,7 @@ $n! \binom{k}{n}$ \\ \hline \multicolumn{5}{|l|}{ - $[\text{Bedingung}]$: \lstinline{return Bedingung ? 1 : 0;} + $[\text{Bedingung}]$: \code{return Bedingung ? 1 : 0;} } \\ \hline \end{tabularx} diff --git a/other/other.tex b/other/other.tex index 9c71a3b..74e3ba8 100644 --- a/other/other.tex +++ b/other/other.tex @@ -86,7 +86,7 @@ Nach Erschießen der $k$-ten Person, hat der Kreis noch Größe $n-1$ und die Position des Überlebenden ist jetzt $F(n-1,k)$. Also: $F(n,k) = (F(n-1,k)+k)\%n$. Basisfall: $F(1,k) = 0$. \end{description} - \lstinputlisting{other/josephusK.cpp} + \sourcecode{other/josephusK.cpp} \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} @@ -264,16 +264,16 @@ \item Strings: \begin{itemize} - \item Soll \lstinline{"aa"} kleiner als \lstinline{"z"} sein oder nicht? + \item Soll \codeSafe{"aa"} kleiner als \codeSafe{"z"} sein oder nicht? \item bit \code{0x20} beeinflusst Groß-/Kleinschreibung. \end{itemize} \item Gleitkommazahlen: \begin{itemize} - \item \lstinline{NaN}? Evtl. ungültige Werte für mathematische Funktionen, z.B. \mbox{\lstinline{acos(1.00000000000001)}}? + \item \code{NaN}? Evtl. ungültige Werte für mathematische Funktionen, z.B. \mbox{\code{acos(1.00000000000001)}}? \item Falsches Runden bei negativen Zahlen? Abschneiden $\neq$ Abrunden! - \item genügend Präzision oder Output in wissenschaftlicher Notation (\lstinline{1e-25})? - \item Kann \lstinline{-0.000} ausgegeben werden? + \item genügend Präzision oder Output in wissenschaftlicher Notation (\code{1e-25})? + \item Kann \code{-0.000} ausgegeben werden? \end{itemize} \item Wrong Answer: Binary files differdiff --git a/tests/test.tex b/tests/test.tex index 1640f4e..08b80b3 100644 --- a/tests/test.tex +++ b/tests/test.tex @@ -7,7 +7,7 @@ Dieser Abschnitt enthält lediglich Dinge die während der Practicesession getes \item sind c++17 Feature vorhanden? \item kompiliert dieser Code: \end{itemize} -\lstinputlisting{tests/gcc5bug.cpp} +\sourcecode{tests/gcc5bug.cpp} \begin{itemize} \item funktioniert \code{\_\_int128}? \item funktionieren Pragmas? @@ -30,7 +30,7 @@ Dieser Abschnitt enthält lediglich Dinge die während der Practicesession getes \item wie werden zusätzliches Whitespacecharacter bei sonst korrektem Output behandelt? \item vergleiche ausführungszeit auf dem judge und lokal (z.b. mit Primzahl Sieb) \end{itemize} -\lstinputlisting{tests/whitespace.cpp} +\sourcecode{tests/whitespace.cpp} \subsection{Precision} \begin{itemize} @@ -41,4 +41,4 @@ Dieser Abschnitt enthält lediglich Dinge die während der Practicesession getes \item Result $0$ without excess precision (expected floating point error) \item \textasciitilde$8e^{-17}$ with excess precision (real value) \end{itemize} -\lstinputlisting{tests/precision.cpp} +\sourcecode{tests/precision.cpp} |
