Skip to content

Commit 48c93d3

Browse files
committed
merged
2 parents 318d7bc + 65f83c9 commit 48c93d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+89
-83
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ To build KACTL, type `make kactl` (or `make fast`) on a \*NIX machine -- this wi
3737
kactl.pdf is to be kept to 25 pages + cover page.
3838
Occasionally the generated kactl.pdf is committed to the repo for convenience, but not too often because it makes git operations slower.
3939

40-
Before printing KACTL for an official contest, you may want to locally change the arguments to `\team`, `\contest`, etc. in build/kactl.tex to something more fitting.
40+
Before printing KACTL for an official contest, you may want to locally change the arguments to `\team`, `\contest`, etc. in build/kactl.tex to something more fitting,
41+
You may also enable colored syntax highlighting in the same file.
4142

4243
To upstream your changes, [send a pull request](https://help.github.com/articles/fork-a-repo/).
4344

build/kactl.tex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@
66
\team{Omogen Heap}{Simon Lindholm, Johan Sannemo, Mårten Wiman}
77
% \contest{ACM-ICPC World Finals 2017}{May 24, 2017}
88
\contest{\ }{\today}
9+
% \enablecolors
910

1011
\begin{document}
1112
\maketeampage
1213
% Small KACTL header on the first page:
1314
% \maketitle{``One Last Time'' Edition}{\today}
1415
\begin{multicols*}{3}
15-
\setcounter{tocdepth}{0}
1616
\thispagestyle{fancy}
17+
% Table of contents, without subsections:
18+
\setcounter{tocdepth}{0}
19+
\tableofcontents
20+
1721
\kactlchapter{contest}
1822
\kactlchapter{math}
1923
\kactlchapter{data-structures}

build/kactlpkg.sty

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,16 @@
3939
\def\@unilogo{#3}
4040
}
4141

42+
\newcommand{\enablecolors}{
43+
\lstset{commentstyle=\color{darkgray}\normalfont\itshape}
44+
\lstset{keywordstyle=\color{myblue}}
45+
\lstset{identifierstyle=\color{black}}
46+
}
47+
4248
% Some default config
4349
\subtitle{{\tiny new}KACTL}
4450
\title{KTH ACM Contest Template Library}
51+
\newcommand{\PDFColor}{0}
4552

4653
\def\today{\number\year-\ifthenelse{\number\month<10}{0}{}\number\month-\ifthenelse{\number\day<10}{0}{}\number\day} % Defines \today as YYYY-MM-DD
4754

@@ -158,6 +165,9 @@
158165
}
159166
\renewcommand*{\tilde}{\raise.17ex\hbox{$\scriptstyle\mathtt{\sim}$}}
160167

168+
\definecolor{mygreen}{HTML}{007000}
169+
\definecolor{myblue}{HTML}{0000dd}
170+
161171
% Configure source code listings
162172
\lstset{language=C++}
163173
\lstset{morekeywords={alignas,alignof}}

content/contest/.vimrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set cin aw ai is ts=4 sw=4 tm=50 nu noeb bg=dark ru cul
22
sy on | im jk <esc> | im kj <esc> | no ; :
3-
" Select region and then type :H to hash your selection.
4-
" Useful for verifying that there aren't mistypes
5-
cmap H w !cpp -P -fpreprocessed \| tr -d '[:space:]' \
6-
\| md5sum \| cut -c1-6
3+
" Select region and then type :Hash to hash your selection.
4+
" Useful for verifying that there aren't mistypes.
5+
ca Hash w !cpp -dD -P -fpreprocessed \| tr -d '[:space:]' \
6+
\| md5sum \| cut -c-6

content/contest/hash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Hashes a file, ignoring all whitespace and comments. Use for
22
# verifying that code was correctly typed.
3-
cpp -P -fpreprocessed | tr -d '[:space:]' | md5sum | cut -c1-6
3+
cpp -dD -P -fpreprocessed | tr -d '[:space:]'| md5sum |cut -c-6

fuzz-tests/ft2d.cpp renamed to fuzz-tests/data-structures/FenwickTree2d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ typedef long long ll;
1010
typedef pair<int, int> pii;
1111
typedef vector<int> vi;
1212

13-
#include "../content/data-structures/FenwickTree2d.h"
13+
#include "../../content/data-structures/FenwickTree2d.h"
1414

1515
int main() {
1616
rep(it,0,1000000) {

fuzz-tests/lazy-segment-tree.cpp renamed to fuzz-tests/data-structures/LazySegmentTree.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ typedef long long ll;
1010
typedef pair<int, int> pii;
1111
typedef vector<int> vi;
1212

13-
#include "../content/data-structures/LazySegmentTree.h"
14-
// #include "../content/data-structures/old.h"
13+
#include "../../content/data-structures/LazySegmentTree.h"
14+
// #include "../../content/data-structures/old.h"
1515

1616
static unsigned R;
1717
int ra() {

fuzz-tests/line-container.cpp renamed to fuzz-tests/data-structures/LineContainer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ typedef long long ll;
1010
typedef pair<int, int> pii;
1111
typedef vector<int> vi;
1212

13-
#include "../content/data-structures/LineContainer.h"
13+
#include "../../content/data-structures/LineContainer.h"
1414

1515
namespace other {
1616
// source: https://github.com/niklasb/contest-algos/blob/master/convex_hull/dynamic.cpp

fuzz-tests/link-cut.cpp renamed to fuzz-tests/data-structures/LinkCutTree.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ typedef long long ll;
1010
typedef pair<int, int> pii;
1111
typedef vector<int> vi;
1212

13-
#include "../content/graph/LinkCutTree.h"
14-
#include "../content/data-structures/UnionFind.h"
13+
#include "../../content/graph/LinkCutTree.h"
14+
#include "../../content/data-structures/UnionFind.h"
1515

1616
int main() {
1717
int s = (int)time(0);

fuzz-tests/rmq.cpp renamed to fuzz-tests/data-structures/RMQ.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ typedef long long ll;
99
typedef pair<int, int> pii;
1010
typedef vector<int> vi;
1111

12-
#include "../content/data-structures/RMQ.h"
12+
#include "../../content/data-structures/RMQ.h"
1313

1414
int main() {
1515
srand(2);

0 commit comments

Comments
 (0)