How to Win Coding Competitions: Secrets of Champions

How to Win Coding Competitions: Secrets of Champions is the title of an online course offered by the ITMO university on edX.

Here is what the course is about:


Enhance programming skills to boost your career and win prizes led by ITMO University, the only 6-time winner of the world’s top coding cup.

The course starts on October 2016, so be sure to bookmark it. As usual on edX the course is free unless you want to purchase a verified certificate which is optional.


Lectures on C++ STL

Learntofish's Blog

Check out these Channel 9 lectures by Stephan T. Lavavej on the Standard Template Library (STL) in C++.

From the website’s description:

Learn all about the Standard Template Library (STL)  from the great Stephan T. Lavavej (STL), Microsoft’s keeper of the STL cloth (this means he manages the partnership with the owners of STL and Microsoft, including, of course, bug fixes and enhancements to the STL that ships as part of Visual C++).

View original post

Read input of unknown length

Suppose you are given the following input:

5 22 9 813 13
77 98 93 51
5 3 1 5 7 1 3
9 1

Your task is to print out the sum of the numbers in each line, e.g. the sum for the first line is

5 + 22 + 9 + 813 + 13 = 862

So the output should be:


The problem here is that you don’t know how many lines you are given and how many numbers there are in each line. How can you solve this problem in Python and C++?

Continue reading