Almost a year ago, I released an online competitive programming book. Since then, the book has been downloaded over 500,000 times, and many people are already using it to learn competitive programming. I have also received a large amount of feedback, which has greatly improved the quality of the book. Thank you!

Now I have some news regarding the book. First, there is now a printed version of the book available with the title *Guide to Competitive Programming*, published by Springer. So if you want to buy a printed book and support my work, you can do it now. The book is available, for example, through Springer and Amazon.

How is the printed book different from the online book? Well, they are actually two different books. I have rewritten and restructured many parts of the book, and also added new material. The printed book discusses a selection of more advanced topics, such as suffix arrays, treaps, dynamic programming optimization, and parallel binary search. You can find a detailed table of contents here.

Note that the online version of the book will be freely available both now and in the future.

Then, there is also a new problem set called *CSES Problem Set*. It contains a collection of problems which can be used to practice the techniques explained in the books. The first version of the problem set is available here. New problems will be added every now and then; the goal of the problem set is to contain a comprehensive collection of "standard" competitive programming problems.

"Since then, the book has been downloaded over 500,000 times" — 0_0!? How can it be downloaded 500000 times if there are only 50000 people in the world?

Btw, I think it would be good to classify problem in that CSES set according to their topics. Probably many people will read your book not from beginning to end in its entirety, but to read selectively about some specific topics and they would like to know which problems are appropriate for practising what they read about without going through whole problemset.

The number 500,000 comes from the server log, of course it doesn't mean that so many unique people have downloaded the book.

The structure of the problem set will evolve, however at the moment I'm not sure which direction would be the best... On the other hand, it would be good to have problems organized by topics, but then this would disturb the thinking process. If you see that a problem is classified, for example, as a segment tree problem, then you will only think how to solve it using a segment tree, and not freely think about different approaches.

CSES problem set looks amazing just like your book. Seems like I just got one more website to visit frequently. :D

Thanks for this.

Also, even though I want to, I can't really buy your book because its price is more than my monthly pocket money. :(

I believe most Indian students will have this problem.

USD 40.00 might be a normal figure but INR 3577.00 is too expensive. I wish it was affordable for me.

P.S.: By the way , CLRS's Introduction to Algorithms is available at INR 675.00 in india :)

Is India the first country I ever heard of which is cheaper than Poland :o? In Poland Cormen is 3 times more expensive.

Yeah, I understand the situation. That's why I wanted to first release a free online version.

I was waiting this.

When you say new problems will be added every now and then, how often is every now and then? Right now there are roughly 70 problems. How many do you forsee the problem archive expanding out to?

The final number of problems will probably be between 150 and 200. I can't promise any specific rate now, but the goal is to publish all the problems (and decide the final structure of the problem set) during this year.

Why does each chapter cost $29.95 when you can get all 15 chapters for $39.99 on Springer?

I think it would be better if each chapter costs around $3-$4 so that those of us who cant afford the whole book can still read the chapters we need.

Good point, the pricing doesn't seem very logical. However, I can't control the prices. I would encourage you to send feedback to Springer.

Thank you so much for this book sir :D

Thank you so much for your contribution !!

I started reading your book about several months ago, when I was still a beginner (still now...). The topics and algorithms introduced there are awesome!!

I still remember that when I first met a problem associated with segment tree, I searched on the internet and found some materials talking about it but it still turned out to be quite hard for me to understand. Then, I read the chapter in your book which introduces segment tree again and again, and inspired by the explanation there, I found that I came to form a more clear understanding of this topic.

There are some other topics mentioned in your book that have left me quite deep impression, such as Edit Distance, Cayley's Formula, Sprague–Grundy Theorem, and so on.

I think it is quite tough for beginners to start the first step (at least for me), and I really learned a lot from reading your book. Thank you again.

Where can I find the solution to the problemset?

Yes I would love a place to find solutions!

join

take the link of the problem to search in the server

profit

The problem set is very nice, ThankYou:)

For the problem High Score, this test case should be included

test case8 9

1 2 1

2 3 1

3 4 1

4 2 1

1 8 1

5 8 1

5 6 1

6 7 1

7 5 1

The correct answer to this test case is 1, but my solution here (which is currently accepted) gives -1.

My Wrong ApproachI checked if a positive cycle is visible from both 1 and n (In case of n, I used the reversed adjacency list). If yes, them answer is -1 else calculate maximum distance from 1 to n.

UPD: I didn't know about hacking on cses website, that's why I commented here. Hacking automatic ally adds the test cases which were successful in hacking.

Hey pllk Test 11 in coin combination 1 does not satisfy the input constraints. Could you please look into it?

Thanks, indeed the checker didn't work correctly and an invalid test was added. The test is now removed and all submissions will be rejudged later today.

Can you increase time limits or introduce language multipliers? Doing it for easy problems would be enough.

CSES Problem Set is a great resource to practice basic algorithms like DFS or sliding window. I often recommend it for beginners but they mainly use Python. Sadly, that makes many problems unsolvable or at least annoying to pass.

I want to add test for problem Line Segment Intersection. My code is already AC but can't pass this test:

Hey pllk,

There's a small bug on the site where the user statistics page (like this) shows the number of AC submissions, including repeated AC submissions on the same problem, while the ranklist correctly shows number of distinct AC problems submitted. Can you look into this please?

Fixed, thanks for letting us know