Online Judge Name | Category | Online Judge Link | Total Solve | Repository Link |
---|---|---|---|---|
Toph.co | Easy and Medium | Toph | 61 | Toph Easy Solutions |
Dimik Oj | Easy | Dimik OJ | 29 | Dimik OJ Solutions |
Codeforces | null | Codeforces | 0 | coming soon |
LeetCode | null | LeetCode | 0 | coming soon |
HackerRank | null | HackerRank | 0 | coming soon |
Feel free to contribute by adding solutions to unsolved problems or improving existing solutions. Just fork the repository and submit a pull request.
Happy Coding!
This repository provides a versatile C++ template for competitive programming. It includes commonly used macros, utility functions, and a structured main function for quick and efficient problem-solving. The template is designed to be easily customizable and comes with features to aid in debugging and optimization.
This template is distributed under the MIT License.
To use this template in Visual Studio Code, follow these steps:
- Clone or download this repository to your local machine.
git clone git clone https://github.com/Jakiur1234/Competitive-Programming cd Competitive-Programming
- Open Visual Studio Code.
- Go to "File" -> "Preferences" -> "User Snippets".
- Select "cpp.json" to edit the C++ snippets.
- Copy and paste the contents of
cpp_snippet.json
into thecpp.json
file. - Save the file.
- Start coding! Customize the
solve
function to implement your solutions.
SC(a)
: Read a variable from standard input.SIG()
: Ignore the remaining characters in the current line.SS(s)
: Read a string from standard input.
- Use
dbg(...)
for easy debugging when theLOCAL
macro is defined.
- Overloaded output operators for pairs and containers.
- Various commonly used utility functions for debugging and manipulation.
- Standard competitive programming main function structure with a loop for multiple test cases.
- Compiler optimization pragma for faster execution.
- A seeded random number generator for shuffling containers.
- Versatility: Easily adaptable for different problem-solving scenarios.
- Debugging Support: Integrated debugging macros for quick and easy debugging in the
LOCAL
environment. - Performance Optimization: Compiler optimization pragma for faster execution.
- Standard Structure: Follows a standard competitive programming structure for familiarity and ease of use.
- Concise Macros: Short and easy-to-remember macros for common C++ functionalities.
- Common Data Types: Convenient aliases for common data types like vectors, pairs, maps, and more.
- Math and Constants: Definitions for mathematical constants and utility functions.
- Random Number Generation: A random number generator setup for quick use in contests.
- File I/O Setup: Basic setup for efficient file I/O in contests.
Feel free to customize the template further based on your preferences and coding style.
If you have suggestions or improvements, feel free to open an issue or create a pull request.
Happy coding!