pllk's blog

By pllk, history, 7 years ago, In English

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.

  • Vote: I like it
  • +279
  • Vote: I do not like it

| Write comment?
»
7 years ago, # |
  Vote: I like it +27 Vote: I do not like it

"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.

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +13 Vote: I do not like it

    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.

»
7 years ago, # |
Rev. 2   Vote: I like it +12 Vote: I do not like it

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.

  • »
    »
    7 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    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 :)

    • »
      »
      »
      7 years ago, # ^ |
        Vote: I like it +10 Vote: I do not like it

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

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +23 Vote: I do not like it

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

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I was waiting this.

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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?

  • »
    »
    7 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.

»
7 years ago, # |
Rev. 2   Vote: I like it +29 Vote: I do not like it

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.

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +22 Vote: I do not like it

    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.

»
7 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Thank you so much for this book sir :D

»
7 years ago, # |
  Vote: I like it +9 Vote: I do not like it

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.

»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Where can I find the solution to the problemset?

»
5 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

The problem set is very nice, ThankYou:)
For the problem High Score, this test case should be included

test case

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

My Wrong Approach

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.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like 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.

»
3 years ago, # |
  Vote: I like it +43 Vote: I do not like it

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.

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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

1
1 5
5 5
3 3
1000000000 1000000000
»
12 months ago, # |
  Vote: I like it +11 Vote: I do not like it

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?

  • »
    »
    12 months ago, # ^ |
      Vote: I like it +21 Vote: I do not like it

    Fixed, thanks for letting us know