├── .gitignore
├── makefile
├── manual.pdf
├── manual.tex
├── other
├── README.md
├── anuncieaqui-biblioteca
│ ├── .gitignore
│ ├── .hgignore
│ ├── .todo
│ ├── Makefile
│ ├── config
│ │ ├── Makefile
│ │ ├── dotemacs
│ │ ├── dotvimrc
│ │ ├── flymake.mk
│ │ ├── hashgen
│ │ └── template.cpp
│ ├── gen_hash.sh
│ ├── geometry
│ │ ├── Makefile
│ │ ├── closest_points.cpp
│ │ ├── enclosing_circle.cpp
│ │ ├── hull.cpp
│ │ ├── isect_primitives.cpp
│ │ ├── kd_tree.cpp
│ │ ├── misc_primitives.cpp
│ │ ├── point.cpp
│ │ ├── polygon_primitives.cpp
│ │ └── range_tree.cpp
│ ├── graph
│ │ ├── Makefile
│ │ ├── busacker_gowen.cpp
│ │ ├── dijkstra_sparse_fast.cpp
│ │ ├── dijkstra_sparse_small.cpp
│ │ ├── dinic.cpp
│ │ ├── edmonds_karp.cpp
│ │ ├── gabow.cpp
│ │ ├── gomory_hu.cpp
│ │ ├── heavy_light.cpp
│ │ ├── kuhn_munkres.cpp
│ │ ├── link_cut.cpp
│ │ └── scc.cpp
│ ├── math
│ │ ├── Makefile
│ │ ├── crt.cpp
│ │ ├── fft.cpp
│ │ ├── floyd.cpp
│ │ ├── frac.cpp
│ │ ├── karatsuba.cpp
│ │ ├── lis.cpp
│ │ ├── miller_rabin.cpp
│ │ ├── pollard.cpp
│ │ ├── polynomials.cpp
│ │ ├── romberg.cpp
│ │ ├── sieve.cpp
│ │ └── simplex.cpp
│ ├── string
│ │ ├── Makefile
│ │ ├── aho_corasick.cpp
│ │ ├── aho_corasick_2.cpp
│ │ ├── karkkainen.cpp
│ │ ├── manacher.cpp
│ │ └── morris_pratt.cpp
│ ├── structures
│ │ ├── Makefile
│ │ ├── bignum.cpp
│ │ ├── heap.cpp
│ │ └── treap.cpp
│ ├── tests
│ │ ├── babel.cpp
│ │ ├── babel.in
│ │ ├── babel.sol
│ │ ├── babel_stl.cpp
│ │ ├── babel_stl.in
│ │ ├── babel_stl.sol
│ │ ├── marques.cpp
│ │ ├── marques.in
│ │ ├── marques.sol
│ │ ├── run_tests.py
│ │ ├── run_tests.sh
│ │ ├── test_coverage.sh
│ │ └── test_list
│ └── tex
│ │ ├── Makefile
│ │ ├── biblioteca.pdf
│ │ ├── biblioteca.tex
│ │ ├── docs.pt_BR.pdf
│ │ ├── docs.pt_BR.tex
│ │ ├── math_facts.tex
│ │ └── mistakes.tex
├── biblioteca.pdf
├── bundle
│ ├── all.pdf
│ ├── centroids.pdf
│ ├── codigos_sueltos.pdf
│ ├── manual.pdf
│ ├── notebook_fidel.pdf
│ ├── notebook_mauricio.pdf
│ ├── notebook_uniandes.pdf
│ └── notebook_walter.pdf
├── centroids.pdf
├── codigos_sueltos
│ ├── MonsterTrap_Gaizka.java
│ ├── MonsterTrap_Gaizka.java.pdf
│ ├── all.pdf
│ ├── anas_flow.cpp
│ ├── anas_flow.cpp.pdf
│ ├── bridges.cpp
│ ├── bridges.cpp.pdf
│ ├── heavy_light_decomposition.cpp
│ ├── heavy_light_decomposition.cpp.pdf
│ ├── mcmf_walter.cpp
│ ├── mcmf_walter.cpp.pdf
│ ├── star_war_filipe_martins.cpp
│ └── star_war_filipe_martins.cpp.pdf
├── notebook_fidel.pdf
├── notebook_gaizka.lyx
├── notebook_gaizka.pdf
├── notebook_uba.pdf
├── notebook_uniandes.pdf
└── notebook_walter.pdf
├── pics
├── ancestors.1
├── ancestors.mp
├── ascii-1.eps
├── ascii-1.svg
├── ascii-2.eps
├── ascii-2.svg
├── barycenter.png
├── circumcenter.png
├── cone.tikz
├── flights.1
├── flights.mp
├── huzita.1
├── huzita.mp
├── incenter.png
├── journey.1
├── journey.mp
├── kingdom.1
├── kingdom.mp
├── lanes.1
├── lanes.mp
├── law_of_sines.png
├── makefile
├── manual-figure0.dpth
├── manual-figure0.md5
├── manual-figure0.pdf
├── orthocenter.png
├── r.bat
├── rectangle.1
├── rectangle.10
├── rectangle.100
├── rectangle.11
├── rectangle.12
├── rectangle.2
├── rectangle.3
├── rectangle.4
├── rectangle.5
├── rectangle.6
├── rectangle.7
├── rectangle.8
├── rectangle.9
├── rectangle.mp
├── reflected_point.1
├── reflected_point.2
├── reflected_point.mp
├── reflected_ray.1
└── reflected_ray.mp
└── src
├── c++
├── cout_con_precision.cpp
├── fgetws.cpp
├── io_file.cpp
└── unicode.cpp
├── combinatoria
├── highlight.sh
└── pascal_triangle.cpp
├── dp
├── lcs.cpp
├── lis.cpp
└── particion_troncos.cpp
├── estructuras
├── fenwick.cpp
├── rmq
│ ├── rmq_with_segment_tree.cpp
│ └── rmq_with_table.cpp
├── rope.cpp
├── rope_test.cpp
├── segment_tree.cpp
├── treap.cpp
└── treap_test.cpp
├── geometria
├── check_segment_intersection.cpp
├── circle_through_3_points.cpp
├── distance_point_to_line.cpp
├── distance_point_to_segment.cpp
├── grahamscan.cpp
├── great_circle_distance.cpp
├── highlight.sh
├── is_convex_polygon.cpp
├── is_inside_concave_polygon.cpp
├── is_inside_convex_polygon.cpp
├── line_line_intersection.cpp
├── minimum_enclosing_circle.cpp
├── monotonechain.cpp
├── parallelepiped_union_volume.cpp
├── polygon_area.cpp
├── rectangles_union_area.cpp
├── reflect_point.cpp
├── reflect_ray.cpp
├── segment_quadric_intersection.cpp
├── segment_segment_intersection.cpp
├── shortest_distances_in_3d.cpp
└── split_convex_polygon.cpp
├── grafos
├── bellman.cpp
├── dijkstra.cpp
├── floyd.cpp
├── ford_fulkerson.cpp
├── ford_fulkerson_sparse.cpp
├── highlight.sh
├── konig.cpp
├── kruskal.cpp
├── lca.cpp
├── maximum_bipartite_matching.cpp
├── min_cost_max_flow.cpp
├── prim.cpp
├── puntos_articulacion.cpp
└── tarjan.cpp
├── highlight.sh
├── java
├── highlight.sh
├── io_estandar.java
├── io_estandar_easy.java
├── io_file.java
├── maps_sets.java
└── priority_queue.java
├── misc
├── highlight.sh
├── josephus.cpp
├── knight_distance.cpp
├── parser_recursivo_desc.cpp
└── subsets_of_mask.cpp
├── strings
├── aho-corasick.cpp
├── dynamic_hashing.cpp
├── kmp.cpp
├── manacher.cpp
├── minimum_rotation.cpp
├── suffix_array.cpp
└── z_algorithm.cpp
├── template.cpp
└── teoria_de_numeros
├── bigmod.cpp
├── criba.cpp
├── divisores.cpp
├── highlight.sh
└── inverso_modular.cpp
/.gitignore:
--------------------------------------------------------------------------------
1 | *.lol
2 | *.out
3 | *.toc
4 | *.aux
5 | *.auxlock
6 | *.log
7 | manual.synctex.gz
8 |
--------------------------------------------------------------------------------
/makefile:
--------------------------------------------------------------------------------
1 | .PHONY: all pdf ps pics clean
2 |
3 | all: pdf
4 |
5 | pdf: manual.pdf
6 |
7 | manualpics := $(patsubst %.mp,%.1,$(wildcard pics/[a-z]*.mp))
8 |
9 | manual.pdf: manual.tex $(manualpics)
10 | pdflatex -shell-escape manual.tex
11 | pdflatex -shell-escape manual.tex
12 |
13 | pics/%.1: pics/%.mp
14 | make -C pics $(@F)
15 |
16 | clean:
17 | rm -f *.aux
18 | rm -f *.log
19 | rm -f *.dvi
20 | rm -f *.ps
21 | rm -f *.pdf
22 | make -C pics clean
23 |
--------------------------------------------------------------------------------
/manual.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhocki/notebook/5903dd4a774d829ce1df073ebd3be4cacee8e4ac/manual.pdf
--------------------------------------------------------------------------------
/other/README.md:
--------------------------------------------------------------------------------
1 | This directory contains stuff that is not in our notebook but
2 | it's still worth printing.
3 |
4 |
--------------------------------------------------------------------------------
/other/anuncieaqui-biblioteca/.gitignore:
--------------------------------------------------------------------------------
1 | .hg
2 |
--------------------------------------------------------------------------------
/other/anuncieaqui-biblioteca/.hgignore:
--------------------------------------------------------------------------------
1 | .*\.swp
2 | .*\.hash
3 | tests/.*\.bin
4 | tests/babel.out
5 | tests/babel$
6 | tests/babel_stl.out
7 | tests/babel_stl$
8 | tests/marques.out
9 | tests/marques$
10 | tests/a.out
11 | tex/.*\.aux
12 | tex/.*\.log
13 | tex/.*\.toc
14 |
--------------------------------------------------------------------------------
/other/anuncieaqui-biblioteca/.todo:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Migrar o algoritmo de Dijkstra
5 |
6 |
7 | Implementar um Maxflow decente :)
8 |
9 |
10 | Implementar um mincost maxflow usando menores caminhos sucessivos com o relabeling de Edmonds e Karp
11 |
12 |
13 | Fix the range tree
14 |
15 |
16 |
--------------------------------------------------------------------------------
/other/anuncieaqui-biblioteca/Makefile:
--------------------------------------------------------------------------------
1 | all: tex
2 |
3 | view: all
4 | evince tex/biblioteca.pdf &
5 |
6 | LIBRARY_DIRS = config geometry graph math string structures
7 | ALL_DIRS = $(LIBRARY_DIRS) tex
8 |
9 | .PHONY: $(ALL_DIRS) view
10 |
11 | $(ALL_DIRS):
12 | $(MAKE) -C $@
13 |
14 | tex: $(LIBRARY_DIRS)
15 |
16 | clean:
17 | for dir in $(ALL_DIRS); do \
18 | $(MAKE) -C $$dir clean; \
19 | done
20 |
--------------------------------------------------------------------------------
/other/anuncieaqui-biblioteca/config/Makefile:
--------------------------------------------------------------------------------
1 | FILES = .dotemacs.hash .hashgen.hash .template.cpp.hash .dotvimrc.hash .flymake.mk.hash
2 |
3 | all: $(FILES)
4 |
5 | .PHONY: clean
6 |
7 | $(FILES): .%.hash: %
8 | ../gen_hash.sh $< $@
9 |
10 | clean:
11 | rm -f $(FILES)
12 |
--------------------------------------------------------------------------------
/other/anuncieaqui-biblioteca/config/dotemacs:
--------------------------------------------------------------------------------
1 | (global-font-lock-mode t)
2 | (setq transient-mark-mode t)
3 |
4 | (global-set-key [f5] 'cxx-compile)
5 | (defun cxx-compile()
6 | (interactive)
7 | (save-buffer)
8 | (compile (concat "g++ -g -O2 -o " (file-name-sans-extension buffer-file-name)
9 | " " buffer-file-name))
10 | )
11 |
12 | (add-hook 'c++-mode-hook (lambda () (c-set-style "stroustrup")
13 | (flymake-mode t)))
14 |
--------------------------------------------------------------------------------
/other/anuncieaqui-biblioteca/config/dotvimrc:
--------------------------------------------------------------------------------
1 | syn on
2 | set nocp number ai si ts=4 sts=4 sw=4
3 | ab #i #include
4 |
--------------------------------------------------------------------------------
/other/anuncieaqui-biblioteca/config/flymake.mk:
--------------------------------------------------------------------------------
1 | check-syntax:
2 | g++ -Wall -fsyntax-only $(CHK_SOURCES)
3 |
--------------------------------------------------------------------------------
/other/anuncieaqui-biblioteca/config/hashgen:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | sed ':a;N;$!ba;s/[ \n\t]//g' | md5sum | cut -d' ' -f1
3 |
--------------------------------------------------------------------------------
/other/anuncieaqui-biblioteca/config/template.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include