Блог пользователя Agnimandur

Автор Agnimandur, история, 5 лет назад, По-английски

Hi Codeforces,

Many of you know about the CSES Problem Set, an online collection of over 300 competitive programming problems made by pllk! I have decided to clone all the CSES problems onto Codeforces! Each CSES category will be its own separate gym contest, listed below.

  • Introductory Problems (19 problems)
  • Sorting and Searching (35 problems)
  • Dynamic Programming (19 problems)
  • Graph Algorithms (36 problems)
  • Range Queries (19 problems)
  • Tree Algorithms (16 problems)
  • Mathematics (31 problems)
  • String Algorithms (17 problems)
  • Geometry (7 problems)
  • Advanced Techniques (24 problems)
  • Additional Problems I (38 problems)
  • Additional Problems II (39 problems)

CSES Logo

There are two main reasons why I decided to do this project.

Slow CSES Judge

The CSES Judge is very slow, often resulting in correct solutions that should get accepted instead getting the TLE verdict. This is especially a problem for programmers who use Java. However, the Codeforces judge is much faster, which solves this issue.

Codeforces API

The Codeforces API is quite powerful. By adding these problems to gym contests, these problems can now be accessed by the Codeforces API, which will aid developers and people who use Codeforces bots to suggest problems.

Note: Work in Progress!!

This is still a work in progress! There are over 300 problems on CSES, and it will likely take me months to get them all on Codeforces. Therefore, I recommend you "favorite" this blog post, and check back on the contests regularly.

  • Проголосовать: нравится
  • +41
  • Проголосовать: не нравится

»
5 лет назад, скрыть # |
 
Проголосовать: нравится -37 Проголосовать: не нравится

agnimandur orz

»
5 лет назад, скрыть # |
 
Проголосовать: нравится -28 Проголосовать: не нравится

Agnimandur to the rescue. I want to solve these problems and having them on codeforces will be so awesome.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +250 Проголосовать: не нравится
  1. Did you ask pllk for permission to do this?
  2. While I personally dislike the tight TLs on CSES (e.g. for Java users), I think they must be intentional, not due to a slow judge. (Since clearly the author knows what judge the problems are on, and set the time limits accordingly.)
»
5 лет назад, скрыть # |
 
Проголосовать: нравится -13 Проголосовать: не нравится

Great effort, thanks!

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +239 Проголосовать: не нравится

This seems quite pointless tbh.

  • »
    »
    5 лет назад, скрыть # ^ |
     
    Проголосовать: нравится -35 Проголосовать: не нравится

    Are your ABC editorial blogs pointless?

    • »
      »
      »
      5 лет назад, скрыть # ^ |
      Rev. 3  
      Проголосовать: нравится +67 Проголосовать: не нравится

      Maybe so, but at least (I hope) they add something new to this website and offer explanations for people who didn't solve those problems in-contest. On the other hand, blatantly copying problems from an already existing, well-maintained resource doesn't provide anything new.

      Next time try to think for more than 2 seconds before commenting, kthx

      • »
        »
        »
        »
        5 лет назад, скрыть # ^ |
         
        Проголосовать: нравится -29 Проголосовать: не нравится

        they add something new to this website and offer explanations for people who didn't solve those problems in-contest.

        If you help someone, that's good but if someone helps someone not good.

        On the other hand, blatantly copying problems from an already existing, well-maintained resource doesn't provide anything new.

        As if he gonna make some bucks off of it. It's just educational and it's said in the license, you're free to redistribute.

        Next time try to think rational for more than 2 seconds before commenting, kthx

    • »
      »
      »
      5 лет назад, скрыть # ^ |
       
      Проголосовать: нравится +70 Проголосовать: не нравится

      ABC English editorials usually come 3-4 days after the contest, so having an early though unofficial editorial is obviously handy. Having the CSES problems on codeforces seems unnecessary on the other hand given that CSES is already a stable and accessible site for most users.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится -13 Проголосовать: не нравится

Thanks a lot!

»
5 лет назад, скрыть # |
 
Проголосовать: нравится -18 Проголосовать: не нравится

orz great help :D

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +291 Проголосовать: не нравится

So stealing content from other websites is now to be praised? I don’t understand.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +36 Проголосовать: не нравится

In the problems there should be a link to the orginal source.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +41 Проголосовать: не нравится

You can't hack here, and the tests should be very weak on CSES (very few problems have more than 10 testcases)

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

how are you going to keep track of the new test cases that are going to be added on cses from hacking?

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can't we see the solution submitted by other people in gym contests? I am not able to see the solutions

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +163 Проголосовать: не нравится

Personally, I think it's a bit demotivating for the CSES author. I mean, think about it, he has invested years behind this project and curating most of the must-solve-classic-problems in one place. It must hurt a bit. At least being a full-on pllk fan, it hurts meee :((

I get your point about the java and the api thing... I just wanted to say my opinion. Hope u don't mind :)

»
5 лет назад, скрыть # |
 
Проголосовать: нравится -28 Проголосовать: не нравится

I am a java user. I want and would love to use $$$CSES$$$ instead of these GYM. I just want to ask one question. What will happen if pllk will set the time limit to $$$2 sec$$$? Is it possible that $$$O(n^2)$$$ solution will passed instead of $$$O(n)$$$? Because it's a fact that same solution that gives TLE for me will easily passed in $$$200-300ms$$$ on codeforces. Honestly I also want that $$$CSES$$$ problems remain there. Please pllk make the limit $$$2\,Sec$$$ and I guarantee I will never use the Gym instead of $$$CSES$$$ otherwise I am forced even if I don't feel like. Please make the change if possible.

  • »
    »
    5 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +87 Проголосовать: не нравится

    The point is to make sure you have a well optimized library, so it doesn't hurt you in the future, at least that is my take, especially since in cpp it is plenty of time already in every problem. If you have cpp that can't pass on a cses problem, it is likely it will tle in the future too on contest with a more complicated problem using the same algorithm.

    Also, it could be for showing beginners a direct reason to switch to cpp sooner, as for the most part everyone who is serious switches eventually, but people want to be stubborn at first (including me with java when I began).

    And unrelated, I completely agree with TheeLooser, even if it is within license to take the whole problem set and put them here it does not feel right.

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +151 Проголосовать: не нравится

So basically, you took the CSES Problem Set and removed the Code Submission Evaluation System part. Nice.

Imagine that you would write 300 page book about most known CP problems/algorithms/data structures. Then created 300 problems based on it AND developed an environment to solve them, which can also be used for your country's olympiad selection process and then some stubborn dude, who is stuck in 2000's, because he still did not switch from Java, clones your problems on a "faster" judge.

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится -17 Проголосовать: не нравится

.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится -40 Проголосовать: не нравится

It looks like I'm late to the party. I'd like to use this chance to comment on the stupid TL again.

If this were any normal judge, I wouldn't complain. I can see why people think it's fine to have a uniform TL, since you can think of languages as tools, and you choose the one you like as a key which unlocks the problem's door. The problem here is that CSES isn't simply a normal judge. It's a judge which "contains a collection of problems which can be used to practice the techniques explained in the books" (source). It's hard to "practice the techniques explained in the books" when the judge is so ridiculously slow that even the most obvious, intended solutions TLE.

With this mission statement in mind, suddenly porting to a faster judge so people using all languages can solve the problems without worrying becomes justified and understandable.

pllk? Just wondering if you have any additional thoughts on changing the TL.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +44 Проголосовать: не нравится

The CSES Judge is very slow, often resulting in correct solutions that should get accepted instead getting the TLE verdict. This is especially a problem for programmers who use Java. However, the Codeforces judge is much faster, which solves this issue.

Did you reach pllk to discuss possible improvements that could be made to CSES itself so that this wouldn't be a problem? I feel that could have been a sensible first step.

Personal Opinion
»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hey Agnimandur, pllk

For Problem-X (Sum of Three Values), my submission on CF https://mirror.codeforces.com/gym/102961/submission/109356942 got TLE on Test-10 but the same code got AC on CSES after passing all 23 tests there, when the TL was 1 second there (whereas the TL on CF for this problem is 2 seconds).

Can you please explain why this happened??

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Why aren't the links other than searching and sorting not working?

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

only sorting and searching exist.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

you just uploaded only sorting and searching part. pls upload rest of it

»
3 года назад, скрыть # |
 
Проголосовать: нравится -14 Проголосовать: не нравится

Why not every problem is cloned? My submissions are getting TLE on cses

»
3 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится -8 Проголосовать: не нравится

Thanks Agnimandur!

This is a great idea. I'm going to do some problems jeje.

Thankssss

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Can somebody tell where is the link to other sections plz?

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Is it completed yet? Because i can only see the link for sorting and searching algo. please guide me if you have completed this list. Thank You

»
3 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

OP, it has been some time and only one section is up, any update?

  • »
    »
    3 года назад, скрыть # ^ |
     
    Проголосовать: нравится +1 Проголосовать: не нравится

    Why don't you just use cses.fi? It is a very good nice website. I have done many problems in it.

    • »
      »
      »
      3 года назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      yup I'm using it now too! I asked cos I like being able to track my solved problems on one site you know. Btw do u have any tips for div3 contests? u seem pretty good:))

      • »
        »
        »
        »
        3 года назад, скрыть # ^ |
         
        Проголосовать: нравится 0 Проголосовать: не нравится

        I think you should do many 1400 and 1500 rated problems. Also, from what I have seen, on div3 contests often problem F will be a problem about trees or an easy graph problem, and problem E will often be a problem about sets or binary searching, like in the cses problem "sorting and searching".

        So my advice for div3 will be: do many (random) 1400 and 1500 problems, do many of the sorting and searching problems in cses, and learn easy about graphs and trees.

        However, I think it is best not to focus on "what do do for div3", and just solve random problems that are hard for you.

        • »
          »
          »
          »
          »
          3 года назад, скрыть # ^ |
           
          Проголосовать: нравится 0 Проголосовать: не нравится

          Thanks a lot! I will practice hard:)) So if I look at a question and know how to solve it pretty fast it means it is too easy for me and I should skip for sake of time?

          • »
            »
            »
            »
            »
            »
            3 года назад, скрыть # ^ |
             
            Проголосовать: нравится 0 Проголосовать: не нравится

            Yes. I think so. I think it is best if you try a problem, and after one or two hours of thinking hard, it will be 50 50 chance if you can solve it. But this is only my opinion. But I have heard other people say the same. Good luck in solving problems.

»
22 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

CSES sheet wants to solve sorting problem in 1 sec TL . (i'm java user) DAMN!!

»
7 месяцев назад, скрыть # |
Rev. 3  
Проголосовать: нравится -20 Проголосовать: не нравится

thanks

»
3 недели назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

why only searching and sorting

»
3 недели назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

WE NEED FULL PROBLEMSET :)