Small fixes

This commit is contained in:
Antti H S Laaksonen 2017-02-22 21:15:48 +02:00
parent 71ad21d6fb
commit 8003a2595a
2 changed files with 23 additions and 23 deletions

View File

@ -398,7 +398,7 @@ because it is possible that the values should
be equal but they are not because of rounding. be equal but they are not because of rounding.
A better way to compare floating point numbers A better way to compare floating point numbers
is to assume that two numbers are equal is to assume that two numbers are equal
if the difference between them is $\varepsilon$, if the difference between them is less than $\varepsilon$,
where $\varepsilon$ is a small number. where $\varepsilon$ is a small number.
In practice, the numbers can be compared In practice, the numbers can be compared
@ -847,7 +847,7 @@ $\lfloor \log_2(123)+1 \rfloor = 7$.
\subsubsection{IOI} \subsubsection{IOI}
The International Olympiad in Informatics (IOI) \cite{ioi} The International Olympiad in Informatics (IOI) \cite{ioi}
is an annual programming contests for is an annual programming contest for
secondary school students. secondary school students.
Each country is allowed to send a team of Each country is allowed to send a team of
four students to the contest. four students to the contest.

View File

@ -252,16 +252,16 @@ there are two possible solutions to the problem:
\begin{tikzpicture}[scale=.65] \begin{tikzpicture}[scale=.65]
\begin{scope} \begin{scope}
\draw (0, 0) grid (4, 4); \draw (0, 0) grid (4, 4);
\node at (1.5,3.5) {$K$}; \node at (1.5,3.5) {\symqueen};
\node at (3.5,2.5) {$K$}; \node at (3.5,2.5) {\symqueen};
\node at (0.5,1.5) {$K$}; \node at (0.5,1.5) {\symqueen};
\node at (2.5,0.5) {$K$}; \node at (2.5,0.5) {\symqueen};
\draw (6, 0) grid (10, 4); \draw (6, 0) grid (10, 4);
\node at (6+2.5,3.5) {$K$}; \node at (6+2.5,3.5) {\symqueen};
\node at (6+0.5,2.5) {$K$}; \node at (6+0.5,2.5) {\symqueen};
\node at (6+3.5,1.5) {$K$}; \node at (6+3.5,1.5) {\symqueen};
\node at (6+1.5,0.5) {$K$}; \node at (6+1.5,0.5) {\symqueen};
\end{scope} \end{scope}
\end{tikzpicture} \end{tikzpicture}
@ -289,10 +289,10 @@ the backtracking algorithm are as follows:
\draw (3, -6) grid (7, -2); \draw (3, -6) grid (7, -2);
\draw (9, -6) grid (13, -2); \draw (9, -6) grid (13, -2);
\node at (-9+0.5,-3+0.5) {$Q$}; \node at (-9+0.5,-3+0.5) {\symqueen};
\node at (-3+1+0.5,-3+0.5) {$Q$}; \node at (-3+1+0.5,-3+0.5) {\symqueen};
\node at (3+2+0.5,-3+0.5) {$Q$}; \node at (3+2+0.5,-3+0.5) {\symqueen};
\node at (9+3+0.5,-3+0.5) {$Q$}; \node at (9+3+0.5,-3+0.5) {\symqueen};
\draw (2,0) -- (-7,-2); \draw (2,0) -- (-7,-2);
\draw (2,0) -- (-1,-2); \draw (2,0) -- (-1,-2);
@ -304,14 +304,14 @@ the backtracking algorithm are as follows:
\draw (-1, -12) grid (3, -8); \draw (-1, -12) grid (3, -8);
\draw (4, -12) grid (8, -8); \draw (4, -12) grid (8, -8);
\draw[white] (11, -12) grid (15, -8); \draw[white] (11, -12) grid (15, -8);
\node at (-11+1+0.5,-9+0.5) {$Q$}; \node at (-11+1+0.5,-9+0.5) {\symqueen};
\node at (-6+1+0.5,-9+0.5) {$Q$}; \node at (-6+1+0.5,-9+0.5) {\symqueen};
\node at (-1+1+0.5,-9+0.5) {$Q$}; \node at (-1+1+0.5,-9+0.5) {\symqueen};
\node at (4+1+0.5,-9+0.5) {$Q$}; \node at (4+1+0.5,-9+0.5) {\symqueen};
\node at (-11+0+0.5,-10+0.5) {$Q$}; \node at (-11+0+0.5,-10+0.5) {\symqueen};
\node at (-6+1+0.5,-10+0.5) {$Q$}; \node at (-6+1+0.5,-10+0.5) {\symqueen};
\node at (-1+2+0.5,-10+0.5) {$Q$}; \node at (-1+2+0.5,-10+0.5) {\symqueen};
\node at (4+3+0.5,-10+0.5) {$Q$}; \node at (4+3+0.5,-10+0.5) {\symqueen};
\draw (-1,-6) -- (-9,-8); \draw (-1,-6) -- (-9,-8);
\draw (-1,-6) -- (-4,-8); \draw (-1,-6) -- (-4,-8);
@ -368,7 +368,7 @@ and the arrays \texttt{r2} and \texttt{r3}
keep track of the diagonals. keep track of the diagonals.
It is not allowed to add another queen to a It is not allowed to add another queen to a
column or diagonal that already contains a queen. column or diagonal that already contains a queen.
For example, the rows and the diagonals of For example, the rows and diagonals of
the $4 \times 4$ board are numbered as follows: the $4 \times 4$ board are numbered as follows:
\begin{center} \begin{center}