Skip to content

Commit 4c15d81

Browse files
docs(readme): project readme rewrite
1 parent 9dc608d commit 4c15d81

File tree

1 file changed

+100
-5
lines changed

1 file changed

+100
-5
lines changed

README.md

Lines changed: 100 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,104 @@
1-
# C++ Competitive Programming Library
1+
<h1>
2+
<p align="center">
3+
C++ Competitive Programming Library
4+
</h1>
5+
<p align="center">
6+
<a href="#about">About</a> •
7+
<a href="#getting-started">Getting Started</a> •
8+
<a href="#Milestones">Milestones</a>
9+
</p>
10+
</p>
211

3-
A C++ template library designed for my own personal use in Competitive Programming Competitions. Each code snippet
4-
from this repo, meaning individual functions and classes, are designed to be able to be used outside of this static
5-
library environment. As Competitive Programming often involves submitting a single file this library needs to support
6-
that.
12+
## About
13+
14+
This is my personal C++ library designed specifically for competitive programming. It contains a variety
15+
of data structures, algorithms, and other utilities commonly used in competitive programming. Each component
16+
of this library is designed to be drop-in-usable—no setup or external dependencies required. The entire
17+
library is designed to have sections that are copy-pasteable into a single file for contest submission.
18+
19+
## Getting Started
20+
21+
Since the core idea of this library is to copy paste sections from it into your own code I recommend
22+
having a local copy of the library in an easy to access location:
23+
24+
```bash
25+
git clone https://github.com/BrandonPacewic/CompetitiveProgramming
26+
```
27+
28+
From there you can:
29+
30+
1. Directly copy code from `cpl/inc` and `cpl/src` into your own code.
31+
2. Include them locally in your own code for local practice.
32+
3. Test against the provided test cases in `test/` for your own algorithm development.
33+
34+
> [!NOTE]
35+
> Additional instructions and support for importing the library and using the test cases is
36+
> planed to be added in the future.
37+
38+
## Milestones
39+
40+
As will every single one of my projects, this is still very much a work in progress. The following is a list
41+
of goals I have for this project before I'm truly happy with it, in no particular order:
42+
43+
| # | Goal | Status |
44+
| :-: | --------------------------------------------------------- | :----: |
45+
| 1 | Refactor old code to match current standards | ⚠️ |
46+
| 2 | Full test coverage | ⚠️ |
47+
| 3 | Performance with supporting benchmarks | ⚠️ |
48+
| 4 | Codebase Atomizer ||
49+
| 5 | Full implementation of the CPH | ❌️ |
50+
51+
A more detailed description of each goal can be found below:
52+
53+
#### Refactor Old Code to Match Current Standards
54+
55+
This is my longest standing project in terms of the initial creation date. As such, the earlier code does
56+
not reflect my current standards. One of the current goals is to revise such code to improve quality.
57+
58+
> [!WARNINg]
59+
> I find the structure of the code in this repository to be quite volatile. I have probably re-written some
60+
> of the algorithms 10+ times. If something doesn't look quite right, it probably isn't.
61+
62+
#### Full Test Coverage
63+
64+
While this library is designed to be used in competitive programming, where tests written in this repository
65+
obviously won't be carried over. There still should be total test coverage this includes copies of various
66+
programming problems that I have used sections of this library to solve.
67+
68+
#### Performance with Supporting Benchmarks
69+
70+
In the spirit of competitive programming, while solving the problem is the main goal, performance is also
71+
a key component. Benchmarks should back up various design decisions when it comes to how I have chosen to
72+
structure and implement various key algorithms and data structures.
73+
74+
> [!NOTE]
75+
> While I do want 100% test coverage, I'm less concerned about benchmarks. Benchmarks will be added
76+
> as I find them necessary to support design decisions.
77+
78+
#### Codebase Atomizer
79+
80+
The *Atomizer* is a tool used to break down the codebase into smaller, more manageable pieces, that can be
81+
retrieved quickly. For example, if you want to use a specific function, say `output_container` to keep things
82+
simple. You can use the *Atomizer* output to retrieve that specific function via a file lookup, `output_container.cpp`.
83+
You can also use any supporting tool you want to pase that file buffer directly inline into your code. Rather than
84+
opening the container header file and copying the specific lines from the file that you need. This will also work
85+
with more complex algorithms that may require an additional data structure to function. For example, if you want to
86+
use Kruskal's algorithm, you can use the *Atomizer* to retrieve the `kruskal.cpp` file which will include the
87+
supporting `DisjointSet` class used within the algorithm. Again resolving you of finding the specific lines of code
88+
within the header file that you need.
89+
90+
#### Full Implementation of the CPH (Competitive Programming Handbook)
91+
92+
The [*Competitive Programming Handbook*]() by Antti Laaksonen is a awesome, all in one, resource for
93+
everything competitive programming. It contains everything from compiling and reading input to sweep line
94+
algorithms including convex hulls. Its an eventual goal of mine to fully implement all the algorithms outlined
95+
in the book. This has the added benefit of an *complete* documentation source of all the algorithms in this
96+
library. This is a long term goal and will likely take a while to complete.
97+
98+
> [!NOTE]
99+
> This is my end game goal for this project. When its completed I will consider this project *done* as so far
100+
> as it will no longer be a major work in progress for me personally. I will still add things here and there
101+
> and work on it when I'm compelled to do so but the core goals of this project will be officially complete.
7102
8103
## License
9104

0 commit comments

Comments
 (0)