Your CP Journey — What's Next!
You've built the foundation — now let's talk about the skyscraper!
Open interactive version (quiz + challenge)Real-world analogy
What is it?
This final lesson is your graduation ceremony and roadmap! We recap everything you've learned in 40 lessons, explain the Codeforces rating system, give you a clear study plan for what to learn next, introduce the CP community, and send you off with encouragement. You've built an incredible foundation — now it's time to fly!
Real-world relevance
Competitive programming skills have launched thousands of careers. Gennady Korotkevich (tourist), the #1 CP programmer, works at a top tech company. Petr Mitrichev works at Google. Many ICPC World Finalists become tech leaders, startup founders, and researchers. The problem-solving skills you've learned are valued in every industry — from finance to medicine to space exploration!
Key points
- Look How Far You've Come! — In 40 lessons, you went from 'What is Programming?' to recursion, stacks, queues, sorting, searching, time complexity, and solving real contest problems. You can write C++ programs, debug them, and think algorithmically. That's AMAZING! Most people never get this far. Be proud!
- The Codeforces Rating System — Codeforces gives you a rating based on contest performance. Newbie (gray, < 1200), Pupil (green, 1200-1399), Specialist (cyan, 1400-1599), Expert (blue, 1600-1899), Candidate Master (purple, 1900-2099), Master (orange, 2100-2299), Grandmaster (red, 2400+). Start with virtual contests to practice!
- Your Next Topics to Learn — Here's your roadmap: (1) Dynamic Programming — the most important CP topic, building on recursion. (2) Graph algorithms — BFS, DFS, shortest paths. (3) Number theory — primes, GCD, modular arithmetic. (4) Advanced data structures — segment trees, fenwick trees. Take them one at a time!
- Daily Practice Plan — Solve 1-2 problems daily. Start with Codeforces rating 800-1000 problems. When those feel easy, move to 1000-1200. After each contest, read the editorial (solution explanation) for problems you couldn't solve. Consistency beats intensity — 30 minutes daily beats 5 hours once a week!
- Online Judges and Platforms — Codeforces — the biggest CP platform, weekly contests. AtCoder — Japanese platform, very clean problems. USACO — American computing olympiad (great for students). LeetCode — more interview-focused but great for practice. CSES Problem Set — curated 300 problems covering all major topics.
- Learning from Editorials — After every contest, read the editorial (official solution). For problems you solved, compare your approach. For problems you didn't solve, study the technique — that's how you learn new algorithms! Many top programmers say reading editorials is the #1 way they improved.
- The CP Community — CP has one of the friendliest communities in programming! Codeforces blogs are full of tutorials. YouTube channels like Errichto, SecondThread, and Colin Galen teach advanced topics. Discord servers and Reddit (r/competitiveprogramming) are great for asking questions. You're never alone!
- CP Skills Transfer to Real Life — CP teaches problem-solving, logical thinking, and coding under pressure — skills valued by top tech companies. Google, Facebook, and Amazon actively recruit competitive programmers. Many CP veterans go on to be top software engineers, researchers, and tech leaders.
- Your Encouragement — Every expert was once a beginner. Tourist (the #1 rated programmer) started with simple problems just like you. Petr Mitrichev practiced for years before becoming a legend. The secret? They never stopped. Keep solving, keep learning, keep having fun. YOU can do this! Your competitive programming journey has just begun, and the best is yet to come!
Code example
#include <bits/stdc++.h>
using namespace std;
// Your CP template — use this for every contest!
// Customize it as you learn more tricks.
int main() {
// Fast I/O — makes cin/cout as fast as scanf/printf
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin >> t; // Number of test cases
while (t--) {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) cin >> a[i];
// === YOUR SOLUTION GOES HERE ===
// Example: find min, max, sum
int minVal = *min_element(a.begin(), a.end());
int maxVal = *max_element(a.begin(), a.end());
long long sum = 0;
for (int x : a) sum += x;
cout << "Min: " << minVal << "\n";
cout << "Max: " << maxVal << "\n";
cout << "Sum: " << sum << "\n";
// Sort (O(n log n))
sort(a.begin(), a.end());
// Binary search (O(log n))
int target = 42;
bool found = binary_search(a.begin(), a.end(), target);
cout << "Found 42? " << (found ? "YES" : "NO") << "\n";
}
return 0;
}
// EVERYTHING YOU'VE LEARNED:
// Lesson 1-5: Programming basics, variables, I/O, data types
// Lesson 6-10: Conditions, loops, patterns, operators
// Lesson 11-15: Functions, arrays, strings, math tricks
// Lesson 16-20: STL, vectors, pairs, sets, maps
// Lesson 21-25: Sorting, searching, two pointers, frequency counting
// Lesson 26-31: Prefix sums, greedy, basic DP ideas, problem patterns
// Lesson 32-35: Recursion, stacks, queues
// Lesson 36-39: Problem reading, solving, debugging, time complexity
// Lesson 40: YOUR JOURNEY CONTINUES!Line-by-line walkthrough
- 1. ios_base::sync_with_stdio(false); cin.tie(NULL); — these two lines speed up cin and cout dramatically. Always include them in contest code! They disconnect C++ streams from C streams, removing synchronization overhead.
- 2. int t; cin >> t; while (t--) — the standard multiple test case pattern. Read how many test cases, then solve each one in the loop.
- 3. vector a(n); — create a vector of n integers. Vectors are safer and more flexible than raw arrays.
- 4. *min_element(a.begin(), a.end()) — a handy STL function that finds the minimum element. The * at the front dereferences the iterator to get the actual value.
- 5. sort(a.begin(), a.end()); — O(n log n) sorting, one of the most used operations in CP.
- 6. binary_search(a.begin(), a.end(), target) — returns true/false whether the target exists in a SORTED container. O(log n) — super fast!
- 7. This template is your starting point for every contest. Over time, you'll add more helper functions, macros, and tricks. Many top programmers have templates with hundreds of lines of pre-written code!
- 8. The comment block at the bottom recaps all 40 lessons — from basic programming to advanced problem-solving. Look how much you've learned!
Spot the bug
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) cin >> a[i];
// Find target using binary search
int target;
cin >> target;
bool found = binary_search(a.begin(), a.end(), target);
cout << (found ? "YES" : "NO") << "\n";
return 0;
}Need a hint?
Show answer
Explain like I'm 5
Fun fact
Hands-on challenge
More resources
- Codeforces — Start Your Journey (Codeforces)
- CSES Problem Set — 300 Curated Problems (CSES)
- Competitive Programming Roadmap (Errichto)