Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

zhouziheng's blog

By zhouziheng, history, 4 months ago, In English

I was a CPer a few years ago when I was in high school. However, when I look back into my CP experiences, I find that almost every algorithm I have learned, every code segment I have written can be easily handled by the powerful AI tools nowadays, within seconds.

What's the point of doing, or having done CP, in the era that Codex and Claude Code literally surpass all human talents in this area? I understand that the situation is similar to that of AlphaGo, whose release causes professional players to somehow feel frustrated and the entire market to shrink. But I know that lots of CPers are doing CP more than a hobby (way more than the number of professional Go players).

Btw, is it possible to develop CP problems that even the strongest AI has no idea to solve and collect them into a contest?

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

»
4 months ago, hide # |
← Rev. 4  
Vote: I like it 0 Vote: I do not like it

Problem E in AWCF seemed to trouble AI for 3 hours but later it solved the problem with almost 2000 lines of code. I think people can write a problem whose solution is composed of plenty of lines, but that seems to exceed the range of CP.

Update: Plenty of lines refers to not only code, but also LLM's thinking chain (or thinking depth, I cannot describe it with English exactly).

  • »
    »
    4 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Could you please explain what AWCF is? I haven't participated in the community for a while and do not quite understand this abbreviation. I would be grateful if a link to the problem is also provided.

    Anyway I don't think long solutions can hinder future AIs, neither are they the point of solving CP problems. A typical CP problem consists of a maths (or more generally, a thinking) part and a coding part. I guess the former has more opportunities to get AI stucked; feel free to correct me on this.

    • »
      »
      »
      4 months ago, hide # ^ |
       
      Vote: I like it +1 Vote: I do not like it

      It's a contest raised on Atcoder recently, sponsored by OpenAI. Legendary Grandmasters like Jiangly and Tourist were invited(And OpenAI).

      You can see the results in this link AWCF

      I think long solutions often come with long thinking chain, it's a result, not a condition. So your opinion is right, I didn't explain mine clearly.

      • »
        »
        »
        »
        4 months ago, hide # ^ |
         
        Vote: I like it -9 Vote: I do not like it

        Ah I see. AtCoder World Tour Final was the humanity's last exam in the area of CP in my mind when I was doing CP. I feel sorry to know that even in such high level of contests, humans get defeated.

        • »
          »
          »
          »
          »
          4 months ago, hide # ^ |
          ← Rev. 2  
          Vote: I like it +11 Vote: I do not like it

          I will say sponsored by OpenAI is suspicious. It is not the first time that OpenAI has pulled such a maneuver. (However, AtCoder is probably reliable with their problems). Not to mention how AI often generates many solutions in parallel and tests them: if any human were given such liberty to write tens of solutions (e.g, given time, or given a special chip that lets you write thoughts as code for a thousand lines in a minute), I doubt any LGM would not be able to solve the problems.

    • »
      »
      »
      4 months ago, hide # ^ |
      ← Rev. 2  
      Vote: I like it 0 Vote: I do not like it

      You can also check out Petr blog post here: https://codeforces.me/blog/entry/155109

»
4 months ago, hide # |
 
Vote: I like it -19 Vote: I do not like it

How about: What's the point of doing CP? Afaik, CP is useless for programming.

  • »
    »
    4 months ago, hide # ^ |
     
    Vote: I like it -18 Vote: I do not like it

    I guess in 2020 maybe doing CP is the best way for a junior student to learn programming. But now any kid can talk to ChatGPT and get to understand anything they need to know as a programmer. Well, fortunately (or unfortunately) the occupation programmer may just disappear within 10 years (just like typists).

»
4 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

A few thoughts:

  • Instead of restraining ourselves to just CP in the following, we consider mathematical problemsolving in general (even at the frontier of academia), as AI is showing strong signs of becoming superhuman at the same over the coming months/years (see 1, 2, 3).
  • I don't think Chess, Go and other board games (where AI became superhuman a long time ago) are good reference points for predicting how humans adjust to AI becoming superhuman in math/cs. I suspect that this is primarily due to how constrained these games are, compared to problem-solving in general. In particular, consider the following:
    • For such board games, humans can (perhaps reasonably) use the cope that an entity that's superhuman at them is essentially a more advanced calculator (ie. something that's outperforming humans not because of anything that resembles "human intuition" or "true" insight, but just an extraordinary amount of mechanical search that's specialized to a particular game).
    • However, when it comes to math/cs, humans just expect entities that are incredibly mathematically skilled (and able to apply this skill to various applied fields like physics, econ, cs) to be more "generally" intelligent than less mathematically skilled entities. While this makes a lot of a-priori sense, there is also a strong historical/social prior (we revere humans that are incredibly mathematically capable because indeed, they tend to be "generally" superior to other humans).
    • On a more practical note, the nature of these board games makes it far easier to detect AI-assisted human play:
      • They're constrained, and detecting patterns of behaviour in such settings is easier. In chess, it's not that difficult to notice patterns of play by a human that significantly diverge from his previous style. How can one even do this with something like CP? Since it's such a general activity, a human can take very high-level assistance from an AI (just the main idea of how to solve a problem), and then "mask" it with all of his own human quirks and style (the typical way in which he implements code).
      • They're sequential and far more granular. For a chess game, you get a lot of rich data to analyse (you see tens of moves made by the player, and the exact state of the board before every move), but online CP is very different (assuming you don't have access to a screen-recording of a human participant). Here, you essentially give a human a problem, and the human performs a lot of "opaque" thinking/debugging/iteration behind the scenes, and then spits out some code that solves the problem, and you only have access to the final piece of code. Note that any visible iterations (for instance, the human gets a WA and submits again, then gets a TLE and submits again) can easily be faked by intentionally inserting mistakes.
  • As we see signs of AI approaching strong competence in various subfields of math, several people have begun adopting copes along the lines of "even if AI becomes superhuman at <insert activity a human used as a way to feel superior to other humans>, its achievements won't have the artistic merit that human achievements do". A couple of thoughts:
    • Society will probably begin to devalue the "artistic" merit it currently associates with mathematical/scientific innovation (smart individuals will still value it though).
    • Even right now, most people see more artistic merit in things like literature, music, the visual arts, etc than math/cs. This is mostly due to most people not being knowledgeable/smart enough to appreciate how beautiful math can be, and less frequently due to a genuine, informed preference. A lot of people will double down on this and insist that because AI is not as good as the best humans at the former (lit, music, etc), it is therefore somehow fundamentally inferior to humans. While this is a nonsensical belief in itself, it will be straightforwardly false as AI does become superhuman at the former too (which will probably take longer, but I don't see any reason for this not happening over the coming years, especially as architectures diversify).
  • Now, "What's the point of doing, or having done CP"? To me, CP is the platonic ideal of a video-game (minus the graphics). It's quite general, beautiful, challenging, you can notice your improvement, it has a very high skill-ceiling, etc. I also enjoy solving hard problems outside contests much more than taking contests. Therefore, the enjoyment I derive from CP is largely independent of how strong AI is.

Btw, is it possible to develop CP problems that even the strongest AI has no idea to solve and collect them into a contest?

Assuming you mean problems that humans can solve but AI can't (otherwise, we could just drop in the Riemann Hypothesis xd), it's probably possible to create a few problems that LGMs can solve but AI can't right now, but I would caution against using this as a cope, and expecting it to be true forever.

  • »
    »
    4 months ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it +48 Vote: I do not like it

    deleted

    • »
      »
      »
      4 months ago, hide # ^ |
      ← Rev. 2  
      Vote: I like it 0 Vote: I do not like it

      This time I actually agree with their point though. Although I'm not sure what makes AI so good at CP specifically. From what I've seen, it doesn't do well at other things (cough cough AI slop micro1 interview that references a CF problem that doesn't even exist, and also it's literally NP hard by reduction from subset sum... it's not solvable for n <= 200k). This might be cope but it may be that CP, like chess, is really just glorified pattern recognition and tree-of-thought is good at handling it. I think like you said cheat detection for CP is generally a losing battle unless you have a recording, due to the lack of time pressure and, at least for chess, so-called "unnatural moves" when masters can feel when someone is using an engine since they're playing good moves but not ones humans would think of (for CP, there really is only one obvious intended solution).

      I personally view it as a glorified video game that I don't feel guilty pouring hours into lol

      • »
        »
        »
        »
        4 months ago, hide # ^ |
         
        Vote: I like it -11 Vote: I do not like it

        I am actually very interested in how well one could use AI tools to cheat in online CP contests. Afaic, AI-generated code files are too neat to be written by human within the typical period of a contest. I understand that it's possible to manually instruct AI to obfuscate the code, and I'm curious in how well this can be done (or any other SOTA methods in doing such thing). Of course I strongly discourage cheating in real contests; just for academic purpose.

        • »
          »
          »
          »
          »
          4 months ago, hide # ^ |
           
          Vote: I like it 0 Vote: I do not like it

          That only catches the lazy cheaters who paste AI outputs I think. If you ask fable to tell you the idea and then implement it yourself, it will be hard to detect.

          Or, even just getting some hints is enough to massively boost your rating. For example, I put E from round 1108 into fable 5, and even though it did not get the correct answer, it got halfway to the right idea (randomization, 1 in 2^15 error probability, the right solution is 1 in 2^29) and a skilled competitor could finish the rest.

      • »
        »
        »
        »
        4 months ago, hide # ^ |
        ← Rev. 2  
        Vote: I like it +10 Vote: I do not like it

        deleted

        • »
          »
          »
          »
          »
          4 months ago, hide # ^ |
           
          Vote: I like it 0 Vote: I do not like it

          I also don't think AI will take our jobs. Just look at micro1 lmao "startup worth 1 billion" yeah ok bro

          But I feel like it's more than that. Modern pretrains are trillions of tokens in the dataset, there are maybe like 1 million CP problems every created? (And I'm being generous by an exponent or two.) My hypothesis is that tree-of-thought works well for CP since most ideas are simple but hidden. But their ability to go through long reasoning chains is also very impressive to me.

  • »
    »
    4 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Thanks for your detailed response! However, I would like to argue that the difference between board games and CP is minor; currently it may be hard to believe this, since the trend is ongoing, but I believe that after some years doing CP would be the same as playing tennis or reading novels — it's yet another way of entertainment. For the first point you made in your comment about Go, I would like to argue that at the start of this century, Go masters are highly respected by most people, just as top CPers not long ago; they were not called advanced calculator at that time. It is the emergence of top AI in Go that has initiated this trend, and the same thing is going to happen once again.

    I appreciate your attitude towards CP; however, many of CPers (maybe including me) would not have started doing CP if only for leisure (especially those Chinese students urging for university entrance). Future CPers have to take CP as a hobby and separate them from their work. What will the community at that time be like? Only god knows.

  • »
    »
    4 months ago, hide # ^ |
     
    Vote: I like it +8 Vote: I do not like it

    Apologies for the brevity:

    Things like the double cycle conjecture or disproof of Erdös were mostly just the AI exploring a lot of the search space. In OpenAI's Methodology for the disproof (page 2)

    "Our internal model was given an AI-written statement of the problem, and its output was sent to an AI grading pipeline, which indicated high confidence that the solution was correct. It was only after this point that internal human researchers . . . began to examine the solution."

    The model also "thought" for over one hundred and twenty five pages? If you read thru the CoT, it does not read like a human having an epiphany, rather like a machine executing a search through everything, polynomials, finite fields, elliptic curves, graphs, etc, running through every "branch" of possiblility till it finds a contradiction.

    While very impressive this is not necesarilly indicative of superhumanity.

    Thomas Bloom also writes: "It is likely that most of the human efforts spent on this problem have been on trying to prove the upper bound, rather than spending serious time on trying to disprove it.". The AI has no respect for Erdös nor fear of wasting grant money and research time: if it fails, OpenAI will simply cancel the project, perhaps never write about it (and no-one but Allah knows how many times they failed)

    Similarly, Deepmind's Alethia, designed to solve professional math and physics provlems, is a similar "iterative process of generating and revising solutions". Modern systems designed for formal mathematics like the BFS (painfully obvious) Prover v2 system, make the search-based nature of AI math solving absolutely explicit.

    The same applies to the graph conjecture solution: over sixty four sub agents were ran at once along with certain instructions to to orchestrator (e.g: to not share the current preferred solution).

    If you were capable of bringing a thousand mathematicians in a room, they too would be able to make such a breakthrough by a pure search process.

  • »
    »
    4 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    I don't think so. Competitive programming has a ton of downsides. Chess is way closer to the platonic ideal of a video game.

    • it's playable 24/7, unlike codeforces
    • bigger player base
    • competition
    • select your favorite time control + variant
    • works without computers
    • rating system that actually works
    • »
      »
      »
      4 months ago, hide # ^ |
      ← Rev. 2  
      Vote: I like it +2 Vote: I do not like it

      By "competitive programming", I don't mean "taking part in contests". I mean "solving hard, well-scoped, unambiguous, verifiable algorithmic problems".

      So, counter-points:

      • it's playable 24/7
      • irrelevant
      • irrelevant
      • irrelevant
      • mindsolving works without computers (and indeed, most of my time spent thinking about problems hasn't been in front of a screen)
      • irrelevant

      (and there's also the fact that the things you learn in chess don't generalise nearly as well as the things you learn from studying algorithms)

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

I have also overthinked this topic with my friend and we think that in the near future robots will take over not as in like ruling that's just fantasy but idk could be true but as all the work is being done by robots(even making robots could be assigned to robots) and so we thought what about their maintenance and there could be like a binary tree like structure for maintenance with 1 robot on the top that a human could maintain? or possibly 2 robots for each other and then the tree goes down. So there is nothing a human can do so there is no value for anything market crashes and then voilah you're left with well nothing so enjoy while you still can or idk become religious or smth. So when the 1st robot is made publicly available that's the breaking point. And anything you can do before that do it ig. And as for CP itself if you enjoy it do it but other than that leave it fully if you are looking forward to future in the field because it will meet its end first out of all the things

»
4 months ago, hide # |
 
Vote: I like it +14 Vote: I do not like it

Hi,

In my opinion, in the era of AI, competitive programming is still very important. It is one of the best ways to truly learn how to write code, understand efficiency, and become a better problem solver. Today, many programmers use AI agents to write code for them. For example, at a Google meetup I attended, one speaker said he had not written a single line of code for three months because he gives almost everything to an AI agent. AI is useful, but if you want to deeply understand programming, you still need to code by yourself. Competitive programming teaches you how to write fast, clean, and efficient code. It is also great for people who simply enjoy coding but feel bored by repetitive tasks at work. Instead of writing the same type of code every day, CP gives you different and challenging problems where you can think creatively and write code in your own way.

I personally love to think, and I also love to write code. But almost every software project that I have ever needed to build was something that AI could generate, and most of the software I had to create was mainly the same type of work. After some time, writing similar code again and again becomes boring, no matter how much you love to code. And for me, competitive programming is the best way to keep building problem-solving skills, improve my coding skills, and actually write code by myself.

  • »
    »
    4 months ago, hide # ^ |
     
    Vote: I like it +3 Vote: I do not like it

    Your words move me a lot. I am among those who rely heavily on agents and become increasingly worried about losing control on my projects. However, I still doubt whether CP has a tight connection to real-world programming tasks. (Maybe there should be some GitHub PR contests?) I totally agree that CP is a great source of fun, but I wonder if it can mean more things.

    • »
      »
      »
      4 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      I think CP does have tight connections with real-world programming in companies like Google, Telegram/TON, and other big tech companies, maybe also Huawei or Samsung, especially when it comes to writing software for programmers or working on systems where performance, memory, and algorithms really matter. But I am not completely sure. About GitHub PR contests, I would refer to the speaker I mentioned earlier. He is one of the main engineers behind Apache Airflow, and he said that every time a new version is introduced, because it is a big open-source project, there are thousands of PRs created by agents. People prompt agents with things like “What would you add?” or “Are there any bugs?” and then submit the generated PRs. A fun fact is that he said many of these PRs are almost the same, but submitted by different people, which basically confirms that they were generated by agents. I think that nowadays CP has become more like a sport, and people do it as a hobby, unless they want to get hired by a very good company or win some programming olympiads for certain benefits, such as easier admission to university.

    • »
      »
      »
      4 months ago, hide # ^ |
       
      Vote: I like it -7 Vote: I do not like it

      CP has never had a tight connection to real world programming tasks (interviews don't count). It was simply not a thing. The similarity spectrum goes something like this:

      • solving problems in contest
      • upsolving
      • problemsetting
      • making an angry comment declaring that your solution (which got rejected) is actually correct
      • inventing competitive programming from scratch
      • real world programming

      I'm not kidding. You never need to solve a problem that has a known available solution because then you just buy the solution; the more the problem you're solving seems like it has an available solution, the less valuable your work is. You're either taking a solution that exists, declaring that the way it's done sucks ass and you can and should do it better, or you're primarily trying to figure out what open problem you're solving. And you have no objective judge system to rely on; if anything you need to make your own as you go.

»
4 months ago, hide # |
 
Vote: I like it -15 Vote: I do not like it

Rathan_2526 check this account.I know this guy very closely and this is the only acc which he has,considering that just think of him going to CM with just around 230 problems and see the jumps.For privacy i am commenting this from another account.

»
4 months ago, hide # |
 
Vote: I like it +75 Vote: I do not like it

i truly don't get it. what is the point of solving a problem if the author already knows how to solve it and has written the solution? if there is a point in this case, then why shouldn't there be a point in doing competitive programming when AI can do it?

»
4 months ago, hide # |
 
Vote: I like it +34 Vote: I do not like it

Because I want to.

»
4 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Because I love CP.

»
4 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

I care about solving problems, not comparing myself to AIs

»
4 months ago, hide # |
 
Vote: I like it -9 Vote: I do not like it

I recently came across a DeShaw interview problem which they claimed to be LLM proof.

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

For fun