Competitive Programming for Beginners / Chapter 1 — Foundations (lessons 1–5) / Lesson 1
Getting Started with Competitive Programming and Reading Input
Time needed: about 11 min (estimate)
Reading settings
These settings are remembered on this device only.
You can try the opening of this lesson without an account.
The first wall isn't algorithms, it's input
In competitive programming, right below the problem statement there's a spec saying "Input is given in the following format."
Even if you come up with the solution, you get zero points if you read this wrong.
There are surprisingly few input shapes: "one value per line," "several values on one line," and "N lines of data" cover almost everything.
First, let's get these three into your fingers.
Tab indents. To leave the editor, press Esc, then Tab.
Create a free account to keep reading
With an account you can read the rest of this lesson, take the quiz, and read every free lesson in this course. Lessons you answer correctly are recorded as complete.
Report a problem with this lesson
Log in to send a report.