I used to dabble in competitive programming. This repository contains my C++ solutions to various competitive programming problems from CSES and CodeForces, as well as some useful code snippets. If you are starting out in CP, maybe this can help you out.
Accepted solutions to the CSES Problem Set. Explanations to each solution are written in the code as comments.
Section | Solved | Solutions |
---|---|---|
Introductory Problems | 19/19 | Solutions |
Sorting and Searching | 28/35 | Solutions |
Dynamic Programming | 17/19 | Solutions |
Graph Algorithms | 17/36 | Solutions |
Range Queries | 0/19 | |
Tree Algorithms | 0/16 | |
Mathematics | 0/31 | |
String Algorithms | 0/17 | |
Geometry | 0/7 | |
Advanced Techniques | 0/24 | |
Additional Problems | 0/77 | |
Total | 81/300 |
Collection of my favorite CodeForces problems and solutions.
Contest | Problem | Solution |
---|---|---|
Educational Round 93 | D | Colored Rectangles |
Educational Round 84 | E | Count the Blocks |
643 (Div. 2) | C | Count Triangles |
628 (Div. 2) | D | Ehab the Xorcist |
813 (Div. 2) | D | Empty Graph |
820 (Div. 3) | F | Kirei and the Linear Function |
635 (Div. 2) | C | Linova and Kingdom |
548 (Div. 2) | E | Maximum Subsequence Value |
Educational Round 88 | E | Modular Stability |
650 (Div. 3) | E | Necklace Assembly |
Educational Round 87 | C2 | Not So Simple Polygon Embedding |
651 (Div. 2) | D | Odd-Even Subsequence |
655 (Div. 2) | D | Omkar and Circle |
638 (Div. 2) | D | Phoenix and Science |
658 (Div. 2) | C2 | Prefix Flip |
624 (Div. 3) | D | Three Integers |
Educational Round 89 | D | Two Divisors |
Educational Round 94 | D | Zagzags |