-
Notifications
You must be signed in to change notification settings - Fork 14
/
talk.tex
218 lines (196 loc) · 6.16 KB
/
talk.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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
%\documentclass{beamer}
\documentclass[mathserif,notheorems]{beamer} % option notheorems
\usepackage[utf8]{inputenc}
\usepackage{tikz-cd}
\usepackage{tikz}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\graphicspath{{talk_images/}}
%\usetikzlibrary{graphs}
%\usetikzlibrary{graphdrawing}
%\usegdlibrary{trees}
\newcommand{\Olo}{$\mathcal{O}(\log_{2}n)$}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsmath, amsthm, amssymb, amsfonts}
\setbeamertemplate{theorems}[numbered] % to number
\theoremstyle{plain} % insert bellow all blocks you want in italic
\newtheorem{theorem}{Theorem}%[section] % to number according to section
\theoremstyle{definition} % insert bellow all blocks you want in normal text
\newtheorem*{definition}{}%[] % to number according to section
\newtheorem*{idea}{Proof idea} % no numbered block
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usetheme{Madrid}
\usecolortheme{beaver}
\setbeamertemplate{itemize items}[default]
\setbeamertemplate{enumerate items}[default]
\setbeamertemplate{section in toc}[square]
\title[ICPC Tutorial]{ICPC Tutorial}
\subtitle{Intro. to ICPC, Binary Search, DP, Graphs}
\author[Ankesh] % (optional, for multiple authors)
{
Ankesh Gupta
}
\institute[IIT D] % (optional)
{
Dept. of Computer Science and Engineering\\
Indian Institute of Technology, Delhi
}
\date[\today] % (optional)
{}
%\logo{\includegraphics[height=1.5cm]{lion-logo.png}}
\AtBeginSection[]
{
\begin{frame}
\frametitle{Table of Contents}
\tableofcontents[currentsection]
\end{frame}
}
% \AtBeginSubsection[]
% {
% \begin{frame}
% \frametitle{Table of Contents}
% \tableofcontents[
% currentsection,
% % currentsubsection,
% % subsectionstyle=show/shaded/hide
% ]
% \end{frame}
% }
\algdef{SE}[SUBALG]{Indent}{EndIndent}{}{\algorithmicend\ }%
\algtext*{Indent}
\algtext*{EndIndent}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\frame{\titlepage}
\begin{frame}
\frametitle{Table of Contents}
\tableofcontents
\end{frame}
\section{ICPC}
\begin{frame}
\begin{definition}<+->[What is ICPC?]
General introduction to competition logistics
\end{definition}
\end{frame}
\section{Binary Search}
\subsection{Why?}
\begin{frame}
\frametitle{Why?}
\begin{figure}[!htb]
\begin{subfigure}{\textwidth}
\centering
\includegraphics[width=1\textwidth]{ls.jpg}
\end{subfigure}
\end{figure}
\end{frame}
% \section{Binary Search}
\subsection{Analysing?}
\begin{frame}
\frametitle{Analysing}
\begin{definition}<+->[Complexity]
\begin{enumerate}
\item Complexity $\mathcal{O}(n)$
\item Can we exploit the structure of array?
\item Array is Ordered!
\end{enumerate}
\end{definition}
\end{frame}
\subsection{Picture is worth a 1000 words!}
\begin{frame}
\frametitle{Picture is worth a 1000 words!}
\begin{figure}[!htb]
\begin{subfigure}{\textwidth}
\centering
\includegraphics[width=1\textwidth]{binary-search-algorithm.png}
\end{subfigure}
\end{figure}
\begin{definition}<+->[Complexity]
\begin{itemize}
\item Complexity is \Olo. Intuition how many times can a number be divided by $k$ - $\mathcal{O}(\log_{k} {n})$
\end{itemize}
\end{definition}
\end{frame}
\subsection{Problems}
\begin{frame}
\frametitle{Problems}
\begin{definition}[Trivial]
\begin{itemize}
\item Find largest element less than a given element
\item Find smallest element greater than a given element
\end{itemize}
\end{definition}
\begin{definition}[Better]
\begin{itemize}
\item \href{https://tex.stackexchange.com/questions/107832/how-to-create-internet-link-in-pdf}{AGGRCOW - Aggressive cows}
\item \href{https://codeforces.com/contest/689/problem/C}{C. Mike and Chocolate Thieves}
\item Many more - \href{https://www.hackerearth.com/practice/algorithms/searching/binary-search/practice-problems/}{Hackerearth}
\item Advanced Concept: \href{https://www.hackerearth.com/practice/algorithms/searching/ternary-search/tutorial/}{Ternary Searches},\href{https://codeforces.com/blog/entry/45578}{Parallel Binary Searches}
\end{itemize}
\end{definition}
\end{frame}
\section{Dynamic Programming}
\begin{frame}
\begin{definition}[Dynamic Programming a.k.a DP]
\begin{itemize}
\item Brief introduction
\item Problem discussion
\item Ideal Tutorial: \href{https://www.topcoder.com/community/competitive-programming/tutorials/dynamic-programming-from-novice-to-advanced/}{Topcoder}
\end{itemize}
\end{definition}
\begin{definition}[Comments]
\begin{itemize}
\item Advanced Topics: \href{https://codeforces.com/blog/entry/8219}{DP Optimizations}
\item Generally easy to code, tough to spot/figure-out state
\item Can be coupled with any algorithm you know - general technique very useful in life: \href{https://codeforces.com/blog/entry/58589\#comment-422219}{Discussion}
\end{itemize}
\end{definition}
\end{frame}
\section{Graphs}
\begin{frame}
\begin{definition}[Graphs]
\begin{itemize}
\item Most beautiful! personal favourite :)
\item Brief introduction
\item Problem discussion
\end{itemize}
\end{definition}
\begin{definition}[Comments]
\begin{itemize}
\item Very useful! Immense applications!
\item Generally short codes and recursive thinking.
\item Some must know trivia - Traversals, Shortest Paths Algorithms
\item Many advanced topics: Bridges, Articulation Points, Strongly Connected Components(SCC), Heavy-Light Decomposition, Centroid Decomposition, 2-SAT and many-many more.
\end{itemize}
\end{definition}
\end{frame}
\section{Closing Remarks}
\begin{frame}
\frametitle{Closing Remarks}
\begin{itemize}
\item CP is an art!
\item Don't force it upon. Give time.
\item Don't rush to solution/editorials. Try once more! It's thinking that matters!
\item Make a good team.
\item Speed matters!
\item Everything you need is online!
\item Awesome community! Brilliant people!
\item It helps knowing CP in interview. Helps arrive at efficient solutions quickly.
\end{itemize}
\end{frame}
\begin{frame}{}
\centering \Huge
\emph{Thank You!\\}
\Huge
\emph{Questions?}
\end{frame}
% \begin{frame}
% \begin{definition}[Thank You!]
% \end{definition}
% \begin{definition}[Any questions?]
% \end{definition}
% \end{frame}
\end{document}