-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.tex
273 lines (203 loc) · 6.17 KB
/
main.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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
\documentclass[titlepage,landscape,a4paper,10pt]{article}
\usepackage{listings, color, fontspec, minted, setspace, titlesec, fancyhdr, dingbat, mdframed, multicol}
\usepackage{graphicx, amssymb, amsmath, textcomp, booktabs}
\usepackage[Chinese]{ucharclasses}
\usepackage[left=1.5cm, right=0.7cm, top=1.7cm, bottom=0.0cm]{geometry}
%configure the top corners
\pagestyle{fancy}
\setlength{\headsep}{0.1cm}
\rhead{Page \thepage}
\lhead{上海交通大学 Shanghai Jiao Tong University}
%configure space between the two columns
\setlength{\columnsep}{30pt}
%configure fonts
\setmonofont{Isotype}[Scale=0.8]
\newfontfamily\substitutefont{SimHei}[Scale=0.8]
\setTransitionsForChinese{\begingroup\substitutefont}{\endgroup}
%configure minted to display codes
\definecolor{Gray}{rgb}{0.9,0.9,0.9}
%remove leading numbers in table of contents
\setcounter{secnumdepth}{0}
%configure section style
%\titleformat{\section}
% {\normalfont\normalsize} % The style of the section title
% {} % a prefix
% {0pt} % How much space exists between the prefix and the title
% {\quad} % How the section is represented
\titleformat{\section}{\large}{}{0pt}{}
\titlespacing{\section}{0pt}{0pt}{0pt}
%enable section to start new page automatically
%\let\stdsection\section
%\renewcommand\section{\penalty-100\vfilneg\stdsection}
%\renewcommand\theFancyVerbLine{\arabic{FancyVerbLine}}
\renewcommand{\theFancyVerbLine}{\sffamily \textcolor[rgb]{0.5,0.5,0.5}{\scriptsize {\arabic{FancyVerbLine}}}}
\setminted[cpp]{
style=xcode,
mathescape,
linenos,
autogobble,
baselinestretch=0.9,
tabsize=2,
fontsize=\normalsize,
%bgcolor=Gray,
frame=single,
framesep=1mm,
framerule=0.3pt,
numbersep=1mm,
breaklines=true,
breaksymbolsepleft=2pt,
%breaksymbolleft=\raisebox{0.8ex}{ \small\reflectbox{\carriagereturn}}, %not moe!
%breaksymbolright=\small\carriagereturn,
breakbytoken=false,
}
\setminted[java]{
style=xcode,
mathescape,
linenos,
autogobble,
baselinestretch=1.0,
tabsize=2,
%bgcolor=Gray,
frame=single,
framesep=1mm,
framerule=0.3pt,
numbersep=1mm,
breaklines=true,
breaksymbolsepleft=2pt,
%breaksymbolleft=\raisebox{0.8ex}{ \small\reflectbox{\carriagereturn}}, %not moe!
%breaksymbolright=\small\carriagereturn,
breakbytoken=false,
}
\setminted[text]{
style=xcode,
mathescape,
linenos,
autogobble,
baselinestretch=1.0,
tabsize=2,
%bgcolor=Gray,
frame=single,
framesep=1mm,
framerule=0.3pt,
numbersep=1mm,
breaklines=true,
breaksymbolsepleft=2pt,
%breaksymbolleft=\raisebox{0.8ex}{ \small\reflectbox{\carriagereturn}}, %not moe!
%breaksymbolright=\small\carriagereturn,
breakbytoken=false,
}
%configure titles
\title{\LARGE{Dreadnought} \\[2ex] \Large{Standard Code Library} }
\date{\today}
%THE SCL BEGINS
\begin{document}
\maketitle
\begin{multicols*}{2}
\begin{spacing}{0}
\tableofcontents
\end{spacing}
\end{multicols*}
\begin{multicols}{2}
\newpage
\begin{spacing}{0.8}
\section{二维几何}
\subsection{二维几何基本操作}
\inputminted{cpp}{merge/Geo2D.cpp}
\subsection{$n\log n$ 半平面交}
\inputminted{cpp}{merge/HalfPlaneIntersection.cpp}
\subsection{三角形的心}
\inputminted{cpp}{improve/Triangle.cpp}
\subsection{圆与多边形面积交}
\inputminted{cpp}{merge/areaCT.cpp}
\subsection{圆的面积模板 ($n^2\log n$)}
\inputminted{cpp}{merge/CircleArea.cpp}
\subsection{凸包快速询问}
\inputminted{cpp}{improve/PlayWithConvex.cpp}
\subsection{Delaunay 三角剖分}
\inputminted{cpp}{improve/DelaunayTriangulation.cpp}
\section{三维几何}
\subsection{三维几何基本操作}
\inputminted{cpp}{merge/3DGeo.cpp}
\subsection{三维凸包求重心}
\inputminted{cpp}{src/三维凸包.cpp}
\subsection{求四点外界球}
\inputminted{cpp}{src/最小覆盖球.cpp}
\section{图论}
\subsection{Hungarian}
\inputminted{cpp}{improve/Hungarian.cpp}
\subsection{Hopcroft}
\inputminted{cpp}{src/Hopcroft.cpp}
\subsection{最大团}
\inputminted{cpp}{improve/MaximumClique.cpp}
\subsection{最小树形图}
\inputminted{cpp}{improve/LiuZhu.cpp}
\subsection{带花树}
\inputminted{cpp}{src/带花树.cpp}
\subsection{Dominator Tree}
\inputminted{cpp}{improve/DominatorTree.cpp}
\subsection{主流}
\inputminted{cpp}{improve/MincostFlow.cpp}
\subsection{无向图最小割}
\inputminted{cpp}{src/无向图最小割.cpp}
\section{数论}
\subsection{素数判定}
\inputminted{cpp}{src/素数判定.cpp}
\subsection{启发式分解}
\inputminted{cpp}{src/启发式分解.cpp}
\subsection{直线下整点个数}
\inputminted{cpp}{src/直线下格点统计.cpp}
\subsection{二次剩余}
\inputminted{cpp}{src/二次剩余.cpp}
\subsection{Pell 方程}
\inputminted{cpp}{src/Pell方程.cpp}
\section{代数}
\subsection{FFT}
\inputminted{cpp}{improve/FFT.cpp}
\subsection{线性规划}
\inputminted{cpp}{src/线性规划.cpp}
\subsection{Schreier-Sims}
\inputminted{cpp}{improve/SchreierSims.cpp}
\section{字符串}
\subsection{后缀数组 ( 倍增 )}
\inputminted{cpp}{src/后缀数组(nlogn).cpp}
\subsection{后缀自动机}
\inputminted{cpp}{src/后缀自动机.cpp}
\subsection{Manacher/ 扩展 KMP}
\inputminted{cpp}{merge/Manacher.cpp}
\subsection{字符串最小表示}
\inputminted{cpp}{src/字符串最小表示.cpp}
\subsection{后缀树 (With Pop Front)}
\inputminted{cpp}{improve/SuffixTree2.cpp}
\section{数据结构}
\subsection{Splay Tree}
\inputminted{cpp}{src/Splay.cpp}
\subsection{Link Cut Tree}
\inputminted{cpp}{improve/LCT.cpp}
\subsection{轻重链剖分}
\inputminted{cpp}{src/轻重链剖分.cpp}
\section{综合}
\subsection{DancingLinks}
\inputminted{cpp}{src/DancingLinks.cpp}
\subsection{日期公式}
\inputminted{cpp}{improve/日期公式.cpp}
\subsection{环状最长公共子序列}
\inputminted{cpp}{improve/CycleLongest.cpp}
\subsection{经纬度球面距离}
\inputminted{cpp}{src/经纬度求球面最短距离.cpp}
\subsection{长方体表面两点最短距离}
\inputminted{cpp}{src/长方体表面两点最短距离.cpp}
\section{其他}
\subsection{简易积分表}
\input{src/积分表.tex}
\subsection{常用结论}
\input{src/综合.tex}
\subsection{Java 读入优化}
\inputminted{java}{src/Main.java}
\subsection{Vimrc}
\inputminted{text}{src/vimrc.vim}
\end{spacing}
\end{multicols}
\newpage
\input{improve/Addon.tex}
\end{document}
%THE SCL ENDS