Skip to content

Jakiur1234/Competitive-Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Solved Online Judge Problems

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

Contribute

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!

C++ Competitive Programming Template

Introduction

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.

License

This template is distributed under the MIT License.

Instructions

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 the cpp.json file.
  • Save the file.
  • Start coding! Customize the solve function to implement your solutions.

Usage

Input/Output Macros

  • 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.

Debugging Macros

  • Use dbg(...) for easy debugging when the LOCAL macro is defined.

Utility Functions

  • Overloaded output operators for pairs and containers.
  • Various commonly used utility functions for debugging and manipulation.

Main Function Structure

  • Standard competitive programming main function structure with a loop for multiple test cases.

Performance Optimization

  • Compiler optimization pragma for faster execution.

RNG (Random Number Generator)

  • A seeded random number generator for shuffling containers.

Advantages and Features

  • 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.

Contributing

If you have suggestions or improvements, feel free to open an issue or create a pull request.

Happy coding!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages