Coders Packet

Sample Template for Competitive Programming in C++ on CodeChef or CodeForces

By Soumak Poddar

This project contains a nicely written and formatted template that can be used by any Competitive programming website to speed-up the code and quickly use C++ STL library functions.

In this template for Competitive Programming, I have used many optimizations that will help in speeding up your code in C++ such that it passes all test cases, and also you can type your program quickly so that you can get extra points based on your time of submission similar to contests on CodeForces.

In this template, you will find all the data types are defined along with their shortcuts ex. ll for long long int so that you can speed up your typing by just writing ll instead of long long int.

This template also contains C++ STL shortcuts ex. um for unordered_map so that you can use and type them efficiently.

This template also contains Number Theory functions such as Euclid's Algorithm for GCD calculation and Prime Sieve along with its Optimised Version so that you can calculate Prime Numbers in a range or check Prime Number very quickly and efficiently.

At last, this template also contains pragma directory which will further optimize your C++ code by up to 20% more efficient.

Download project

Reviews Report

Submitted by Soumak Poddar (soumakpoddar)

Download packets of source code on Coders Packet