-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tex
199 lines (174 loc) · 7.72 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
% template
\def\maindoc{}%{{{
\documentclass[a4paper,12pt]{article}
\usepackage[UTF8]{ctex} % 支持中文
\usepackage{amsmath,graphicx,multirow}
\usepackage[left=0.5in,right=0.5in,top=1in,bottom=1in]{geometry}
\usepackage{fancybox,xcolor,times,listings,fancyhdr,titlesec}
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markright{#1}}
\renewcommand{\subsectionmark}[1]{\markright{#1}}
\fancyhf{}
\fancyfoot[C]{第 \thepage\ 页,共 \pageref{LastPage} 页}
\fancyhead[R]{\rightmark}
\fancyhead[L]{\bfseries Sshwy}
\renewcommand{\headrulewidth}{0.4pt} % 注意不用 \setlength
\renewcommand{\footrulewidth}{0pt}
\setmonofont{mononoki}
%代码设置
\lstset{ %{{{
language=c++, % the language of ,the code
%basicstyle=\ttfamily, % the size of the fonts that are used for the code
basicstyle=\fontsize{10}{10}\selectfont\ttfamily,
numbers=left, % where to put the line-numbers
numberstyle=\color{gray}, % the style that is used for the line-numbers
%stepnumber=2, % the step between two line-numbers. If it's 1, each line
% will be numbered
%numbersep=5pt, % how far the line-numbers are from the code
backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color}
showspaces=false, % show spaces adding particular underscores
showstringspaces=false, % underline spaces within strings
showtabs=false, % show tabs within strings adding particular underscores
frame=l, % adds a frame around the code
rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. commens (green here))
tabsize=2, % sets default tabsize to 2 spaces
captionpos=b, % sets the caption-position to bottom
breaklines=true, % sets automatic line breaking
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
title=\lstname, % show the filename of files included with \lstinputlisting;
% also try caption instead of title
keywordstyle=\color{blue}, % keyword style
commentstyle=\color{gray}, % comment style
stringstyle=\color{magenta}, % string literal style
escapeinside={\%*}{*)}, % if you want to add LaTeX within your code
morekeywords={*,...} % if you want to add more keywords to the set
}%}}}
%}}}
\begin{document}
\title{Algorithms for XCPC}
\author{Sshwy}
\date{\today}
\maketitle
\newpage
\pagenumbering{roman}
\tableofcontents
\newpage
\pagenumbering{arabic}
\section{提醒事项}
\begin{itemize}
\item 位运算会保留符号位,所以最好使用 unsigned
\item 左移右移如果超过(含) 64 位会 UB
\item 注意题目中对误差的描述,如果是相对误差那么输出的精度会影响正确性
\end{itemize}
\section{代码头}
\lstinputlisting[language=c++, firstline=2]{code/head.h}
\section{字符串}
\subsection{哈希}
\lstinputlisting[language=c++, firstline=2]{code/str_hash.cpp}
\subsection{KMP 算法}
\lstinputlisting[language=c++, firstline=2]{code/kmp.cpp}
\subsection{Manacher 算法}
\lstinputlisting[language=c++, firstline=2]{code/manacher.cpp}
\subsection{Z Function}
\lstinputlisting[language=c++, firstline=2]{code/z_func.cpp}
\subsection{后缀数组}
\lstinputlisting[language=c++, firstline=2]{code/sa.cpp}
\subsection{后缀自动机}
\lstinputlisting[language=c++, firstline=2]{code/sam.cpp}
\subsection{广义后缀自动机}
\lstinputlisting[language=c++, firstline=2]{code/general_sam.cpp}
\subsection{AC 自动机}
\lstinputlisting[language=c++, firstline=2]{code/ac.cpp}
\subsection{回文自动机}
\lstinputlisting[language=c++, firstline=2]{code/pam.cpp}
\section{数论与线性代数}
\subsection{EX-BSGS算法}
\lstinputlisting[language=c++, firstline=2]{code/exbsgs.cpp}
\subsection{Pollard-Rho和Miller}
\lstinputlisting[language=c++, firstline=2]{code/math.cpp}
\subsection{线性基}
\lstinputlisting[language=c++, firstline=2]{code/linear_basis2.cpp}
\lstinputlisting[language=c++, firstline=2]{code/linear_basis3.cpp}
\subsection{杜教筛}
\lstinputlisting[language=c++, firstline=2]{code/du_sieve.cpp}
\subsection{Min 25}
\lstinputlisting[language=c++, firstline=2]{code/min_25.cpp}
\subsection{Min 25 杰哥}
\lstinputlisting[language=c++, firstline=2]{code/min_25_jie.cpp}
\subsection{二次剩余 Cipolla}
\lstinputlisting[language=c++, firstline=2]{code/cipolla.cpp}
\subsection{特征多项式}
\lstinputlisting[language=c++, firstline=2]{code/characteristic_polynomial.cpp}
\subsection{中国剩余定理 \& exgcd}
\lstinputlisting[language=c++, firstline=2]{code/crt.cpp}
\subsection{类欧几里得算法}
\lstinputlisting[language=c++, firstline=2]{code/euclideanoid.cpp}
\subsection{自然数幂和}
\lstinputlisting[language=c++, firstline=2]{code/faulhaber.cpp}
\section{多项式相关}
\subsection{FFT}
\lstinputlisting[language=c++, firstline=2]{code/fft.cpp}
\subsection{NTT}
\lstinputlisting[language=c++, firstline=2]{code/ntt.cpp}
\subsection{FWT}
\lstinputlisting[language=c++, firstline=2]{code/fwt.cpp}
\subsection{全家桶}
\lstinputlisting[language=c++, firstline=2]{code/poly.cpp}
\subsection{BM 算法}
\lstinputlisting[language=c++, firstline=2]{code/bm.cpp}
\section{图论}
\subsection{EK 费用流}
\lstinputlisting[language=c++, firstline=2]{code/mcmf.cpp}
\subsection{Dinic 费用流}
\lstinputlisting[language=c++, firstline=2]{code/mcmf_dinic.cpp}
\subsection{Dinic 算法求最大流}
\lstinputlisting[language=c++, firstline=2]{code/dinic.cpp}
\subsection{朱刘算法}
\lstinputlisting[language=c++, firstline=2]{code/dmst.cpp}
\subsection{KM 算法}
\lstinputlisting[language=c++, firstline=2]{code/km.cpp}
\subsection{Tarjan SCC}
\lstinputlisting[language=c++, firstline=2]{code/tarjan_scc.cpp}
\subsection{圆方树}
\lstinputlisting[language=c++, firstline=2]{code/circle_block_tree.cpp}
\subsection{三元环、四元环计数}
\lstinputlisting[language=c++, firstline=2]{code/tri_cycle.cpp}
\subsection{欧拉回路}
\lstinputlisting[language=c++, firstline=2]{code/eular_tour.cpp}
\section{数据结构}
\subsection{左偏树}
\lstinputlisting[language=c++, firstline=2]{code/leftist.cpp}
\subsection{Splay}
\lstinputlisting[language=c++, firstline=2]{code/splay.cpp}
\subsection{非旋转Treap}
\lstinputlisting[language=c++, firstline=2]{code/FHQ_treap.cpp}
\subsection{LCT}
\lstinputlisting[language=c++, firstline=2]{code/lct.cpp}
\lstinputlisting[language=c++, firstline=2]{code/lct_jie.cpp}
\subsection{点分治}
\lstinputlisting[language=c++, firstline=2]{code/centroid_decomposition.cpp}
\subsection{笛卡尔树}
\lstinputlisting[language=c++, firstline=2]{code/cartesian_tree.cpp}
\subsection{树链剖分}
\lstinputlisting[language=c++, firstline=2]{code/heavy_light_decomposition.cpp}
\subsection{长链剖分 \& K 级祖先}
\lstinputlisting[language=c++, firstline=2]{code/kth_ancestor.cpp}
\subsection{虚树}
\lstinputlisting[language=c++, firstline=2]{code/virtual_tree.cpp}
\section{其他}
\subsection{单纯型}
\lstinputlisting[language=c++, firstline=2]{code/simplex.cpp}
\subsection{计算几何}
\lstinputlisting[language=c++, firstline=2]{code/geometry.cpp}
\subsection{欧拉序求LCA}
\lstinputlisting[language=c++, firstline=2]{code/euler_lca.cpp}
\subsection{保序回归}
\lstinputlisting[language=c++, firstline=2]{code/isot_reg.cpp}
\subsection{IO优化}
\lstinputlisting[language=c++, firstline=2]{code/io.cpp}
\subsection{Set 维护连续段}
\lstinputlisting[language=c++, firstline=2]{code/set_seg.cpp}
\subsection{高精度(二进制压位)}
\lstinputlisting[language=c++, firstline=2]{code/bigint.cpp}
\label{LastPage}
\end{document}