-
Notifications
You must be signed in to change notification settings - Fork 3
/
vadnica-APS1-VS.tex
196 lines (162 loc) · 5.27 KB
/
vadnica-APS1-VS.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
\documentclass[a4paper,12pt]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[slovene]{babel}
\usepackage[unicode]{hyperref}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{multicol}
\usepackage{enumitem}
\setlist[itemize]{itemsep=0pt, topsep=5pt}
\setlist[enumerate]{itemsep=0pt, topsep=5pt}
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx}
\usepackage{tikz}
% fonts
\usepackage[T1]{fontenc}
%\usepackage{newpxtext,newpxmath}
\usepackage{newtxtext,newtxmath}
%\usepackage{mathptmx}
%\usepackage{palatino}
%\usepackage{pxfonts}
%\usepackage{mathpazo}
%\usepackage{kpfonts}
%\usepackage{tgpagella}
% scrbook: to have the same font in headings
\setkomafont{disposition}{\bfseries}
% Okolje za pisanje nalog
%\usepackage{exercise}
\usepackage[answerdelayed]{exercise}
\renewcommand{\ExerciseHeaderTitle}{~\textit{\ExerciseTitle}~~}
\renewcommand{\ExerciseHeaderNB}{\textsf{\textbf{\thechapter.\theExercise}}}
\renewcommand{\ExerciseHeader}{\par\noindent\ExerciseHeaderNB\ExerciseHeaderTitle}
\renewcommand{\AnswerHeader}{{\par\noindent\small\ExerciseHeaderNB}~}
\renewcommand{\AtBeginAnswer}{\footnotesize}
% Bližnjice
% exercise
\def\exe#1{\begin{Exercise}#1\end{Exercise}}
% exercise: +title
\def\exetit#1#2{\begin{Exercise}[title=#1]#2\end{Exercise}}
% exercise: +label
\def\exelbl#1#2{\begin{Exercise}[label=#1]#2\end{Exercise}}
% exercise: +title, +lable
\def\exetitlbl#1#2#3{\begin{Exercise}[title=#1,label=#2]#3\end{Exercise}}
% answer
\def\ans#1{\begin{Answer}#1\end{Answer}}
% reference to the exercise
\def\refexe#1{$\rightarrow$\ref{#1}}
% algorithm name
\def\alg#1{\quot{#1}}
% Vrste nalog - TODO:
% * zgled (naloga + rešitev + pojasnilo)
% * naloga z namigom
% * naloga z rešitvijo
% * naloga (brez dodatkov)
% * izziv (težja naloga)
% * programerska naloga
% * zanimivost (npr. Kdo je bil Evklid?)
% * raziskovalna naloga
% * "sadistična" naloga (naloga, ki pretirava z nekaterimi koncepti, npr. pointer na pointer na pointer, vendar uči "globoko" razmišljanje)
\usepackage{listings,lstautogobble}
\lstset{frame=,
language=Pascal,
aboveskip=1mm,
belowskip=1mm,
showstringspaces=false,
columns=flexible,
basicstyle={\small\ttfamily},
numbers=none,
numberstyle=\tiny\color{gray},
keywordstyle=\color{blue},
morekeywords={downto,return},
commentstyle=\color{gray},
stringstyle=\color{green},
breaklines=true,
breakatwhitespace=true,
tabsize=3,
% backgroundcolor=\color{yellow},
autogobble=true
}
\lstnewenvironment{rox}{
\lstset{
mathescape=true,
numbers=none,
tabsize=4,
basicstyle=\color{Black}\small\sffamily,
keywordstyle=\color{RoyalBlue}\small\sffamily\bfseries,
keywords={fun,is,end,if,then,else,elif,elseif,for,to,do,while,repeat,loop,return},
autogobble=true
}
}{}
% page layout
\textwidth 15cm
% % % % % % % % % % % % % % % % % % % % %
% text helpers
\def\intro#1{\textit{#1}}
\def\angl#1{(angl. #1)}
\def\vic#1{\emph{#1}}
\def\id#1{\textsf{#1}}
\def\quot#1{''#1``}
\def\code#1{\textsf{#1}}
% math helpers
\def\NN{\ensuremath{\mathbb{N}}}
\def\ZZ{\ensuremath{\mathbb{Z}}}
\def\RR{\ensuremath{\mathbb{R}}}
\def\set#1{\{#1\}}
\def\floor#1{\lfloor#1\rfloor}
\def\ceil#1{\lceil#1\rceil}
% other
\def\enumabc{\setlength{\itemsep}{0cm}\setlength{\parskip}{0cm}}
\def\yesno{\fbox{\begin{minipage}{0.5cm}\vspace{0.4cm}\hspace{0.5cm}\end{minipage}}\vspace{1pt}}
\renewcommand{\labelenumi}{\alph{enumi})}
\setlength{\parskip}{-0cm}
% % % % % % % % % % % % % % % % % % % % %
\makeatletter
\def\email#1{\gdef\@email{#1}}
\def\version#1{\gdef\@version{#1}}
\makeatother
\title{Vadnica visokih strokovnih algoritmov in podatkovnih struktur 1}
\subtitle{(delovni osnutek, samo za interno uporabo)}
\author{Jurij Mihelič}
\email{[email protected]}
\version{0}
%\dedication{ads}
\begin{document}
{ % locally disable clear double page
\let\cleardoublepage\clearpage
\maketitle
\thispagestyle{empty}
\noindent
Začenjate s prebiranjem zbirke nalog za predmet \vic{Algoritmi in podatkovne strukture} za visokošolski strokovni študijski program.
Gre za delovni osnutek, kar pomeni, da naloge pogosto niso dovolj dobro izpiljene in preverjene.
Prav tako besedilo verjetno vsebuje še veliko slovničnih in drugih napak.
Da študentom olajšam učenje snovi in opravljanje izpita, sem osnutek vseeno javno objavil. Želim vam mnogo prijetnih algoritmičnih uric.
\vfill
\noindent\rule{\textwidth}{0.4pt}\\[.5\baselineskip]
Naslov: \makeatletter\@title\makeatother\\
Različica: \makeatletter\@version\makeatother\\
Datum: \makeatletter\@date\makeatother\\[\baselineskip]
Avtor: \makeatletter\@author\makeatother\\
Elektronska pošta: \makeatletter\@email\makeatother\\[\baselineskip]
Laboratorij za algoritmiko\\
Fakulteta za računalništvo in informatiko\\
Univerza v Ljubljani\\
Večna pot 113, 1000 Ljubljana\\[\baselineskip]
\parbox{12cm}{This work is for internal purposes and is licensed under\\ Creative Commons Attribution-ShareAlike 3.0 Unported\\
(CC BY-SA 3.0).}
\hfill\includegraphics[scale=0.6]{cc-by-sa.pdf}\\[.5\baselineskip]
\noindent\rule{\textwidth}{0.4pt}\\[\baselineskip]
\clearpage
}
\makeatother
\tableofcontents
\include{problemi_in_algoritmi}
\include{zahtevnost}
\include{podatkovne_strukture}
\include{urejanja}
%\include{drevesa}
%\include{grafi}
%\include{metode_snovanja}
\include{groba_sila}
%\include{deli_in_vladaj}
%\include{pozresni_algoritmi}
\end{document}