Awesome Open Source
Awesome Open Source


CI Test codecov Codacy Badge

What is CPTH?

It's the Competitive Programming Template Headers for C++.

It's not STL: It's for competitive programming.

It's not a collection of snippets: It's a collection of templates. No modification is required, just instantiation.

It's not a library: These are single-file headers, which are more convenient for competitive programming.

It's reliable, because all headers are tested with CI tests and code coverage reports.

You can see the full list of the current headers here.

How to use?

Just paste the headers in the headers directory at the beginning of your code.

Each file has a document in the docs directory, you can read them and have a try.

The codes are based on C++11, there may be problems with other standards.


You can read for more information.

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
C Plus Plus (258,791
Cpp (258,783
Algorithms (38,058
Programming (18,570
Ci (12,747
Data Structures (10,227
Codecov (9,320
Competitive Programming (1,659
Algorithms And Data Structures (872
Single File (850
Acm (199
Acm Icpc (183
Competitive Programming Contests (123
Algorithms Implemented (118
Competitive Coding (107
Icpc (82
Oi (70
Algorithm Competitions (51
Algorithm Library (43
Competitive Programming Algorithms (19
Algorithms Implemented Cpp (3