0% found this document useful (0 votes)
220 views

A Guide To Competitive Programming

This document provides resources for learning graph theory and practicing graph algorithms. It includes articles, video resources and practice problems on topics like shortest paths, minimum spanning trees, Euler tours, diameter of trees, topological sorting, strongly connected components, and 2SAT. Contact information is provided for those with questions. The goal is to help participants learn graph theory over 15 days to solve graph problems in competitive programming contests.

Uploaded by

Pushkar Paranjpe
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
220 views

A Guide To Competitive Programming

This document provides resources for learning graph theory and practicing graph algorithms. It includes articles, video resources and practice problems on topics like shortest paths, minimum spanning trees, Euler tours, diameter of trees, topological sorting, strongly connected components, and 2SAT. Contact information is provided for those with questions. The goal is to help participants learn graph theory over 15 days to solve graph problems in competitive programming contests.

Uploaded by

Pushkar Paranjpe
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Prerequisite(7 Days)

1. Create an Account on Codeforces, HackerEarth, Codechef. Update full name,


college name.
2. Any programming language. (C++ preferred for Competitive Programming).
3. STL (Required before starting Competitive Programming)
a. The C++ Standard Template Library (STL)
b. Structure/Class: link link
c. Pair: link
d. Vector: link link
e. queue: link link
f. Deque: link link
g. Stack: link link
h. Map link
i. Unordered_map(along with custom hash function) link link
j. Set link
k. unordered_set link
l. Multiset link
m. Priority queue (along with custom comparator) link link
n. Sort (along with custom comparator) link link
o. Policy based Data Structure link (Optional)
4. Buffer, Fast I/O
5. Video Tutorial :
a. STL by Rachit Jain
6. Contact Person in case of any doubt:
a. Mehul Bhutalia (7898988724)
b. Shivam Sharma (9981941446)
c. Arjan Bal (9479383902)
7. Date & Time of the Contest:
No Contest Required.

Contest 1: Number Theory (15 Days)


Articles:
1. Primality Test Part 1 Part 2
2. Sieve of Eratosthenes , Segmented Sieve
3. Factorization using sieve
4. Binary Exponentiation , Matrix Exponentiation
5. Euclid Algorithm
6. Modular Arithmetic
7. Modulo Multiplicative Inverse
8. Euler's Totient Function
9. linear-recurrence-relation
10. pigeonhole-principle
11. Inclusion-exclusion-principle
12. Chinese Remainder Theorem

Number Theory Complete Playlist : CodeNCode


Number Theory Articles : CP-algorithms

Video Resources:
1. Primality Test
2. Sieve of Eratosthenes , Segmented Sieve
3. Prime Factorization , Factorization using sieve
4. Binary Exponentiation , Matrix Exponentiation
5. Euclid Algorithm
6. Modular Arithmetic Part 1, Part 2
7. Modulo Multiplicative Inverse
8. Euler's Totient Function Part 1, Part 2

Questions:
1. AMR11E
2. PRIME1
3. AMR10C
4. NDIVPHI
5. CPRIME
6. NFACTOR
7. Recursive Subsequence
8. HOLI
9. Sereja and LCM
10. Tavas and SaDDas
11. JULKA

Checkout this video for more problems Love Babbar

UPD: hackerearth : short and precise resource to go through.

Contact Person:
● Vishal Babani (8949114038)
● Deeksha Agrawal (9650212434)
Contest 2: Bit Manipulation, Binary search, Strings
(15 Days)

Bit Manipulation

Articles:
1. Basics of Bit Manipulation
2. Beginner guide for Bit Manipulation
3. Competitive Programming Tricks for Bit Manipulation
4. Tactics of Bit Manipulation part 1
5. Tactics of Bit Manipulation part 2

Video Resources:
1. Errichto Tutorial on Bitwise Operators
2. Gaurav Sen Advanced Bit manipulation
3. Basic Bit Question tutorials

Questions:
1. Hihi and Crazy Bits
2. Cyclic Shifts
3. REV4
4. AISH AND XOR
5. Xor Rectangle
6. DAND
7. RGND

Playlist for Bit Manipulation : CodeNCode

Binary Search

Articles:
1. Tutorialspoint
2. Topcoder tutorial
3. Hackerearth - Binary Search
4. Hackerearth - Ternary Search

Video Resources:
1. Errichto's tutorial on Binary Search
2. Codeforces EDU - Binary Search (Recommended)
Questions:
1. CF - 706B
2. CF - 492B
3. CF - 812C
4. LC - 1 (Medium)
5. LC - 2 (Medium)

Strings

Articles:
1. Basics of Hashing
2. Stls for strings
3. SampleExamples for Hashing
4. Rolling Hash and 8 interesting problems
5. Prefix Function
6. Z-Function
7. Trie implementation without pointers
8. cp-algorithms

Video Resources:
1. KMP by Tushar Roy
2. Rabin Karp by Tushar Roy
3. Prefix Function by Fluent Algorithms
4. Z-Function by Tushar Roy
5. Manacher’s Algorithm by Tushar Roy
6. Trie by Tushar Roy
7. Suffix Array by ITMO Academy (advanced)

Questions:
1. Binary - Leetcode
2. Swaps - Leetcode
3. 1326D1 - codeforces
4. 1326D2 - codeforces
5. STRING - spoj
6. ECAUG-208 - codechef

Contact Person:
➢ Kalyan (7013976078)
➢ Dinesh (8179515709)
➢ Srinivas (8555882751)
➢ K manoj (9398808553)
Contest 3: Dynamic Programming (15 Days)

Basics (Scope of the contest)

Articles:
1. Introduction
2. Steps to approach DP problems
3. Tabulation (Iteration) vs Memoization (Recursion)
4. 2D DP - Tabulation | Memoization
5. Some Space Optimized Examples - Fibonacci (Method 3) | 0-1 Knapsack | LCS
6. State Space Reduction Example
7. DP from Novice to Advanced
8. Bitmask DP
9. SOS DP
10. DIGIT DP

Video Resources:
1. MIT OCW videos by Erik Demaine Highly recommended for beginners to build a solid
foundation. Requires some patience though.
2. Errichto 3 small videos, covering some classical DP problems.

Questions:
1. Classical DP : UGLY | STAIR | TILE | COIN CHANGE | LCS | LIS | KNAPSACK |
SUBSET SUM | MAXIMUM SQUARE SUB-MATRIX | MIN COST PATH | MIN
JUMPS | DECODE | MATRIX CHAIN MULTIPLICATION
2. Minimum Initial Points to Reach Destination
3. Lucky Draw
4. MDOLLS
5. ALTARAY
6. AIBOHP
7. DBOY
8. Bitmask DP : Unique Cap | FISH
9. SOS DP : Practice problems are given in this article itself.
10. DIGIT DP : LINK1 | LINK2

Advanced (To become an LGM)

Articles (In increasing order of difficulty)


1. Matrix Exponentiation : This is one of the easiest and most flexible ways to speed up
linear recurrences.
2. Some Cool DP Tricks : A nice article with tricks to tackle certain special types of
questions.
3. Convex Hull Optimization : An optimization technique which is pretty common in
competitions. Highly recommended to add its implementation to your coding library
as it’s a little hard to implement bug free. Have a look at this before watching.
4. Divide and Conquer Optimization : An optimization technique that occasionally shows
up in contests. Really easy to implement and reduces one N to log(N) in the
complexity.
5. Fastest ways to solve linear recurrences : WARNING- This is super ultra pro max.
The theory is a bit hard to grasp without understanding of generating functions and fft
(basics of convolution). It is only useful to solve the last few problems in long
contests.

Contact Person:
● Arjan Bal (9479383902)
● Chirag Jindal (9411875266)
Contest 4: Graph Theory (15 Days)
Articles and Video Resources:

1. Prerequisites
a. Heap & Priority queue Link2
b. BFS
c. DFS

2. Shortest path
a. Dijkstra Link2
b. Bellman Ford
c. Floyd Warshall
d. 0-1 BFS

3. Minimum Spanning Tree


a. Kruskal
b. Prims
c. Link 2

4. Euler Tour
a. Link 1

5. Diameter of a Tree
a. Link 1
b. Proof and detailed explanation (Video)

6. Topological Sort
a. Link 1
b. Link 2

7. DFS Tree
a. Articulation Points
i. Link 1
ii. Link 2
iii. Link 3

b. Bridges
i. Link 1
ii. Link 2
iii. Link 3

8. Strongly connected components (SCC)


a. Link 1
b. Link 2 (Video)
c. Link 2
d. Link 3

9. 2SAT
a. Link 1
b. Link 2
c. Link 3 (Video)

Questions:
1. First few practice problems provided at the end of CP-Algorithms articles
2. CCDSAP Advanced Preparation Section

Contact Person:
Anuj Singh (9408944478)
Gokul Raj (9993134956)

You might also like