← Latest papers
🤖 AI

A Showdown of ChatGPT vs DeepSeek in Solving Programming Tasks

This study compares ChatGPT 03-mini and DeepSeek-R1 on Codeforces programming tasks, revealing that while both models perform similarly on easy problems and struggle with hard ones, ChatGPT significantly outperforms DeepSeek-R1 on medium-difficulty challenges.

Original authors: Ronas Shakya, Sam Urmian, Mohammad Khalil

Published 2026-05-21
📖 4 min read☕ Coffee break read

Original authors: Ronas Shakya, Sam Urmian, Mohammad Khalil

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine two brilliant but very different students sitting down for a series of coding exams. One is ChatGPT (specifically the o3-mini version), a well-known, highly trained student who has read almost every book in the library. The other is DeepSeek-R1, a newer, open-source challenger from China known for its intense focus on logical reasoning and math puzzles.

The researchers from the University of Bergen decided to put them to the test using a "gym" for programmers called Codeforces. They gave both students 29 problems, ranging from simple warm-ups to grueling marathons, and asked them to write C++ code to solve them.

Here is how the showdown played out, broken down by difficulty:

1. The Warm-Up (Easy Tasks)

Think of these as simple arithmetic problems or basic logic puzzles.

  • The Result: Both students did a great job. They were like two top-tier athletes running a 100-meter sprint; they both finished the race successfully.
  • The Catch: While both got the answers right, DeepSeek sometimes ran a little slower and used a bit more "energy" (memory) than ChatGPT, but they both crossed the finish line.

2. The Middle Distance (Medium Tasks)

This is where the race got interesting. These problems required a bit more strategy and planning.

  • ChatGPT: This student was the clear winner here. They solved about 55% of these problems correctly. They were like a seasoned marathon runner who knows exactly how to pace themselves.
  • DeepSeek: This student struggled significantly, solving only about 18% of the medium problems. It was as if they got confused halfway through the race, tripped over their own feet, or forgot the rules.
  • Why? The paper suggests ChatGPT might have had more practice with this specific type of "competitive programming" data during its training, giving it a head start.

3. The Ultra-Marathon (Hard Tasks)

These were the toughest challenges, requiring complex, multi-step logic.

  • The Result: Both students hit a wall.
    • ChatGPT managed to solve only 1 out of 9 hard problems.
    • DeepSeek failed to solve any of the hard problems (0%).
  • The Metaphor: Imagine asking both students to build a skyscraper from scratch without a blueprint. They both got stuck. ChatGPT tried to build a few floors before the structure collapsed (runtime errors), while DeepSeek often couldn't even start the foundation (compilation errors) or ran out of energy (memory limits) before finishing.

The "Energy" Consumption (Memory and Time)

The researchers also looked at how much "fuel" (computer memory) and time each student used.

  • ChatGPT was generally faster and more efficient with its resources on the easier and medium tasks.
  • DeepSeek sometimes used a massive amount of memory or took a very long time to think, especially on the hard tasks. In one instance, DeepSeek took so long to think about a problem that it timed out completely.

The Bottom Line

The paper concludes that while DeepSeek-R1 is a powerful new contender that can handle simple tasks well, ChatGPT o3-mini is currently the better "coach" for medium-difficulty coding challenges. However, when the problems get truly difficult, both models need human help. They aren't ready to solve the hardest puzzles on their own yet.

Important Note from the Study:
The researchers only asked each student to try the problem once (a "single-shot" attempt). They didn't let them try again if they failed or ask for hints. The paper notes that if humans were allowed to guide them or if they used a different, more specialized version of DeepSeek (called DeepSeek-Coder), the results might have been different. But based on this specific test, ChatGPT came out ahead in the middle ground, while both struggled at the top level.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →