there's not any major advantage in learning pure C unless you know for a fact you'll be working in a career that forbids C++ for some reason, usually a huge older C codebase with no plan for rework. you'll learn all of C while learning C++. the only thing you won't learn is some C-only ways of doing things that are the original ways of doing things before C++ STL, such as gnu data structures, heavier dependence on raw malloc calls, etc. and this is coming from a lifelong C programmer and C professor. learn C++. it's fine to start with C if you want, but transition into classes and templates and STL quickly unless this is literally your first language, which is seems it's not. Answer from eruciform on reddit.com
Princeton
competitive-programming.cs.princeton.edu › resources
Princeton Competitive Programming
Some links have multiple ratings when they are suited to different levels. You can use most languages for competitive programming (like Java, C++, Python, even OCaml!), but the most popular language is C++. Here we include some resources for people that want to learn C++.
Which is better to use for competitive programming, C or C++?
there's not any major advantage in learning pure C unless you know for a fact you'll be working in a career that forbids C++ for some reason, usually a huge older C codebase with no plan for rework. you'll learn all of C while learning C++. the only thing you won't learn is some C-only ways of doing things that are the original ways of doing things before C++ STL, such as gnu data structures, heavier dependence on raw malloc calls, etc. and this is coming from a lifelong C programmer and C professor. learn C++. it's fine to start with C if you want, but transition into classes and templates and STL quickly unless this is literally your first language, which is seems it's not. More on reddit.com
C++ Competitive Programming YouTube Channel
I actually quite like the idea of your channel. That being I think you still have much too learn :-) First of all I think you should set up a github where you post your solutions, to make them easier accessible. My second point is - stop using macros! Please don't use them at all. There are lots of valid use cases for macros, but #define FORI(s,n) for(int i = s; i < n; ++i) is among the worst kind of macro usage (imho). If you use macros for stuff like this, I first have to learn your user defined macro language in order to understand your code. Besides readability there are tons of other arguments against macros (e.g. conflicting names when you include other files, potentially longer compile times, ...). My third point is that you should really stop using using namespace std; See also https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice I furthermore think you could also show solutions which are using the std algorithms (as an alternative): int numJewelsInStone(const std::string& J, const std::string& S) { const std::unordered_set jewels(begin(J), end(J)); return std::count_if(begin(S), end(S), [&jewels](const char& c) { return jewels.find(c) != end(jewels); }); } EDIT: changed to count to count_if More on reddit.com
C++ in Competitive Programming: string basics
Very entertaining - one tiny quibble: The latter point is referred as the Small String Optimization and it means that short strings (generally 15/22 chars) do not go to the heap, but instead they get allocated on the stack This isn't quite true. In the SSO, short strings are stored in the std::string itself and don't require a separate allocation. However, the std::string might live on the stack or it might live in the heap, depending on how it was allocated. More on reddit.com
Vim and C++: For competitive programming
Vim with the right configuration is definitely the way to go for C and C++ in my opinion. In addition to cscope and YouCompleteMe, also learn about Vim's ctags integration which allows you to instantly jump to a definition under the cursor of a user defined type, variable, function name etc. Also, vim-dispatch is an easy way to build projects from Vim and works well with tmux. Tagslist is a nice plugin which opens a window that lists functions, classes, global vars etc. defined in the current buffer. More on reddit.com
Videos
11:41
Intro to Competitive Programming - YouTube
10:54
Competitive Programming - How to Start? Complete Guide - YouTube
06:42
Best Programming Language For Competitive Programming | C++ vs ...
24:58
Pointers in Deep and Easiest Way | C/C++ | Competitive Programming ...
01:09:35
Competitive Programming for Beginners Part 1 | Facebook Hacker ...
01:02:05
Competitive Programming for Beginners Part 4 | Competitive ...
USACO Guide
usaco.guide › home › general › introduction to competitive programming
Introduction to Competitive Programming · USACO Guide
In general, each problem in competitive programming is solved with a two-step process: coming up with the algorithm, which involves problem solving skills and intuition · implementing the algorithm, which requires programming skills to translate the algorithm into working code. For each problem, you submit the completed code to a grader, which checks the answers calculated by your program against a set of predetermined test cases.
GeeksforGeeks
geeksforgeeks.org › dsa › competitive-programming-a-complete-guide
Competitive Programming - A Complete Guide - GeeksforGeeks
2 weeks ago - Learning Opportunity: In Competitive programming, we get a wide range of variety of problems and various arithmetic concepts. Competitive programming exposes various data structures and algorithms which help us better understand the complexity of problems. What is Competitive Programming and How to Prepare for It? Competitive Programming (CP) Handbook with Complete Roadmap
Reddit
reddit.com › r/learnprogramming › which is better to use for competitive programming, c or c++?
r/learnprogramming on Reddit: Which is better to use for competitive programming, C or C++?
October 8, 2021 -
C and C++ are among the most popular languages for CPs and I'd like to learn one of them. Which one do you think is more suitable and better to use?
I only need it for CP. I'm not a beginner in programming, I'd say I'm intermediate in Python and JS. But since those 2 languages don't have some features that exist in C and C++ (pointer, memory management, etc), I would need take more time to learn about them, so I'd also prefer the language that could teach me those concepts easier.
Top answer 1 of 4
4
there's not any major advantage in learning pure C unless you know for a fact you'll be working in a career that forbids C++ for some reason, usually a huge older C codebase with no plan for rework. you'll learn all of C while learning C++. the only thing you won't learn is some C-only ways of doing things that are the original ways of doing things before C++ STL, such as gnu data structures, heavier dependence on raw malloc calls, etc. and this is coming from a lifelong C programmer and C professor. learn C++. it's fine to start with C if you want, but transition into classes and templates and STL quickly unless this is literally your first language, which is seems it's not.
2 of 4
3
Is pointer and memory management really a feature? To some, manual shift in a car is not really a feature even if some people like it. I would imagine (but could be wrong) that competitive programming is about solving the problem rather than thinking about how to manage memory which is more of a distraction.
TutorialsPoint
tutorialspoint.com › writing-c-cplusplus-code-efficiently-in-competitive-programming
Writing C/C++ code efficiently in Competitive programming
In competitive programming, the most important thing is an effective code. Optimized and faster code is important and can make a difference in the ranks of the programmer. To write an effective c/c++ code in competitive programming, here are
Codeforces
codeforces.com › blog › entry › 23054
An awesome list for competitive programming! - Codeforces
Therefore, in my opinion it would probably be cool if there's an awesome list for competitive programming! ( It's now featured on the main list! ) I'm actively updating the list here: https://github.com/lnishan/awesome-competitive-programming · A curated list of awesome Competitive Programming, Algorithm and Data Structure resources.
CodeChef
codechef.com › ioi › basics
Introductory tutorials for competitive programming | CodeChef
Introductory tutorials for competitive programming | CodeChef
CodeChef
codechef.com › getting-started
CodeChef: Practical coding for everyone
October 23, 2021 - Learn to code for free using our beginner friendly and interactive learning courses. Get all the practical skills required to excel at computer science. Start learning with CodeChef today and unlock your potential as a developer!
GeeksforGeeks
geeksforgeeks.org › c++ › c-tricks-competitive-programming-c-11
C++ tricks for competitive programming (for C++ 11) - GeeksforGeeks
July 23, 2025 - In this post, some more tricks are discussed. Writing C/C++ code efficiently in Competitive programming Although, practice is the only way that ensures increased performance in programming contests but having some tricks up your sleeve ensures an upper edge and fast debugging.
HackerEarth
hackerearth.com › practice › notes › getting-started-with-the-sport-of-programming
Getting started with the sport of competitive programming - Triveni Mahatha
This document is to guide those ... with competitive programming. Originally, this document was prepared during the summers of 2014 to help the freshers of Indian Institute of Technology, Kanpur. So, we thought it might be useful to others as well. Prerequisite : Basics of any programming language. We will follow C/C...
Competitive Programming Algorithms
cp-algorithms.com › index.html
Main Page - Algorithms for Competitive Programming
October, 15, 2024: GitHub pages based mirror is now served at https://gh.cp-algorithms.com/, and an auxiliary competitive programming library is available at https://lib.cp-algorithms.com/. July 16, 2024: Major overhaul of the Finding strongly connected components / Building condensation graph article. June 26, 2023: Added automatic RSS feeds for new articles and updates in articles.
DEV Community
dev.to › educative › introductory-guide-to-competitive-programming-with-c-81c
Introductory Guide to Competitive Programming with C++ - DEV Community
June 18, 2020 - This is especially difficult because competitors are required to develop programs in a limited time frame. The most common programming languages for competitive programming are Java and C++ due to their relative run-time efficiency compared to other languages like Python or JavaScript.
Cses
cses.fi › book › book.pdf pdf
Competitive Programmer’s Handbook Antti Laaksonen Draft July 3, 2018
traditional software engineering, the programs are short (usually at most a few · hundred lines of code), and they do not need to be maintained after the contest. ... C++, Python and Java. For example, in Google Code Jam 2017, among the best · 3,000 participants, 79 % used C++, 16 % used Python and 8 % used Java [29]. Some participants also used several languages. Many people think that C++ is the best choice for a competitive programmer,