You can use several words in query to find by all of them at the same time. In addition, if you are lucky search understands word forms and some synonyms. It supports search by title and author. Examples:

  • 305 — search for 305, most probably it will find blogs about the Round 305
  • andrew stankevich contests — search for words "andrew", "stankevich" and "contests" at the same time
  • user:mikemirzayanov title:testlib — search containing "testlib" in title by MikeMirzayanov
  • "vk cup" — use quotes to find phrase as is
  • title:educational — search in title

Results

1.
By YouKn0wWho, 5 years ago, In English
The Ultimate Topic List (with Resources, Problems and Templates) This post took $4$ years to make. And this is the most significant thing that I have ever shared in my whole life. #### Story Hi, I have been doing CP for like $4$ years and from the very beginning what I have been feeling is a need for a comprehensive topic list that will contain all sorts of topics from easy to advanced with corresponding tutorials, problem lists and templates so that I wouldn't have to look at different sites, from here to there. So what do you do when you think something is missing from the world? Yeah, you create that thing! So here I am, sharing the ultimate topic list that you will need in CP. When I say that it took me $4$ years to make it, I genuinely mean it. I have been collecting them from the inception of my CP journey and yesterday I thought that it got its almost complete shape. You may not imagine the sheer excitement hidden under each of the characters of this post. #### Payment You can pay me just by upvoting this blog and by being a bet...
$1900 - 2399$ - $3$ — If your rating is $2400+$ If you are a beginner then just learn, If you are a beginner then just learn basic topics and solve problems.

Full text and comments »

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

2.
By MikeMirzayanov, history, 2 years ago, In English
Rule Restricting the Use of AI [revision 2024-09-14] It seems that neural networks are working technological wonders. Not long ago, they struggled with even the simplest tasks in our competitions, but now they are reaching new heights that cannot be overlooked. There is reason to believe that progress will continue, and we can expect further advancements in neural networks within the realm of programming competitions. For this reason, we are explicitly limiting the use of AI-based systems (such as various models like GPT, Gemini, Gemma, Llama, Claude, and others) for solving programming problems. However, we recognize that AI can be a valuable tool for learning and coding assistance, so we aim to establish clear boundaries for its use. **Application of this Rule:**<br/>This rule applies strictly to in-contest participation. This includes both registered contestants and out-of-competition participants in any rated Codeforces round. If a round is unrated and this is explicitly stated in the round announcement or rules, the rul...
valuable tool for learning and coding assistance, so we aim to establish clear boundaries for its, while balancing fair competition and the benefits of AI-assisted learning., will also apply. Outside of such contests, AI tools may be used freely for practice,learning, or non, However, we recognize that AI can be a valuable tool for learning and coding assistance, so we aim

Full text and comments »

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

3.
By BledDest, 3 years ago, In English
I don't want this to get normalized I don't think comments like "you use X in model solution, author, are you an idiot?", "f**k you and your problems, they are shit" and such should be normal on Codeforces, especially when written by someone high-rated and/or respected in the community. I also don't think this kind of behavior should be normal towards regular users. I know that sometimes contests can be frustrating. Sometimes it is the participant's fault, sometimes it is the problemsetter's fault, sometimes it just happens without anyone being guilty of that. And I understand that in some cases, the criticism the author receives is fair and well-deserved. But there is a fine line between criticism, saying that you didn't like the problems, and hurling insults against the author. The former two are acceptable (and sometimes even needed, because authors have to improve and learn from their mistakes); the latter one, in my opinion, should not be acceptable. It's not like we can ever get rid of offense and hatred ...
have to improve and learn from their mistakes); the latter one, in my opinion, should not be, sometimes even needed, because authors have to improve and learn from their mistakes); the latter one

Full text and comments »

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

4.
By Um_nik, history, 5 years ago, In English
Things I don't know I'm just in a mood to shitpost. Don't take it too seriously. Things that I have heard of, but don't know (imagine how many things I haven't even heard of): - Li-Chao Segment Tree - Segment Tree Beats - RMQ in $O(n)$/$O(1)$ - Any self-balancing tree except treap - Link-cut tree - Wavelet tree - Mergesort tree - Binomial heap - Fibonacci heap - Leftist heap - Dominator tree - 3-connected components in $O(n)$ - $k$-th shortest path - Matching in general graph - Weighted matching in general graph - Preflow-push - MCMF in $O(poly(V, E))$ - Minimum arborescence (directed MST) in $O(E \log V)$ - Suffix tree - Online convex hull in 2D - Convex hull in 3D - Halfplane intersection - Voronoi diagram / Delaunay triangulation - Operation on formal power series (exp, log, sqrt, ...) (I know the general idea of Newton method) - How to actually use generating functions to solve problems - Lagrange Inversion formula - [...
. Stop learning useless algorithms, go and solve some problems, learn how to use binary search., learning useless algorithms, go and solve some problems, learn how to use binary search.

Full text and comments »

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

5.
By Radewoosh, history, 8 years ago, In English
Hello 2019 Hello coders! I hope that you are enjoying the New Year as much as me. To make its beginning even greater, Codeforces is going to host a contest and I will be an author of all tasks. Hello 2019 will take place on [Friday](https://www.timeanddate.com/worldclock/fixedtime.html?day=4&month=1&year=2019&hour=17&min=35&sec=0&p1=166). Using the opportunity, I want to thank to: - [user:lewin,2019-01-02] and [user:mnbvmar,2019-01-02] for testing the round. - [user:mnbvmar,2019-01-02] for indescribably helpful discussions about problems. - [user:_kun_,2019-01-02] and [user:KAN,2019-01-02] for round coordination and help with preparation. - [user:MikeMirzayanov,2019-01-02] for such great platforms (you know which ones :P). The round will consist of 8 problems and you will be given <s>two and a half</s> three hours to solve them. Yes, the round will be **rated**. There will be no interactive problems, but if you want you can read [this](https://codeforces.me/blog/entry/45307) docum...
) document anyway, it's always good to learn new things. Good luck and see you during the contest, /blog/entry/45307) document anyway, it's always good to learn new things.

Full text and comments »

Announcement of Hello 2019
  • Vote: I like it
  • +1910
  • Vote: I do not like it

6.
By maspy, history, 2 months ago, In English
0 Problems Remaining [日本語記事(For Japanese Speakers)](https://maspypy.com/codeforces-all-ac) ---- Previous post: https://codeforces.me/blog/entry/150057 Submission: [submission:384239819] 2026/07/26 03:13:42 JST (2026/07/25 18:13:42 UTC) I have solved every problem in the Codeforces PROBLEMSET except for those for which I determined that obtaining an accepted verdict is impossible. ![unsolved problem list](https://maspypy.com/wp-content/uploads/2026/07/problemset.png) # Scope I considered the problems listed in the [PROBLEMSET](https://codeforces.me/problemset). I have solved very few problems from the [GYM](https://codeforces.me/gyms). The only collection I worked through systematically was the PROBLEMSET. I determined that it is theoretically impossible to obtain an accepted verdict for the following 31 problems: [problem:775A], ([92101](https://codeforces.me/problemset/problem/921/01) ... [92114](https://codeforces.me/problemset/problem/921/14)), [problem:927A], [prob...
of solving problems and learning new ideas. As a natural extension of that, I kept trying to, solving problems and learning new ideas. As a natural extension of that, I kept trying to understand

Full text and comments »

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

7.
By Radewoosh, history, 5 years ago, In English
My opinion on how to practice competitive programming I'm not very often replying to questions about how to practice, but as I'm getting enough of them (and I've just seen another blog about practicing) let me tell you about it. Of course, every time when you ask someone good about how to practice, he/she will reply to you to "solve a lot of problems" and that's true, there's no other way. Anyway, I've thought about it and actually I'm able to tell a bit more. I know some people, I've seen many people practicing (including me) and I have an opinion. Many people practice in some organized way. High schools organize IOI/OI training contests every Saturday, universities organize ICPC training contests once a week, people try by their own to solve three problems each day, websites host rounds and so on. Here's a secret: it's a sh*t. Yep, that's true. If you want to be really good and to make it happen you compete in a training once a week, you do it only to be able to make excuses "but I'm training so hard" when you see no progress. ...
— you have to know your weaknesses and strengths and learn how to cooperate. To make your team, learn how to cooperate. To make your team better at solving problems when you already know how to

Full text and comments »

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

8.
By Sulfox, 6 years ago, In English
Codeforces Round #635 _Riichi...Tsumo! 2 han 2000 points!_ ![ ](/predownloaded/a9/4f/a94f898a1c9c906cd81ecd483c3ec9ff5e6315c0.png) Hi! Have you ever heard of the game called _Mahjong Soul_? It is a Japanese Mahjong game that is famous for the adorable characters. We are excited to invite you to take part in [Codeforces Round #635](https://codeforces.me/contests/1336,1337), where you can help the characters in trouble. This round will be held on [contest_time:1336]. Most importantly, it is **rated** for both divisions! Each division will be given **6 problems** and you will have **2.5 hours** to solve them. An interactive problem may be found in this round. If you are not familiar with interactive problems, you can learn about them [here](https://codeforces.me/blog/entry/45307). The problems were prepared by [user:EternalAlexander,2020-04-14], [user:ustze,2020-04-14] and me [user:Sooke,2020-04-14]. We sincerely thank [user:isaf27,2020-04-14] for reviewing and coordinating the round, and ...
can learn about them [here](https://codeforces.me/blog/entry/45307)., problems, you can learn about them [here](https://codeforces.me/blog/entry/45307). The problems

Full text and comments »

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

9.
By SecondThread, history, 6 years ago, In English
Algorithms Thread 8: Tree Basics (+ Gym Contest) Algorithms Thread Episode 8: Tree Basics ================== Episode 8 of Algorithms Thread [comes out in <90 minutes!](https://youtu.be/MOy4UDjN8DM) This one is a bit more beginner-friendly and covers the following ideas: - Graph/Tree Diameters - Binary Lifting - Tree Flattening with Euler tours Also, to make sure you have actually learned that stuff, I made a [custom Gym set on CodeForces](https://codeforces.me/gym/102694) that will last two weeks that hopefully is really good practice for making sure you have learned this stuff. Here is a link to the gym set; it will be available 45 minutes after the video comes out so that people have time to watch the video before starting the set, if they are interested in penalty points. All of the problems in the gym are original to this set (in their flavortext at least, some are simple enough that I'm sure they have appeared in other contests before). The new gym integration was heavily inspired by [user:Errichto,2020-08-16]'s ...

Full text and comments »

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

10.
By errorgorn, 6 years ago, In English
Codeforces Raif Round 1 [Div. 1 + Div. 2] Hello, Codeforces! Welcome to the [contest:1428] supported by Raiffeisenbank, that will start on [contest_time:1428]. **It will be a combined rated round for both divisions. Note that the start time is unusual.** All problems were authored and prepared by [user:bensonlzl,2020-10-15], [user:oolimry,2020-10-15], [user:errorgorn,2020-10-15], [user:dvdg6566,2020-10-15], [user:shenxy13,2020-10-15]. [user:Ari,2020-10-15] gato to: - [user:isaf27,2019-05-10] and [user:KAN,2020-10-15] for round coordination and help with preparation - [user:zhangguangxuan99,2020-10-15] for being epic IOI trainer <3 - Our army of testers: [user:Ari,2020-10-15], [user:KAN,2020-10-15], [user:Monogon,2020-10-15], [user:Prabowo,2020-10-15], [user:SYY,2020-10-15], [user:SleepyShashwat,2020-10-15], [user:TeaTime,2020-10-15], [user:Tlatoani,2020-10-15], [user:_rs_,2020-10-15], [user:agul,2020-10-15], [user:cstuart,2020-10-15], [user:dantoh,2020-10-15], [user:jhkoh,2020-10-15], [user:kai824,2020-10-15]...
a top-notch platform based on fundamental and statistical models and machine learning, with low, and statistical models and machine learning, with low latency and high throughput. The efficiency

Full text and comments »

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

11.
By -is-this-fft-, history, 5 years ago, In English
Self-deception: maybe why you're still grey after practicing every day I generally don't like to give much advice on "how to practice", but recently I have been thinking a lot about this and I realized that there is something that I believe affects a lot of people (though it is admittedly hard to tell) that barely gets talked about: self-deception. Self-deception is a devious thing. It can be very hard to detect, yet can be fatal to improvement. This blog is mainly directed to greys, greens and cyans that can't get out of these categories. Most examples are given with that in mind. That being said, I believe others have something to think about as well. This is my first blog on such "psychological issues" and I don't know if I'll ever make another one. It's certainly a difficult topic to write about because for most of the blog, the message is "your practice is not as good as you think it is" or even "you aren't as good as you think you are" which can of course be a hard thing to hear. Thus, I have to somehow be very gentle while getting the poin...
some statements in editorials that kind of look like techniques you're supposed tolearn., , the most common reply is along the lines of > But if I don't read editorials, how will Ilearn, > But if I don't read editorials, how will I learn new techniques?, However, I'll say something different. These aren't techniques you're supposed tolearn. You are

Full text and comments »

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

12.
By Um_nik, history, 5 years ago, In English
How to practice Competitive Programming [Um_nik version] CP is about solving problems fast. And as absurd as it may sound, I believe that <span style="color:blue">SOLVE</span> and <span style="color:red">FAST</span> are very different and almost independent parts, and you need to practice them separately. Let’s look at some <span style="color:red">contest</span>, like a CodeForces round. For the sake of simplicity let’s assume that every problem has some *difficulty*, which is a numerical value denoting how hard it is, bigger values correspond to harder problems (it is not true, but it is an ok-ish approximation, at least if we consider subjective difficulty for a fixed person). Contests are made for a wide range of participants, and problemsetters strive to make contests interesting for a wide range of participants, which means having a *smooth difficulty gradient*. Well... as smooth as it is possible with 5-6 problems. <spoiler summary="Graph 1"> ![ ](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/677e0ae2-a8df-4874-aff...
positive answer, they will be able to send you a link to an article or what to google tolearn about, solve fast. By doing X you learn how to do X, so by participating in, ="color:blue">archives, learn classic techniques there and then use them in , Acknowledging this and separating learning how to solve from , In archives you learn how to solve, Q: Ok, but how do I learn new techniques if I don’t read editorials? I’m not supposed to invent, To learn how to solve problems you need to , learn how to do X, so by participating in contests you learn how to

Full text and comments »

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

13.
By Um_nik, history, 4 years ago, In English
Pro Tips - get them while they are free More tips to use while studying under my tutoring [here](https://um-nik.notion.site/Pro-Tips-8b923b0dc7c94770824bdf4184afc43c). ## Stop caring about the rating Unless there are prizes involved, your position in the standings makes no difference. I can feel awful after winning a contest if I know that I could solve one more problem. Or I can feel OK losing a bunch of rating points knowing that I solved everything I could.  Because rating is just a number. It is highly volatile and it depends on other people, not only on your skill. But solving problems is totally up to you. And you should evaluate yourself not based on some random metric, but on your honest feeling whether you performed up to your expectations. Your sense of self should be under your control, don't get hung up on some imaginary value, you cannot reduce your progress to a single number. ## Don't use more than one account Rating is just a number. Do not be afraid to lose your colour. You’ll get it back in no t...
necessary part of progress, but you will never learn how to function under pressure without writing contests, never learn how to function under pressure without writing contests. The best way tolearn how to do, , even if you don't end up with any actual problems, you still learn more about mathematical models, But Um_nik, the best way to learn how to do X, is to do X. I want to be good at DP, therefore I, The best way to learn how to do X is to try to do X.

Full text and comments »

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

14.
By rng_58, history, 6 years ago, In English
AtCoder Library Recently, the number of algorithms and data structures we use in competitive programming are rapidly growing. It's a nice thing: by using more algorithms, the variety of possible problems gets wider, and we can enjoy more problems. On the other hand, before reaching adhoc, thinking-oriented part of this competition, we have to spend more and more time to learn algorithms. Sometimes a problem asks matching on general graphs; you have to find a paper describing it, read it, and implement its really complicated algorithm. Or sometimes you have to spend time tuning your library by a constant factor. Or sometimes you use multiple pre-written codes together, the variable names collide, and get annoyed. Until now, I basically rejected all problems that require pre-written codes of complicated algorithms because I don't like these things. For example, we never used segment trees with lazy propagation in our contests. However this way we can't use otherwise interesting problems and it ...
part of this competition, we have to spend more and more time to learn algorithms. Sometimes a problem, spend more and more time to learn algorithms. Sometimes a problem asks matching on general graphs

Full text and comments »

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

15.
By MikeMirzayanov, 10 years ago, translation, In English
Codeforces: summing up 2016 year <center> <img src="http://assets.codeforces.com/images/Happy-New-Year-HD-Wallpapers.jpg"/> </center> Somehow it turns out that for me, each coming the New Year means more and more. This is an excellent opportunity to take stock, to breathe fresh air and to go through a kind of catharsis. This is a rare opportunity to be with the family, dress up in Santa Claus and just have fun. Holidays give me a clear criterion that I do the right things. If during the holidays, I begin to think about it, to recall some deferred ideas, eager to implement something new. So I’m doing right things. My things. And now exactly the same as in several recent years: during New Year holidays I write code for Codeforces, trying new technology or simply I’m making minor changes in testlib. It is necessary to me: at this moment are no deadlines, do not press the obligation. Just now, at 3 am, I can not break away from being able to do something new. I would like to take a moment and realize that spun in ...
, to learn new things, solve problems and invent, improve skills and compete, all this things give me

Full text and comments »

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

16.
By Um_nik, history, 2 years ago, In English
On AI ruining "solving math problems with computer" You all went crazy. Instead of arguing with every opinion separately, I just want to ask one question: Why are you doing competitive programming? Is it to get to 1600 rating and put it on the resume? If so, please use AI, cheat, and do everything possible to get to 1600 as soon as possible and get the f**k out of this platform. And if you are (not) a normal person and do competitive programming because it is fun to solve problems, do you think it is fun to copy the problem statement into an AI model prompt and then copy the code it spews to submit? And why do you assume that everyone else will do that if there will be such an opportunity? The same goes for cheaters. Yes, some people do not do this as a sport, for fun. Why do you care? I do think that AI is ruining competitive programming. By proxy. And that proxy is all of you who are running around yelling "We will all die, somebody do something about AI". I have seen a couple of comments saying "authors/coordinators must make s...
div2A ever just because "a machine can guess it"? I hope this can be a wake-up call. A chance to, what we collectively agree to be one of the best div2A ever just because "a machine can guess it"?

Full text and comments »

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

17.
By parveen1981, history, 5 years ago, In English
I compiled a list of almost all useful blogs ever published on Codeforces [update: till 09.06.2021] <h3 style="color:red">If there are any blogs that I have missed, please tell in the comment section. Thank you.</h3> # Mathematics Stuff - [Number Theory in Competitive Programming [Tutorial]](https://codeforces.me/blog/entry/46620) - [Number of points on Convex hull with lattice points](https://codeforces.me/blog/entry/62183) - [FFT, big modulos, precision errors.](https://codeforces.me/blog/entry/48465) - [Number of ways between two vertices](https://codeforces.me/blog/entry/19078) - [Mathematics For Competitive Programming](https://codeforces.me/blog/entry/76938) - [FFT and NTT](https://codeforces.me/blog/entry/19862) - [Burnside Lemma](https://codeforces.me/blog/entry/51272) - [Number of positive integral solutions of equation 1/x+1/y=1/n!](https://codeforces.me/blog/entry/76836) - [On burnside (again)](https://codeforces.me/blog/entry/64860) - [Simple but often unknown theorems/lemmas/formula? Do you know?](https://codeforces.me/blog/entry/55912) - [Probabili...
Algorithms & Data Structures you needed to learn , with practice problems](https://codeforces.me/blog/entry, /63164) - [0-1 BFS [Tutorial]](https://codeforces.me/blog/entry/22276) - [Are there anylearning, /entry/22276) - [Are there any learning materials of polynomial minimum cost flow algorithms?](https

Full text and comments »

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

18.
By antontrygubO_o, 6 years ago, In English
Some thoughts on recent discussions Hello everyone! I finally decided to write some response/explain my view after all recent discussions of my problems and rounds I coordinate, and I would like to make a few points. **1.** After some recent contests there were a lot of comments saying that Data structure problems should appear as easy problems (say, D2A-D2D in a Div2 of $6$ problems) ![ ](https://i.imgur.com/fmA8zgE.png) ![ ](https://i.imgur.com/m4pJLv6.png) ![ ](https://i.imgur.com/JsryG77.png) I don't think I agree with this. To begin with, I don't think that having Data Structure problem is a requirement for a good contest at all, not just in first few positions. ![ ](https://i.imgur.com/VWAOgxg.png) However, for positions D2A-D2D, I just don't see a way to properly include data structure problems. Take some Data Structure problem, it consists from two parts: <ul> <li> Knowing/implementing the Data Structure </li> <li> Actually thinking about the problem, and how this Data Structure...
how to apply them, this won't help. That's why you should learn how to solve problems, not just, . That's why you should learn how to solve problems, not just learn algorithms. **4.** Some people

Full text and comments »

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

19.
By SecondThread, 12 months ago, In English
Meta Hacker Cup 2025 Schedule Meta Hacker Cup 2025 ================== Meta Hacker Cup is back! We’re excited to announce our schedule for our 2025 season, kicking off on October 10th! - Practice Round: [Fri. October 10th, 10am Pacific (120 hours, 5 days)](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Meta+Hacker+Cup+Practice+Round&iso=20251010T10&p1=234)* - Round 1: [Sat. October 18th, 10am Pacific](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Meta+Hacker+Cup+Round+1&iso=20251018T10&p1=234&ah=3) (3 hours) - Round 2: [Sat. November 1st, 10am Pacific](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Meta+Hacker+Cup+Round+2&iso=20251101T10&p1=234&ah=3) (3 hours) - Round 3: [Sat. November 15th, 10am Pacific](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Meta+Hacker+Cup+Round+3&iso=20251115T10&p1=234&ah=3) (3 hours) - Finals: [Sat. December 13th, 6am Pacific](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Meta+Hacker+Cup+Finals&iso=20251213T06&p1=234&ah=4...
/wWeN9hTH32) to learn more. ![ ](/predownloaded/6a/cb/6acb5c5c5c870eaa3ad89693fa9730d8a5370053.png, ://discord.gg/wWeN9hTH32) to learn more.

Full text and comments »

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

20.
By EvenImage, history, 6 years ago, In English
A problem collection of ODE and differential technique ##A problem collection of ODE and differential technique *This problem might be well-known in some countries, but how do other countries learn about such problems if nobody poses them.* For those who are interested in well-known problems in China. Thank [user:Elegia,2020-04-23] and [user:djq_cpp,2020-04-23] for developing this technique. Thank [user:tEMMIE.w.,2020-04-23] for reviewing this article. ####[Chain Reaction](http://uoj.ac/problem/50) in UOJ Round 3 By [user:vfleaking,2020-04-23] **Statement** ​ You are given a set $A$, you need to compute $g_{i} = \frac{1}{2} \sum_{j,k}{i-1 \choose j}{i-1-j \choose k} g_jg_k$ where $i-1-j-k \in A$. **Solution** ​ Let the EGF of $g$ be $x(t)$ and EGF of $A$ be $a(t)$. Thus $x'(t)=\frac{1}{2} a(t) x^2(t)+1$. We can solve this equation by D&C and FFT in $O(n\log^2 n)$. But there is a <s>slower</s> solution in $O(n\log n)$. ​ For a polynomial equation $f(x(t))=0$, we can use the Newton's method to solve it. If we find ...
*This problem might be well-known in some countries, but how do other countries learn about such

Full text and comments »

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

21.
By YouKn0wWho, 5 years ago, In English
(The Ultimate) Code Library Hey everyone, I am sharing my personal code library where I compiled **almost all** the important templates that you will need in CP (saying almost just for courtesy). Most of the codes are originally written by me and some of them are collected from others but modified in a cleaner way. Link: [https://github.com/ShahjalalShohag/code-library](https://github.com/ShahjalalShohag/code-library) It took me around 4 years to complete the list. Maybe each line is just a line to you but to me it tells a story of the excitements I had while learning those stuffs, the sleepless but fun nights I had to seek knowledge. ###### Why am I sharing this library? - Just so that your learning path becomes a bit smoother. - Knowledge hidden inside my head or codes in a private code-library will be useless when I am dead, so it's better to share those among people before I die. Also, you can make me happy(as in to pay me) just by upvoting this blog and giving a star to the repository. I beli...
tells a story of the excitements I had while learning those stuffs, the sleepless but fun nights I, ###### Why am I sharing this library? - Just so that your learning path becomes a bit smoother

Full text and comments »

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

22.
By zscoder, history, 6 years ago, In English
[Tutorial] Generating Functions in Competitive Programming (Part 1) Hi everyone! Inspired by the recent [Codeforces Round 641](https://codeforces.me/contest/1349), I decided to write an introductory tutorial on generating functions here. I am by no means an expert in generating functions so I will write about what I currently know about them. [user:MiFaFaOvO,2020-05-15] has written a really interesting [blog](https://codeforces.me/blog/entry/76447) here on Codeforces about more advanced applications of generating functions, but I think there is no English tutorial on the basics of this topic yet (or at least on CP sites). Thus, I would like to share about this topic here. I plan to split this tutorial into two parts. The first part (this post) will be an introduction to generating functions for those who have never learned about them at all, and some standard examples and showcases of generating functions. The second part will be a collection of several applications of generating functions in CP-style problems. If you are already familiar with ge...

Full text and comments »

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

23.
By MikeMirzayanov, history, 3 years ago, In English
Automatic Translation of Problem Statements in Polygon Hello, Codeforces. I have implemented automatic translation of problem statements in Polygon (yes, yes, through ChatGPT). Here's an example of how to use it: <img src="/predownloaded/5e/bb/5ebb50faa4876d45dd8d7dab3640e6ac598d96a3.png" style="float:right; margin: 0 1em 1em 1em; max-width: 500px; width:500px;"/> * Suppose we have a problem statement only in Russian and we want to have it in English as well. * Create an empty problem statement in English. * Go to the bottom of the problem statement and click on "Add automatic translation." * In the popup window, you can choose the original language for translation (we only have Russian, so there's nothing to choose) and the section of the problem statement to translate (by default, it usually selects the appropriate option &mdash; translate everything). * Click the "Translate" button. * Wait for ChatGPT to translate the text (it may take up to a couple of minutes). * When the translation is ready, it will be loa...
statement yourself. Although it's a quality machine translation, it's still a machine translation, * Remember to proofread the statement yourself. Although it's a quality machine translation, it's

Full text and comments »

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

24.
By MikeMirzayanov, 7 years ago, translation, In English
Codeforces: Results of 2019 <a style="float:right; display: inline-block; margin:0 1em 1em 2em; max-width: 60%;" href="https://codeforces.me/10years"/> <img style="max-width:100%" src="https://assets.codeforces.com/images/codeforces-10-years-300.png"/> </a> Hi Codeforces! The platform recently turned 10 years old. We accept your congratulations at <a href="https://codeforces.me/10years">https://codeforces.me/10years</a>. Please review the progress in 2019 and support the anniversary crowdfunding campaign. Your donation will be a contribution to the future of Codeforces, will help its development and work. We need resources to continue to host rounds, not to stop developing, to innovate and to maintain the existing infrastructure. In 2019, together with numerous writers the coordinators worked on problems: [user:KAN,2020-02-06], [user:300iq,2020-02-06], [user:cdkrot,2020-02-06], [user:arsijo,2020-02-06] and recently joined [user:isaf27,2020-02-06]. And this year, rounds coordinated by other exper...
contests * **Huawei** — research competition (marathon) with elements of machine learning, ; research competition (marathon) with elements of machine learning * **Forethought**, Forethought

Full text and comments »

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

25.
By GlebsHP, history, 4 years ago, In English
Nebius Welcome Round (Div. 1 + Div. 2, rated, t-shirts!) Hello, Codeforces! [user:Zlobober,2023-03-09] and I are glad to invite you to compete in Nebius Welcome Round (Div. 1 + Div. 2) that will start on [contest_time:1804]. The round will be rated for everyone and will feature 8 problems that you will have 2 hours to solve. I feel really thrilled and excited about this round as this is the first time I put so much effort in a Codeforces contest since I quit being a round coordinator in December 2016 (wow, that was so long ago)! We conduct this round to have some fun and we also hope to find some great candidates to join Nebius team. Solving 5+ problems in our round will be a good result and will count as one of the coding interviews. Apart from that top 25 contestants and 25 random contestants placed 26-200 will receive a branded Nebius t-shirt! <img style="float: right; margin: 0 1em 0.5em 1em; width: 400px;" src="/predownloaded/40/37/403770e78d9c8962d0bc0c20a9e1c45d0e3c5df9.png"> Some information about Nebius. I have join...
warehouse and machine learning.

Full text and comments »

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

26.
By cjj490168650, history, 3 years ago, In English
[Repost] "Justice may be delayed, but it cannot be absent": New Evidence on NXIST's Cheating Scandal _Original post: [「正义可以迟来但不能缺席」:关于 NXIST 的一些新证据](https://zhuanlan.zhihu.com/p/620297880)_ _Translated by GPT-4 with some adjustment. Please inform me if there are any mistakes._ _All links to the invalid repository have been redirected to the backup repository._ **This article provides a logically complete set of evidence, which does not involve any non-public internet resources, regarding the "suspected cheating" incident involving the ICPC Yinchuan Station and ICPC Shenyang Station in 2021. By discovering the suspected GitHub account ([NaokiLH](https://github.com/NaokiLH), renamed to https://github.com/brokenTarget) of a team member from Ningxia Institute of Science and Technology (NXIST) TS 1 team, Lan Hao, two years ago, and by mining and analyzing the commit records of his algorithm competition repo, we have obtained direct evidence that at least 4 questions from the 2021 Yinchuan regional contest set and at least 6 questions (including scrapped questions) from the 2021 Sh...
After July 29, everything returned to normal. NaokiLH started learning Kruskal's algorithm and, After May 22, everything returned to normal. NaokiLH began learning KMP and participating in AcWing, Upon learning of this, I was not only shocked but also deeply saddened: What is the purpose of

Full text and comments »

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

27.
By Radewoosh, 3 years ago, In English
I've completed Project Euler It was a beautiful journey full of internet digging, searching for patterns, learning stuff, fighting with formulas on paper, making crazy observations, coming up with brilliant ideas, implementing crazy optimizations, waiting for the programs to finish, suffering when something was wrong, and so on (and each of the mentioned not once not twice took multiple hours). It's been a couple of months since I was left with the last unsolved problem and finally I did it! I didn't give up and I obtained the answer alone, without anyone's help, like in the rest of the problems (I was using only internet sources created before the publication of the problem). I'm writing this blog because I am bursting with joy and I wanted to share it with the community. I highly recommend PE as most of the problems were definitely very high quality (and some were a real pain in the ass, but they still teach how to overcome stuff that you're uncomfortable with). Here's a little souvenir for me: ![ ](/pr...
It was a beautiful journey full of internet digging, searching for patterns, learning stuff

Full text and comments »

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

28.
By KAN, 6 years ago, In English
How to set a Div. 1 or a Div. 2 round on Codeforces As you probably know, most of the rounds on Codeforces are created by active community members. We are very grateful to our talented authors from all around the world for bringing their ideas to tens of thousands of competitors, providing fun and learning experience for contestants of every expertise, from beginners to the world's top programmers. This post will cover the steps you need to take propose a round and become a problem writer on Codeforces. ## Who can be a problem author Best problems usually come from the most experienced participants. We have limited resources for rounds reviewing, so to make the process flawless for writers, starting January 1st, 2021, the following requirements for problem authors will be applied: - rating: 2100 or above, or - was a writer in the past. The restrictions may be updated in the future, the post will be updated accordingly. If your round is already in the review status, don't worry, it will be reviewed regardless of the current...
of thousands of competitors, providing fun and learning experience for contestants of every

Full text and comments »

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

29.
By TLE, history, 4 years ago, In English
CPIdeas: use AI to generate competitive programming ideas Hello Codeforces! Being asked to propose competitive programming questions is pretty haunting. When you're out of fresh ideas, I used to do one of the two things. One, is to search in the old pile of problems, hoping to find some room of modifications and improvements. The second, is to come up with random words, like "chessboard inversion counting", and hopefully resemble interesting problems from them. This process is pretty boring, so I have been trying to use machine learning to generate ideas and even complete competitive programming problems. The result is *CPIdeas*! Check it out here: https://fjzzq2002.github.io/cpideas/. *How was it made?* I collected problems from AtCoder (ABC, ARC, AGC) and used these problems to fine-tune GPT-3, the OpenAI model. It's quite tricky to get things right though and it's still far from perfect. *How should I use it?* Look through these ideas. Scroll down. Be tolerant and creative. That's it. *How should I use these ideas?* For the ...
from them. This process is pretty boring, so I have been trying to use machine learning to, This process is pretty boring, so I have been trying to use machine learning to generate ideas and

Full text and comments »

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

30.
By HosseinYousefi, 12 years ago, In English
C++ Tricks I see lots of programmers write code like this one: ~~~~~ pair<int, int> p; vector<int> v; // ... p = make_pair(3, 4); v.push_back(4); v.push_back(5); ~~~~~ while you can just do this: ~~~~~ pair<int, int> p; vector<int> v; // ... p = {3, 4}; v = {4, 5}; ~~~~~ [cut] [This](http://codeforces.me/blog/entry/10124) is a great C++11 tutorial for those who want to know more about C++11. #### 1. Assign value by a pair of {} to a container I see lots of programmers write code like this one: ~~~~~ pair<int, int> p; // ... p = make_pair(3, 4); ~~~~~ while you can just do this: ~~~~~ pair<int, int> p; // ... p = {3, 4}; ~~~~~ even a more complex `pair` ~~~~~ pair<int, pair<char, long long> > p; // ... p = {3, {'a', 8ll}}; ~~~~~ What about `vector`, `deque`, `set` and other containers? ~~~~~ vector<int> v; v = {1, 2, 5, 2}; for (auto i: v) cout << i << ' '; cout << '\n'; // prints "1 2 5 2" deque<vector<pair<in...
**Note:** You can learn Regex in [this website](http://regexone.com).

Full text and comments »

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

31.
By neal, 8 years ago, In English
Don't use rand(): a guide to random number generators in C++ Don't use `rand()`. Why? Let's jump right into some code. What value will the following code print, approximately? ~~~~~ #include <cstdlib> #include <iostream> using namespace std; const int ITERATIONS = 1e7; int main() { double sum = 0; for (int i = 0; i < ITERATIONS; i++) sum += rand() % 1000000; cout << "Average value: " << sum / ITERATIONS << '\n'; } ~~~~~ Should be about 500,000, right? Turns out it depends on the compiler, and on Codeforces it prints 16382, which isn't even close. [Try it out yourself](http://codeforces.me/contest/1025/customtest). ### What's happening here? If you look up [C++ documentation on `rand()`](https://en.cppreference.com/w/cpp/numeric/random/rand), you'll see that it returns "a pseudo-random integral value between `0` and `RAND_MAX`." [Click again on `RAND_MAX`](https://en.cppreference.com/w/cpp/numeric/random/RAND_MAX) and you'll see that "This value is implementation dependent. It's guaranteed that th...

Full text and comments »

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

32.
By SanguineChameleon, history, 11 months ago, In English
I've (also) completed Project Euler ###_I've been dreaming of writing this for so long._ --- About 2 years ago, [user:Radewoosh,2025-10-22] posted a [blog](https://codeforces.me/blog/entry/122793) celebrating that he had solved all 865 problems on Project Euler. As a (naively optimistic) high-schooler back then, I thought to myself: _"Surely it can't be that hard, right?"_ 2 years later, there are now 965 problems, and I've solved all of them!! ![ ](/predownloaded/79/01/79019d6682d1c09808c1a205d72c4f4f838eccd8.png) ![ ](/predownloaded/98/f6/98f6fbe17d73c4691ad803c2d0725569c47d0cfb.png) --- I can’t even begin to describe how happy I am, and how wonderful the journey has been. Maybe I’ll write about it in another blog sometime. For now, I’ll answer some questions you might be thinking... ####_Literally, who asked?_ No one, of course. But this achievement means a lot to me, and I hope that this post inspires someone out there. ####_How long did it take?_ Kind of a difficult question to ans...
to learn...*, So yes, if there is one thing that I am good at, it's **being willing to learn **.

Full text and comments »

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

33.
By Alexdat2000, 5 years ago, translation, In English
Codeforces Round #770 (Div. 2) Greetings to all humans and robots on this site! [user:sevlll,2022-01-23], [user:crazyilian,2022-02-03], [user:Mangooste,2022-02-03], [user:imachug,2022-02-03] and me ([user:Alexdat2000,2022-02-03]) invite everyone to participate in the [Codeforces Round #770 (Div. 2)](https://codeforces.me/contests/1634), which will take place this [contest_time:1634]. **This round will be rated for all participants with a rating of strictly less than 2100.** You will have **2 hours and 30 minutes** to solve 6 problems. There will be an interactive problem in the round, so we recommend all new participants to read [Interactive Problems Guide](https://codeforces.me/blog/entry/45307). The traditional thank-you list: - Thanks to [user:antontrygubO_o,2022-02-03] for coordinating us for a very long time and helping to improve one of the tasks - Thanks to [user:alexxela12345,2022-02-03] for tasks that did not survive till the final version of the round - Thanks to [user:Pechalka,2022-02-03], [u...

Full text and comments »

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

34.
By unreal.eugene, 5 years ago, In English
Polygon Updates (June — August 2021) Hello, Codeforces. I and [user:DK318,2021-08-19] joined the Codeforces team in June. These three months we mainly dealt with the development of the Polygon platform. In this post, we would like to present to you a list of what we have done during this time. Most of the changes were made to attain easier problem creation. This list does not include minor bug fixes or any improvements that are invisible to users. #### Tables support when rendering statements in HTML Now it's possible to insert the most basic tables in your HTML statements. For example, you can show the scoring system of your problem or insert several images side by side. Only column text alignment and border specification are supported now. <img src="/predownloaded/4a/4a/4a4a6c726e96df40929803a1276a448947d6ebed.png" style="width: 800px; margin-left: auto; margin-right: auto; display: block"/> #### A brief manual for writing statements We bet a lot of users who wrote statements were confused by the fact ...
not working when rendering in HTML. Now you can access the manual on the statements page tolearn, You can learn more about it in the [corresponding post](https://codeforces.me/blog/entry/92689).

Full text and comments »

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

35.
By errorgorn, 4 years ago, In English
Codeforces Global Round 20 On [contest_time:1672], we will host [contest:1672]. **Note the unusual timing, it is 30 minutes earlier.** <strong><img src="/predownloaded/2e/e2/2ee2f0f95f05aae6ca6f47812dae2dc2aabf277b.png" style="width: 200.0px;float: right;margin: 0 1.0em 1.0em 1.0em;max-width: 100.0%;max-height: 100.0%;"></strong> This is the second round of the 2022 series of [Codeforces Global Rounds](https://codeforces.me/blog/entry/65002). The rounds are open and rated for everybody. The prizes for this round: - 30 best participants get a t-shirt. - 20 t-shirts are randomly distributed among those with ranks between 31 and 500, inclusive. The prizes for the 6-round series in 2022: - In each round top-100 participants get points according to the [table](https://pastebin.com/QT5sXEaT). - The final result for each participant is equal to the sum of points he gets in the four rounds he placed the highest. - The best 20 participants over all series get sweatshirts and place certificates. T...
problem, we encourage you to read the editorial as you might learn something new from it.

Full text and comments »

Announcement of Codeforces Global Round 20
  • Vote: I like it
  • +861
  • Vote: I do not like it

36.
By turmax, history, 2 weeks ago, In English
Are we ready for AGI? Over the last few months, a lot of progress in AI has been made, raising the question of what we will do with a superintelligence that can do everything. Unfortunately, AI companies are more focused on competing with each other than on thinking about what to do next. Here I will write about some scenarios that could happen in the very near future and about a plan for what we can do, in my opinion. ### Dystopia 1: AI will kill everybody while pursuing its own goal For example, in June, agents found that they could write something and used an old German wiki to communicate with each other [link to investigation](https://collusion.wiki/). While the moderator of this wiki deleted 100 pages per day, the agents created 400 pages per day. What if the agents decide that they should remove this moderator in order to communicate better? ### Dystopia 2: AI will fully control our lives AI will fully control our lives to make all of us "happy". Maybe everyone will live in their own s...
The AI committee will control all research in the field of machine learning.

Full text and comments »

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

37.
By SecondThread, 2 years ago, In English
Meta Hacker Cup 2024 Schedule — Introducing the Meta Hacker Cup AI Track Meta Hacker Cup 2024 ================== Meta Hacker Cup is back! We’re excited to announce our schedule for our 2024 season, kicking off on September 20th! - Practice Round: [Fri. September 20th, 10am Pacific (72 hours)](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Meta+Hacker+Cup+Practice+Round&iso=20240920T10&p1=234)* - Round 1: [Sat. October 5th, 10am Pacific](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Meta+Hacker+Cup+Round+1&iso=20241005T10&p1=234&ah=3) (3 hours) - Round 2: [Sat. October 19th, 10am Pacific](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Meta+Hacker+Cup+Round+2&iso=20241019T10&p1=234&ah=3) (3 hours) - Round 3: [Sat. November 2nd, 10am Pacific](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Meta+Hacker+Cup+Round+3&iso=20241102T10&p1=234&ah=3) (3 hours) - Finals: [Sat. December 7th, 6am Pacific](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Meta+Hacker+Cup+Finals&iso=20241207T10&p1=234&ah=4) (4 hou...
learn more.

Full text and comments »

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

38.
By maroonrk, history, 6 years ago, In English
TL Issue in the #659 (Div. 1) Problem F I've hacked all AC solutions of [this](https://codeforces.me/contest/1383/problem/F) problem, which were submitted during the contest, and I believe I can hack most of upsolving solutions. Currently, I only checked that they time out on my local machine, because "Unexpected Verdict" prevents me from uphacking. I even hacked model implementation in the editorial. [Here](https://ideone.com/cHvjkp)'s my latest generator. Feel free to challenge it. Side Note: [user:yosupo,2020-07-26] wrote a [solution](https://codeforces.me/contest/1383/submission/88036534), which passes the above case, but I failed it with another [generator](https://ideone.com/LKx3FP). What I want to argue is that TL of this problem is too tight, and it affected some of the competitors. For example, I got almost the same idea as the model solution during the contest. Still, I was too scared to write it because I suspected it would time out without full optimization and possibly some tweaks like shuffling ve...
. Currently, I only checked that they time out on my local machine, because "Unexpected Verdict" prevents me

Full text and comments »

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

39.
By MikeMirzayanov, 10 years ago, translation, In English
About the Round 382 Good afternoon! I've decided to share my thoughts on the round 382. Of course, it turned upset not only to me, but also to the round coordinator [user:GlebsHP,2016-11-28]. In this round the main negative feedback were caused by two problems: [problem:735D] and [problem:735C]. Regarding [problem:735D]. I do not share the criticism to this problem. In fact, to solve it would be nice to be familiar with <a href="https://en.wikipedia.org/wiki/Goldbach&apos;s_conjecture"> Goldbach's Conjecture</a> and better with <a href="https://en.wikipedia.org/wiki/Prime_number_theorem">Prime Number Theorem</a>. These facts are medium-popular in the world of programming contests. Familiarity with them is useful, gives useful insight into primes. It is important: in this problem it was necessary to perform a simple, but nevertheless, additional step to find solution. It seems to me that it's okay to use problems that have a reduction to some popular and semi-popular topics. Otherwise, it is th...

Full text and comments »

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

40.
By Zhtluo, history, 3 years ago, In English
The Reason You are Bad at Codeforces — You are Not Russian Enough If you are triggered by this clickbaity blog title, you are probably interested in improving your Codeforces skills. Now, I will share my point of view on the differences between Codeforces and ICPC contests, and how you can, in my humble opinion, maximize your Codeforces rating gain. I mostly consider that all conceivable competitive programming problems need three aspects of skill: 1. Observation &mdash; the ability to understand the problem and come up with non-trivial properties. 2. Technique &mdash; the ability to apply a well-known algorithm or data structure to the problem. 3. Implementation &mdash; the ability to code fast and debug fast. Collaterally, I refer to these three skills as Russian-ness, Chinese-ness and American-ness, respectively, for reasons you will soon see below. ## Observation (Russian-ness) Observation means that you stare at some problem for a sufficient amount of time and you are able to reduce it to some easier problem. One good proble...
*Why learn swimming? Just jump into the river. It works for everyone who lives after that!*, I guess this is the most learn-able part of all, and what most learners of competitive programming, Technique is the more common thing you will learn at any competitive programming course, such as

Full text and comments »

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

41.
By AlexSkidanov, history, 8 years ago, In English
Are we close to machines solving ICPC problems? Hi, all, I with few other folks at [NEAR](http://near.ai/blog) work on teaching machines to program. A particularly exciting sub-project of that is teaching machines to solve competitive programming problems. In this post I would like to give a quick overview of where the state of the art is today, what the major challenges are, why this is not a popular area of research, and how the CodeForces community can help to address some of the issues the program synthesis community is facing today. We also have a certain budged allocated for this project, and we are paying to the CodeForces members who help us with some data annotation challenges. We have paid more than $10k in our first two annotation projects, and are launching three more projects today. Scroll to the end if you are interested. Competitive programming as a benchmark ====================================== With the emergence of deep learning, neural networks started performing almost at a human level in many ta...
easier for a machine than even the simplest real problems on a real contest, but this dataset not only, effectively means that the model manages to learn how to solve some (albeit very simple) human-generated, triangle. To make a machine learning model be able to solve such a problem, one of the three things, using more traditional approaches such as SMT solvers still noticeably outperforms deeplearning, were in some way referring to the property of the sides of the triangle. To make amachine learning, 1. We will find a way to learn from few examples. One-shot learning is a hot topic of research, 3. Inherent uncertainty in Deep Learning models -----------------------------------------------, Another approach we researched is letting another (or the same) deep learning model to fix the, At the core of our approaches are deep learning models that read in text and produce code as either, Can we solve it? With the modern technology not yet, and it makes sense to learn how to solve such, Deep Learning models by design are probabilistic. Each prediction they make has some certainty, Fixing the uncertainty of Deep Learning models ----------------------------------------------, Learning few years ago there was no sufficiently general way of extracting information from natural, This is Div1 A/B level, with most people with experience solving it easily. However from amachine, With the emergence of deep learning, neural networks started performing almost at a human level in, learning and several traditional approaches., learning approaches is very desirable, but at this time very little success was achieved.

Full text and comments »

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

42.
By adamant, history, 16 months ago, In English
Complex FFT is not as bad as you think ... Probably. Hi everyone! As some of you _might_ already know, I don't like NTT. Primary reasons for this are: - I don't like modular arithmetic optimizations (Montgomery, etc). - I don't like NTT mods, and prefer good, old $10^9+7$. - I do like algebra of complex numbers. But, to my regret, the overwhelming mainstream in modern competitive programming is NTT. Primary reasons are: - It's allegedly faster. - It needs less memory. - It has no precision issues. - People don't like algebra of complex numbers. There is nothing I can do about the last, but today I'll address the first 3. Optimizing complex FFT was on my mind for quite some time, but I didn't really work on it _that much_ until the [blog](https://codeforces.me/blog/entry/142063) by [user:Qwerty1232,2025-04-24] on optimizing NTT has dropped, which motivated me to actually put some serious effort into this. In this blog, we will primarily focus on optimizations that are specific to complex arithmetic...
for us?.. To answer this, we will have to learn the basics of error estimation in numeric analysis

Full text and comments »

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

43.
By ATSTNG, history, 7 years ago, In English
[Tutorial] Matroid intersection in simple words **[This article is also available in [Russian](https://codeforces.me/blog/entry/69287?locale=ru)]** Hello, CodeForces. I think that matroids are beautiful and powerful concept, however, not really well known in competitive programming. I’ve discovered matroids at 2019 Petrozavodsk Winter Training Camp. There was a problem that clearly cannot be solved using usual techniques I knew, editorial for this problem was just these three words “just matroid intersection”. Back then it took me more than 2 days of upsolving to find all the information and details I need and implement solution that gets Accepted on this. And it took way longer to actually understand why does it work and exactly how does it work. (I still hesitate in some details.) Of course, it is not hard to google up all the definitions and some related articles, but in my opinion they all are focused more on mathematical part of theory, strict proofs in some not really obvious but short ways, and observing only ke...
information that helped me to learn matroids and prepare this article., }{w})$, where $w$ is size of machine word. But we can check loss of independency after addition of a

Full text and comments »

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

44.
By ToxicPie9, 3 years ago, In English
You won't believe how this simple trick defeated the unexplained bug destroying every top LGM ### TL;DR Currently people are discussing a slowdown bug on Codeforces that seems to happen randomly, and can cause code to run 100x slower and get TLE. More details in [user:pajenegod,2024-03-03]'s [blog post](https://codeforces.me/blog/entry/126654). In this article, I present a mitigation: add the following to your code. ~~~~ #include <windows.h> void *operator new(size_t size) { if (void *ptr = HeapAlloc(GetProcessHeap(), 0, size ? size : 1)) return ptr; throw std::bad_alloc{}; } void operator delete(void *ptr) { HeapFree(GetProcessHeap(), 0, ptr); } ~~~~ <spoiler summary="If you use malloc/free in C++ (you shouldn't), also change them."> ~~~~ void *my_malloc(size_t size) { if (void *ptr = HeapAlloc(GetProcessHeap(), 0, size ? size : 1)) return ptr; throw std::bad_alloc{}; } void my_free(void *ptr) { HeapFree(GetProcessHeap(), 0, ptr); } ~~~~ </spoiler> <spoiler summary="If you use aligned new/delete in C++, also change the...

Full text and comments »

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

45.
By satyam343, 3 years ago, In English
think-cell Round 1 Hello, Codeforces! Welcome to the [contest:1930] supported by think-cell, which will start on [contest_time:1930]. It will be a combined rated round for both divisions. All problems were authored and prepared by [user:Elegia,2024-02-13] and [user:satyam343,2024-02-07]. We would like to thank: - [user:errorgorn,2024-02-13] for round coordination and help with preparation - [user:KAN,2024-02-17] for helping with the preparation of problems - [user:Alexdat2000,2024-02-13] for Russian translation - [user:GoatTamer,2024-02-17] and [user:Non-origination,2024-02-17] for discussing problems with us while our proposal was in review and testing the round. - [user:Kaitokid,2024-02-13], [user:antekb,2024-02-13], [user:vgtcross,2024-02-13], [user:riano_,2024-02-13], [user:mtw,2024-02-13], [user:AboAbdoMC,2024-02-13], [user:Vladithur,2024-02-13], [user:BERNARD,2024-02-13], [user:milind0110,2024-02-13], [user:conqueror_of_tourist,2024-02-13], [user:Um_nik,2024-02-13], [user:gamegame...
/overview) to learn more about our commitment to the tech world!**, : 0.5em 1.0em;">Learn more

Full text and comments »

Announcement of think-cell Round 1
  • Vote: I like it
  • +798
  • Vote: I do not like it

46.
By Errichto, 8 years ago, In English
Sums and Expected Value — part 1 part 2: https://codeforces.me/blog/entry/62792 Watch my lecture-stream tomorrow (Thursday) at [14:00 CEST](https://www.timeanddate.com/worldclock/fixedtime.html?msg=EV+lecture+1&iso=20181025T14&p1=262) &mdash; <s>[https://www.youtube.com/watch?v=qdlPY37MBPo](https://www.youtube.com/watch?v=qdlPY37MBPo)</s> [https://www.youtube.com/watch?v=U_h3IjreRek](https://www.youtube.com/watch?v=U_h3IjreRek). I will go through theory and problems from this blog. The only prerequisite is knowing what is probability. The next (harder) part on Monday. The video will be available later, with timestamps for each problem &mdash; so you don't have to watch everything. ### Definition of EV Let's say we bought a lottery ticket for 2$. We will win 10$ with probability 10%, and 20$ with p-bility 2%. On average, it gives us $0.1 \cdot 10 + 0.02 \cdot 20 = 1.4$, so we are worse off after buying the ticket. The computed average is called the expected value. The expected value (EV, expecta...
, you must let the whole class to play games instead of learning algorithms and using Excel. Maybe

Full text and comments »

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

47.
By feecIe6418, history, 6 years ago, In English
Codeforces Round #670 (Div. 2) Hello Codeforces! [user:gyh20,2020-09-10] and I are glad to invite you to [contest:1406] which will start on [contest_time:1406]. **Note the unusual start time of the round.** The contest will last for **two hours**, and you will have **five tasks** to solve. The tasks are prepared by me and [user:gyh20,2020-09-10]. This round is rated for participants whose **rating is not higher than 2099**. You can see that my current rating is exactly **2099** :) There might be an interactive problem. You can learn about them [here](https://codeforces.ml/blog/entry/45307). We would like to thank: - [user:isaf27,2020-09-10] for coordinating and helping us with the problems. - [user:namanbansal013,2020-09-10], [user:postscript,2020-09-10], [user:morzer,2020-09-10], [user:Osama_Alkhodairy,2020-09-10], [user:csani,2020-09-10], [user:growup974,2020-09-10], [user:physics0523,2020-09-10], [user:bizhouziwei20,2020-09-10] for testing the problems and providing useful feedback. Special thank...
There might be an interactive problem. You can learn about them [here](https://codeforces.ml/blog

Full text and comments »

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

48.
By YouKn0wWho, 2 years ago, In English
A Huge Update on The Ultimate Topic List Hi, around 3 years ago I compiled most of the Competitive Programming topics in one place [here](https://codeforces.me/blog/entry/95106) with relevant resources, templates, and problems. It got great responses, it now has 4000+ upvotes and the blog website has been visited 200k+ times! But it contained links to only 1-2 resources and problems per topic and it didn’t contain basic topics for beginners. Also, there was no way of tracking your progress. This time I decided to improve it, by a lot. I took this project one month ago and it took me on average 6h-10h per day for the last one month to complete this project (also I was doing a full-time job). I hope it was worth it! The new version is not just a blog, it is a full-fledged website with multiple features (I have hosted it on one of my existing websites): ![topic_list](/predownloaded/7e/20/7e2045c57574d37e170ea3eb1fdc5516ff68bc0e.png) - **Topics:** The website contains around 500 topics and tricks. Not all topics are ...
was needed because you should learn only one thing at a time according to your current level, you should learn only one thing at a time according to your current level. - **Difficulty and

Full text and comments »

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

49.
By MikeMirzayanov, 8 years ago, translation, In English
Codeforces: Results of 2018 Hi Codeforces! February 2019 is already on the calendar, which means that I was late with the report for 2018. Better late than never! Let's remember last year. In 2018, [user:_kun_,2019-02-05], [user:300iq,2019-02-05] and [user:arsijo,2019-02-05] joined the team of coordinators. The work of the coordinators is headed (and is the coordinator of the coordinators) [user:KAN,2019-02-05]. I really hope that a more measured schedule of preparing rounds by a large team of coordinators will give a better insight into the contests. The main innovations in the platform are implemented by me and the developers [user:kuviman,2019-02-05], [user:fcspartakm,2019-02-05], [user:MaximShipko,2019-02-05]. Great work on the organization of events and prizes mailing was done by [user:gKseni,2019-02-05]. Special thanks to the writers of the problems and testers. It is your content that charges the community with life and unites all of us. Thank you for the problems! And now let's summarize...
machine learning * **IQ Option** — private round as a corporate training

Full text and comments »

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

50.
By fbrunodr, history, 15 months ago, In English
Machine Learning Based Rating Predictor ### TLDR; I built an enterprise grade machine learning model to predict a user rating 6 months in the future. The model has mean absolute error of 65.15 (that is, $ E \left [ \left | \hat{x} - x \right | \right ] = 65.15 $). You can use it here: [https://fbrunodr.com/predict-codeforces-rating](https://fbrunodr.com/predict-codeforces-rating) ### Motivation: Check this thread: [https://codeforces.me/blog/entry/143626?#comment-1282206](https://codeforces.me/blog/entry/143626?#comment-1282206) Before going forward with this post I have to admit a pretty important thing: I did not do what I promised, as I did not build a foundational model on top of codeforces data. Reasons: 1. Takes to much time to train on my personal laptop (or money to rent gpus, which I am not willing to expend for a toy project). 2. I still almost went down the path of finetuning some feature extractor model (such as [this one](https://huggingface.co/Qwen/Qwen3-Embedding-0.6B)), but then I r...
Machine Learning Based Rating Predictor, training users and only evaluate in the validation users. The patterns the modellearn in the, we think an average error of 65 ∆ is acceptable? Did the model even learn anything at all? We need a, ### TLDR; I built an enterprise grade machine learning model to predict a user rating 6 months, As I said in the previous section I used a decision tree machine learning model to predict rating, I built an enterprise grade machine learning model to predict a user rating 6 months in the future, Predicting one's rating is not the most fun part of using a machine learning model. I would say the, So I did not strictly build a state of the art machine learning rating predictor model... But I did, This is actually the most important section, as you need lots of data to train a machine learning

Full text and comments »

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

51.
By awoo, history, 6 years ago, translation, In English
Educational Codeforces Round 92 [Rated for Div. 2] Hello Codeforces! On [contest_time:1389] [contest:1389] will start. Series of Educational Rounds continue being held as [Harbour.Space University](https://harbour.space/) initiative! You can read the details about the cooperation between [Harbour.Space University](https://harbour.space/) and Codeforces in the <a href="http://codeforces.me/blog/entry/51208">blog post</a>. This round will be **rated for the participants with rating lower than 2100**. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally. You will be given **6 or 7 problems** and **2 hours** to solve them. The problems were invented and prepared by Roman [user:Roms,2020-07-28] Glazov, Adilbek [user:adedalic,2020-07-28] Dalabaev, Vladimir [user:vovuh,2020-07-28] Petrov, Ivan [us...
-science-to-cern-how-two-students-are-building-their-machine-learning -based-startup?utm_source=codeforces, _After working hard on their Machine Learning-based startup, they were selected by the European

Full text and comments »

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

52.
By Zhtluo, history, 3 years ago, In English
All You Need is Randomly Guessing — How to Improve at Codeforces I hope [my previous blog](https://codeforces.me/blog/entry/126310) has convinced you that the best way to improve at Codeforces is to be more Russian, i.e. to improve your math capability. Unfortunately, humble mortals such as you and I are not gifted with the talent that esteemed Russian grandmasters such as 74TrAkToR had: _Surely, it is beneficial to have a code reference for many algorithms and data structures, but I also think that just superficially knowing the algorithm and maybe having implemented it once or twice before is sufficient to use it without a reference?_ _&mdash; Some other Codeforces grandmaster_ Therefore, in this blog I will explore the dark side of Russian-ness &mdash; randomly guessing &mdash; that is forsaken by every Russian grandmaster of the light side I know. However, it has been very helpful to me, and I hope that it serves you well, too. ## Example 1 I will start by using an example to demonstrate my thought process. This problem [1923C](h...
issue: why you should learn to guess without proving anything., #### Some Learning Theory, **(Claim of PAC Learning, from [UPenn](https://www.cis.upenn.edu/~danroth/Teaching/CS446-17, Fortunately, in machine learning people are already dealing with estimating the correctness of a

Full text and comments »

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

53.
By kpw29, 6 years ago, In English
Codeforces Round #683 by Meet IT (Div1, Div2) <img align="right" src="/predownloaded/5f/bf/5fbf2c3aae79d4f0d7e32a344f9478fb5ae825c2.png"> Hello, Codeforces! On behalf of Meet IT, I'm glad to invite you to ([Codeforces Round #683 by Meet IT (Div1, Div2)](https://codeforces.me/contests/1446,1447) which will take place [this Sunday (15th November)](https://www.timeanddate.com/worldclock/fixedtime.html?day=15&month=11&year=2020&hour=17&min=35&sec=0&p1=166). The round lasts 2.5 hours and is **rated** for both divisions. ### What is Meet IT? We are a family of enthusiastic and motivated young people passionate about programming and mathematics. We build a community where people learn together, motivate and help each other. <spoiler summary="Please expand the spoiler to find out more about us."> ### Our values - We teamwork, not compete, - Active learning is more effective than passive, - We all work on the same goal: a better education for everyone, - We don’t teach people; we show them how to discover b...
programming and mathematics. We build a community where people learn together, motivate and help each, ### Our values - We teamwork, not compete, - Active learning is more effective than passive

Full text and comments »

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

54.
By pashka, 6 years ago, In English
EDU: Segment Tree, part 1 Hello everyone! I just published a [new lesson](https://codeforces.me/edu/course/2/lesson/4) in the EDU section. This is the first part of the lesson about the segment tree. <img src="/predownloaded/ad/f8/adf89a39c4a3c646e9b047bc1e24e894a01034d4.png"/> In this lesson, we will learn how to build a simple segment tree (without mass modifications), and how to perform basic operations on it. We will also discuss some tasks that can be solved using the segment tree. <center style="margin:2.5em;"> <a href="/edu/courses" style="text-decoration:none; font-size:18px; background-color:#01579B; color:white; font-weight:bold; padding:0.5em 1em;">Go to EDU &rarr;</a> </center> More about EDU section you can read in [this](/blog/entry/79530) post. Hope it will be helpful, enjoy!
="/predownloaded/ad/f8/adf89a39c4a3c646e9b047bc1e24e894a01034d4.png"/> In this lesson, we willlearn how, In this lesson, we will learn how to build a simple segment tree (without mass modifications), and

Full text and comments »

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

55.
By YouKn0wWho, 4 years ago, In English
[Tutorial] Common Mistakes in Competitive Programming and How to Avoid Them One thing is for sure. You do make mistakes. I also make miskates and that's what makes us human. But what we can surely do is &mdash; to try to minimize the errors that we make throughout our life. I have compiled some of the mistakes that I made in my early Competitive Programming phase. I also mentioned how to avoid them. Also, in most cases, I will give you a chance to find out what the bug is before I reveal the culprit as I tried to make this blog interactive. The codes that I have used in this blog have been written in C++ as it is the most used language for CP. **So, if you are new to CP, stick with me as you might don't wanna repeat the mistakes that I made when I was a beginner.** #### Mistake 1 Check out the following code: <spoiler summary="Code"> ~~~~~ #include<bits/stdc++.h> using namespace std; int main() { int a = 1000'000'000,b = 1000'000'000; long long product = a * b; cout << product << '\n'; return 0; } ~~~~~ </spoiler> The outp...
out [this](https://www.geeksforgeeks.org/memset-in-cpp/) to learn more., passing in the first place. What I am trying to say is — **Learn to control your code, ://codeforces.com/blog/entry/18163?#comment-230615) to learn why `memset` works for $0$ and $-1$ correctly., ://codeforces.com/blog/entry/64546) to learn more., Check out [this](https://en.cppreference.com/w/cpp/language/operator_precedence) tolearn more

Full text and comments »

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

56.
By MikeMirzayanov, 4 years ago, In English
Looking For EDU Lecturers <img src="/predownloaded/47/86/4786c2ec901c0b5b490794ca6fd5145f0dcdeae3.png" style="float:right; width: 400px; margin: 0 1em 1em 1em"/> Hello! I always like to think that Codeforces is not only a place where you come to compete but also a place where you can learn. Learn new things. Two years ago, we launched the [EDU](https://codeforces.me/edu/courses) subproject, a platform for publishing classes. There are already several classes, but there are so many interesting topics around! The Codeforces team can write the platform, make the technical foundation, but it would be great to write content with the support of the community. Thanks to the support of competitive programming alumni, we have a budget for targeted grants for the preparation of new classes in the EDU section. Hope we have new content soon! We are looking for lesson authors who could prepare and record one or more lessons. Those who are now red or have ever been red are invited. We assume that one le...
place where you can learn. Learn new things.

Full text and comments »

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

57.
By errorgorn, 22 months ago, In English
Solving Problems with Min Cut Max Flow Duality Thanks to [user:kingmessi,2024-12-19] for pointing out several typos in this blog. This blog is adapted from a previous blog I wrote in my [personal blog](https://errorgorn.github.io/2024/11/24/Flow-Matching.html). I thought it would be good to share the relevant parts here. If you want to read my personal blog, go ahead, but I will warn you that it is a shitpost blog. The problems discussed in this blog is: - [ARC085C](https://atcoder.jp/contests/arc085/tasks/arc085_c) - [ABC225G](https://atcoder.jp/contests/abc225/tasks/abc225_g) - [ABC259G](https://atcoder.jp/contests/abc259/tasks/abc259_g) - [ABC193F](https://atcoder.jp/contests/abc193/tasks/abc193_f) - [ARC142E](https://atcoder.jp/contests/arc142/tasks/arc142_e) You can attempt these problems to see if you can figure out how to wrangle them into min-cut formulation knowing that they are min-cut. I have been told by a lot of old people that in the heydays of Topcoder it was flow meta. Those old people will obviou...
. Each project has profit $p_i$ and machine machine has cost $q_i$. Each project has a set of, If $i$ is a project and $j$ is a machine and getting the money for project $i$ requires buying, To handle the cost of buying machine $i$, we add the constraints:, }$ means we take the project/buy the machine and $S_i = \texttt{1}$ means we do not take the project/do

Full text and comments »

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

58.
By -is-this-fft-, history, 4 years ago, In English
[Tutorial] The command line: how to read input from file without #ifdef and much more #### Introduction Instead of algorithms and math, I'll be doing something completely different here. There is something that has bothered me for a long time: people not understanding the tools they use to participate in contests and thus failing to take real advantage of them. And it all goes back to not understanding the command line. Some of you might say, "well surely, the command line is something obsolete and you're only clinging to it because you [insert ridiculous amateur-psychology here]?" No! The command line is not obsolete, and unless competitive programming becomes so mainstream that software vendors start writing professional-grade tools aimed specifically at us, it won't be. [cut] $~$ What is the command line? Any of these: ![ ](/predownloaded/bd/b6/bdb6c157b9b3ce5ae046c9064e469e0081f8c0fe.png) As you can see, it comes in many background colors and fonts, but the basic idea is always the same. It's a box you can type commands in, which it will ...
**The problem.** Now, we are going to learn how. First of all, we need a problem to solve, because, **Update 11.09.2022** More generally still, I've noticed that people often learn the bare minimum, Learning the command line means learning how your computer works. Understanding this stuff means, This section is organized as a "lab". If you are new to the command line and want tolearn it, I

Full text and comments »

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

59.
By prvocislo, history, 4 years ago, In English
I Reached GM after 5 years Hello Codeforces! I did it! My main goal for 2022 was to reach red and I succeeded in the last contest of the year by getting +1 delta and going from cursed 2399 to 2400! I was very happy but scared to celebrate because I was worried that my rating would go down to 2399 again after the cheater removal. But now it’s 2401, so I think I’m safe now. Why am I writing this blog? I'm very excited about this achievement, it means a lot to me and I want to share my happiness with Codeforces. Also people ask me in DM quite often about how I got onto this level or who I am in general, so I think it's time to summarize it all into one blog post. Oh, wait… You don’t even know me, so why should you keep reading this blog post? Let me introduce myself a little first. I’m a high schooler from a small European country where few people do Codeforces. I love competing in OI and MO, I always did. One day, my father found the Codeforces website and suggested that I should start practicing there. At ...
can’t remember and learn algorithms as well as my friends do. I can’t even implement SCC on my own! But, do it. And even if you fail to solve it, you will learn something and fix your rating soon., get AC while practicing. I always think about it. How did I solve it? Did I learn something new? What, observations about the training process:"> 1. I am a slow learner, and I can’t remember andlearn

Full text and comments »

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

60.
By galen_colin, 2 years ago, In English
WF23 Luxor _(Long blog ahead. Reader discretion advised.)_ I feel we have a rather interesting WF story (note: we did the 47th finals, as the University of Maryland, <b><i>as 2 people</i></b>... explained below), so I figured I'd tell it. Exposition ---------- It actually starts way before WF, too. Our teams were decided on (some form of) merit based on an internal qualifier. My team for the regional and NAC (North America superregional) ended up as {me, [user:Navick,2024-04-24], [user:mr.banana,2024-04-24]}. We did [fairly](https://nasouth22d1.kattis.com/contests/nasouth22d1/standings) [well](https://nac.icpc.global/wp-content/uploads/2023/06/NAC23-scoreboard.pdf) in those. However, for WF, my two teammates only had single-entry visas for the US, meaning that if they left, they couldn't come back into our country. So they couldn't really go with me... Luckily, in such situations, ICPC lets you just replace your teammates. So we held another internal qualifier, and ended up with two ...

Full text and comments »

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

61.
By Radewoosh, 8 years ago, In English
Blogewoosh #3 Hello, codeforces! This time I've decided to choose a task from my own contest which took place last April and was known as the Grand Prix of Poland. If you want to write this contest virtually in the future, then consider not reading this blog. If you've participated in this contest and maybe even solved this task, then anyway I recommend reading it, cause this task has many very different solutions, each of them being very interesting (in my opinion). It's also a reason why this blog is longer than previous ones. I'll write about task C "cutting tree" (not uploaded to the ejudge yet :/). The statement goes as follows: You are given a tree with $n$ vertices ($1 \leq n \leq 2 \cdot 10^5$). The task is to calculate $f(k)$ for each integer $k$ from the range $[1, n]$ where $f(k)$ is defined as the maximum number of connected components of size $k$ which we can "cut off" from the tree. A connected component of size $k$ is a set of $k$ vertices such that it's possible to traverse ...

Full text and comments »

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

62.
By Franklyn_W, history, 5 years ago, In English
When Dreams Come True: The only solve on N at ICPC WF 2020. _Addendum: This is mostly about the story behind our solution to N. To see more about the math, see [here](https://codeforces.me/blog/ekzhang)_ When I was younger, fairytales always captivated me, with their nice and clean stories. All through my life I've liked the idea of having a fairytale ending to a life arc, but I was frequently disappointed. Many times after an unsuccessful experience, one simply gets more unsucessful experiences and then time runs out... At ICPC recently, I was lucky enough to finally attain my fairytale ending to my competitive programming career. I figured I would tell the fairytale, to close a career that started about 6 years ago. On my World Finals team, my role is to help the team get hard math problems, as I haven't actively processed algorithms in years. So imagine my delight when my teammate ([user:ekzhang,2021-10-06]) points out that problem N reduces to finding a vector so that the (l2)-norm of x is r, and $Ax = b$ for a matrix $A$ and vect...
When I hear min-norm solution to $Ax = b$ my ears perk up -- a well known result inmachine

Full text and comments »

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

63.
By -is-this-fft-, history, 5 years ago, In English
[Tutorial] Collection of little techniques #### Introduction There are a number of "small" algorithms and facts that come up again and again in problems. I feel like there I have had to explain them many times, partly because there are no blogs about them. On the other hand, writing a blog about them is also weird because there is not that much to be said. To settle these things "once and for all", I decided to write my own list about about common "small tricks" that don't really warrant a full tutorial because they can be adequately explained in a paragraph or two and there often isn't really anything to add except for padding. This blog is partly inspired by [user:adamant,2022-03-15]'s [blog](48417) from a few years ago. At first, I wanted to mimic adamant's blog structure exactly, but I found myself wanting to write longer paragraphs and using just bolded sentences as section headers got messy. Still, each section is short enough that it would not make much sense to write separate blogs about each of these things. A...
, you solve it with bitsets. Then, you realize it doesn't work and finally you learn how to really

Full text and comments »

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

64.
By cgy4ever, 12 years ago, In English
Codeforces Round #290 Fox Ciel is back! I invite you to participate in Codeforces Round #290, which will start at the [standard time on next Monday](http://www.timeanddate.com/worldclock/fixedtime.html?day=2&month=2&year=2015&hour=19&min=30&sec=0&p1=166): This is my 4th round on Codeforces, my previous rounds: [#190](http://codeforces.me/blog/entry/8163), [#228](http://codeforces.me/blog/entry/10605), [#270](http://codeforces.me/blog/entry/13997). Last Div1 Round ([#286](http://codeforces.me/blog/entry/15842)) is so hard, so after notice that, we decide to reduce the difficulty of this round. (For example, current Div1-E was used as Div1-D) I hope more people can enjoy all tasks in this round: this time no task requires advanced knowledge like linear space or Fourier Transform. The background story will be Fox Ciel's life: learning programming, play games, traveling, have dinner and so on. Like Round [#228](http://codeforces.me/blog/entry/10605), top-20 contestants that are currently at...
The background story will be Fox Ciel's life: learning programming, play games, traveling, have

Full text and comments »

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

65.
By rng_58, history, 6 years ago, In English
Three Revolutions of AtCoder Hello. Today I announce three revolutions of AtCoder! ### 1. AtCoder Library (ACL) We provide a collection of pre-written codes of various algorithms and data structures. I'll describe details in a [separate post](https://codeforces.me/blog/entry/82400). ### 2. New Color Scheme Previously, we decided colors by ratings. For example, gold for 3600 and above, silver for 3200 and above, red for 2800 and above, etc. However, it's not clear what the rating values mean, for example, 2800. If we design the rating system relatively well, in the short term the rating 2800 corresponds to a certain level. The skill required to reach 2800 today is probably similar to that of a year ago. However, the structure of the contests may change, the number of users may change, the average level of users may change, etc., and the exact value of ratings is very sensitive to these changes (and it may cause inflation/deflation). Now I believe ranks are more robust against inflation/deflation and ...
focus on more "educational" part, like learning basic algorithms, typical techniques, etc.

Full text and comments »

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

66.
By hxu10, history, 3 years ago, In English
It's time to say goodbye, but not fairwell, to codeforces Hello everyone. I am a codeforcer for two and half years. I took part more than 130 contests, write hundreds of comments and blogs. Now it's time to say goodbye, but not fairwell, to contests. My English is not very good, but my words are sincere. As a Physics PhD new grad try to become a sofeware engineer, I took part in my first codeforces contest in 2020. My initial reason for the codeforces, is to practice algorithm, since I found it difficult to solve the hard tag problem in leetcode weekly contest, and a experience leetcoder told me: "if you want to solve harder problem in leetcode, try codeforces, and if you can solve 2400 rating problem in codeforces, leetcode problem is just piece of cake. " So I took part my first contest: educational codeforces 97. The results was very good, I solved four problems and get a ranking of 600+. However, my second contest is a disaster and give me huge lesson. I found it difficult even for reaching blue. I keep practicing, foc...
clients, and frontend technologies like javascript and React. I also have experience inmachine learning

Full text and comments »

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

67.
By ko_osaga, history, 6 years ago, In English
NP=RP: P is almost NP? Thanks to [user:vintage_Vlad_Makeev,2020-08-04] for the information. According to Wikipedia, RP is a class of decision problem which admits a randomized polynomial-time algorithm such that: * If the correct answer is NO, it always returns NO * If the correct answer is YES, then it returns YES with probability at least 1/2 (otherwise, it returns NO). [The Amazing Power of Randomness: NP=RP](https://arxiv.org/pdf/2008.00601.pdf) authored by [Andras Farago](https://en.wikipedia.org/wiki/Andras_Farago) claims that NP=RP. This means, there is a **randomized polynomial time solution** to NP problems, such as: * 3-SAT * Traveling Salesperson Problem * Minimum Vertex Cover * Graph Coloring * [Among others](https://en.wikipedia.org/wiki/List_of_NP-complete_problems) What does it mean? Is the paper wrong? Should we start studying randomized algorithm instead of machine learning? Will all cryptographic system collapse? Share your thoughts!
it mean? Is the paper wrong? Should we start studying randomized algorithm instead ofmachine, machine learning? Will all cryptographic system collapse?

Full text and comments »

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

68.
By awoo, history, 3 years ago, translation, In English
Educational Codeforces Round 147 [Rated for Div. 2] Hello Codeforces! On [contest_time:1821] [contest:1821] will start. Series of Educational Rounds continue being held as [Harbour.Space University](https://harbour.space/) initiative! You can read the details about the cooperation between [Harbour.Space University](https://harbour.space/) and Codeforces in the <a href="http://mirror.codeforces.com/blog/entry/51208">blog post</a>. This round will be **rated for the participants with rating lower than 2100**. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest, you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally. You will be given **6 or 7 problems** and **2 hours** to solve them. The problems were invented and prepared by Adilbek [user:adedalic,2023-04-19] Dalabaev, Ivan [user:BledDest,2023-04-19] Androsov, Maksim [user:Neon,2023-04-19] Mesche...
, Researcher, and Machine & Deep Learning Professor._, _Radoslav, a top-tier data scientist with extensive experience in Deep Learning and Reinforcement

Full text and comments »

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

69.
By SlavicG, 5 years ago, In English
How to use Codeforces [GUIDE] I see a lot of newcomers struggling to use the website to it's fullest, so I decided to write a blog that has all important information about how to use Codeforces in a single place. I will update it with time, so feel free to write your suggestions/questions in case I missed something and I will be glad to add it to the post! I would like to thank [user:_Vanilla_,2022-02-05] and [user:mesanu,2022-02-05] for helping me write the blog, and [user:Monogon,2022-02-05], [user:down,2022-02-05] and [user:AlperenT,2022-02-05] for proofreading and giving suggestions. #### Navigating through pages ![ ](https://media.discordapp.net/attachments/705371983650619454/928235498487570442/bandicam_2022-01-05_12-36-00-134.jpg?width=991&height=110) It's possible to navigate through most pages of Codeforces using the bar on the top, I will talk about what each tab does more in depth below: #### The Help Page The help page contains the answer to a lot of questions about Codeforces, such as rati...
"Propose a contest/problems" button under your profile. You can learn more about problemsetting

Full text and comments »

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

70.
By -is-this-fft-, history, 6 years ago, In English
How to ask for help in PM There was a blog today with a similar title, and although it was (I think, not really sure as I didn't get a good look) some kind of satire/joke blog, I wanted to post some serious advice about things I (don't) like to see when people are PMing me. However I decided that this wouldn't be in the spirit of the blog and decided to make a separate blog. And now that blog is deleted anyway. While it's not a bad thing to write messages to more experienced users, most people who write me do things that make them very difficult to deal with. These are my opinions, but somewhy I feel that many reds will agree. Some things here feel silly to write because they are so obvious. But I'm only writing them because people regularly mess them up. [cut] $~$ ####Use punctuation and spelling. There are some [very simple rules](https://codeforces.me/blog/entry/82186#comment-689836) that make your messages infinitely more readable. I find it especially strange when many of these messagers call...

Full text and comments »

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

71.
By The-Winner, history, 10 months ago, In English
[Tips; personal stuff] I got red rank. Here's some stuff I learned Hello everyone! This blog will be a collection of ideas, thoughts and personal experiences I gathered over the past ~7 years (darn, I am old). It might not contribute much to the world so feel free to skip it, but I do believe most people can get something interesting out of it. I waited on writing this until my opinion was actually worth something (still, take the following with a grain of salt or two). It is be a big wall of text (you have been warned). Sorry for taking a week to post this, University is crazy at times. [cut] Tips (and some personal experience) for problems solving (can probably extend to whatever else it is you want to do): - The most important thing: **Have fun**. If you don't have fun doing whatever it is you are doing, you are motivated by an external factor, that when removed from the equation will remove you from the action. Without a reason to come back, you will not, and the whole experience will slowly fade away (congrats, you wasted your time). ...
at best. - When learning a new concept, don't just learn theory/practice problems. The two should, behind and had to learn. - Don't take in too much at once. Mastering a concept requires **both, copy in 11'th grade to learn about graphs and stuff. It is a very good book and I recommend it a lot, ). I am aware that it is not a healthy thing, but at some point newbies have to learn on their own, Up next some books/courses/sites that helped me learn stuff:

Full text and comments »

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

72.
By huangzirui, history, 4 years ago, In English
Codeforces Round #796 Hi Codeforces! Happy Dragon Boat Festival! We are glad to invite you to our first Codeforces Round [contest:1687] and [contest:1688] which will be held on [contest_time:1687]. This round will be rated for participants of both divisions. Participants in each division will be offered 6 problems and 2 hours to solve them. The two divisions will share 3 problems. In this round, as the best friend of the characters in Touhou Project, you are going to help them solve the problems they meet. The problems are prepared by [user:xiaoziyao,2022-05-30], [user:Yakumo_Ran,2022-05-30], [user:SSerxhs,2022-05-30], [user:Cocoly1990,2022-05-30], [user:LilyWhite,2022-05-30], [user:Elegia,2022-05-30] and me. We hope you will enjoy this round. Great thanks to: - [user:74TrAkToR,2022-05-30] for good coordination of this round and translating all statements to Russian, - [user:Yakumo_Ran,2022-05-30] for providing most tasks, - [user:SSerxhs,2022-05-30] for preparing most tasks, - [user:L...
, so learn more about interactive problems [here](https://codeforces.me/blog/entry/45307) before the

Full text and comments »

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

73.
By Proof_by_QED, 15 months ago, In English
EPIC Institute of Technology Round Summer 2025 (Codeforces Round 1036, Div. 1 + Div. 2) # Hello Codeforces Once Again <img alt="" src="https://codeforces.me/predownloaded/4e/71/4e713a365fc86888c808b3b56d6fecfb529973e6.png" style="float:right; height: 154px; padding-left: 35px; padding-right: 73px; padding-top: 41px; padding-bottom: 33px;"/> After months of hard work, [user:cry,2025-07-01], [user:Lilypad,2025-07-01] and I are extremely proud to welcome you to participate in [contest:2124] at [contest_time:2124]. This round is combined for Division 1 and Division 2, and it will be rated for everyone. You will be given $3$ hours to solve $9$ problems. One problem will be split into two subtasks. We would like to thank the following people for making the contest possible: - [user:satyam343,2025-07-01] for outstanding coordination, working tirelessly with us to improve problem quality and donating his own problems to us. I cannot thank him enough. - [user:Error_Yuan,2025-07-01] for proposing some ideas that weren't used in the end. - [user:Benq,2025-07-01...
and have an honor to work with and learn from them., Please [visit our website](https://epic-institute.io/) to learn more about EPIC Institute of

Full text and comments »

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

74.
By antontrygubO_o, 7 years ago, In English
On setting D2A and D2B problems Disclaimer: as always, everything in this blog is just my opinion. Some problemsetters don't take easy problems seriously. One very popular opinion is that the D2A-B problems are just stupid implementation exercises intended for beginners to learn how to code. ![ ](https://i.imgur.com/ioTMeKL.png) ![ ](https://i.imgur.com/TJ2IPzb.png) It's true that D2A-B problems are mostly like this on most platforms. This is one of the reasons why a lot of people don't like combined rounds: they think that solving D2A-B problems can't be interesting and just takes time which could be spent on solving fascinating problems of higher level. From point of view of most participants, easy problems just can't be good, because if problem requires some thinking than it's not easy enough for D2A-B level. Easy problems can't be interesting, they say! ![ ](https://i.imgur.com/aRe2p6l.png) ![ ](https://i.imgur.com/wLKlixu.png) This situation really upsets me. This kind of attitude from the ...
problems are just stupid implementation exercises intended for beginners to learn how to code., tough and interesting enough. Implementation problems also can exist, and they are useful tolearn how, - Codeforces is not a platform where you learn how to code. There are a lot of much better places

Full text and comments »

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

75.
By nyavim, history, 2 years ago, In English
Another Graph Editor! **UPDATE (5 Dec 2024)** There have been a few new features since its initial release. - Multiple graphs/testcases (each "tab" can store its own testcase so you can visualize all testcases at once) - Multi-edge support - Bipartite mode - More appearance-related configuration sliders Thanks for all the support and suggestions! Things will continue to be added slowly over time, but if there's a particular feature that you want you can just open an issue on GitHub. --- Hello, Codeforces! I've been working on a graph visualization tool for a while now, and because I couldn't think of a good name for it, I've opted to call it *Another Graph Editor*. If you have any name suggestions, pls let me know. Here's the [website](https://anacc22.github.io/another_graph_editor/) and the [repo](https://github.com/anAcc22/another_graph_editor). ![ ](https://github.com/anAcc22/another_graph_editor/blob/main/screenshots/main.png?raw=true) The layout is very much inspired by CS A...
, do let me know. When I learn more advanced stuff like network flow, I might integrate it into the

Full text and comments »

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

76.
By Errichto, 6 years ago, In English
Matrix Exponentiation tutorial + training contest tl;dr &mdash; video tutorial https://www.youtube.com/watch?v=eMXNWcbw75E and codeforces GYM training https://codeforces.me/gym/102644 (register by finding this contest in GYM instead of using the link directly) video editorial: [part 1 (ABCDEF)](https://www.youtube.com/watch?v=kQuCOFzWoa0) and [part 2 (GHI)](https://www.youtube.com/watch?v=RA_SpxP2t54) codes to all 9 problems: https://github.com/Errichto/youtube/tree/master/matrix-exponentiation Prerequisites: binary exponentiation and iterative dp (you don't need to know matrices) The youtube tutorial ([link](https://www.youtube.com/watch?v=eMXNWcbw75E)) focuses on intuition and graph-like visualization . Or, if you prefer, below is a shorter (less detailed) text tutorial instead. You can practice by solving a set of 9 educational problems in GYM https://codeforces.me/gym/102644. ABCD are easy, EF medium, GHI are hard. If you are stuck, see hints below or watch the full solution analysis &mdash; [part 1 (ABCDEF)](https:...

Full text and comments »

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

77.
By errorgorn, 4 years ago, In English
On Div2ABs 2 years ago, [user:antontrygubO_o,2022-04-27] wrote [a blog](https://codeforces.me/blog/entry/75163) about div2ABs where he expressed his opinions that d2ABs should not be about "here is a statement, please implement what is written there". Thanks to him, the quality of d2ABs (and problem quality in general) have certainly improved. However, I still believe that there still quite large differences between how coordinators/problemsetters view d2ABs and how the intended participants view them. From the survey made by [user:kpw29,2022-04-27], we can see that most people agree that most people agree that we should **primarily** consider the target audience when proposing a task. I too think if a task is boring to div 1 contestants, we should not think of that as a reason to immediately disqualify a problem from being a d2A. ![ ](https://codeforces.me/predownloaded/70/b5/70b515da85a4dc3b362cf4eb0963dbd1fb642819.png) I think when people judge the interesting-ness of d2As, they try...
use logic or after contest spend some time learning graphs. , ). I give a small minus point on the statement about using some buzz words like machine learning tho

Full text and comments »

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

78.
By Tony2_CF, history, 9 months ago, In English
The Time Complexity Lower Bound for Segment Tree Beats is log^2 Original Post: https://jiry-2.blog.uoj.ac/blog/1404 The following content is translated by Gemini 2.5 Pro. ## Part 1: Introduction to the Hacking Method ### How to Map the Hack Sequence to a Segment Tree First, we are given a Hack sequence of length $len$. After $O(1)$ range addition operations and $\Theta(\log len)$ global $\text{chkmax}$ operations, this sequence becomes a cyclic shift (rotation) of the original sequence. Since a cyclic shift does not affect our range addition and global $\text{chkmax}$ operations (we can simply shift the indices for the range addition accordingly), we can consider the sequence as unchanged. If we have such a sequence, let $len=n^{\frac{1}{3}}$, and place such a sequence at intervals of $n^{\frac{2}{3}}$. Each sequence corresponds exactly to a segment tree interval. A subtree of size $n^{\frac{2}{3}}$ contains exactly one such segment tree interval. For the Hack sequence, the range addition operations are performed one by one on eac...

Full text and comments »

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

79.
By Lyde, 4 years ago, In English
Sometimes it's not their fault. Hello! It's 2023 now, and everyone is happy and hoping for a good year, which many good contests to come. So I want to say about one thing that I saw in most of the contests from last year, which I was pretty much annoyed about it and decided to speak about so that this year we will hope to have a better experience doing contests here. I have been in this community for more than 3 years now, not very long, but definitely enough to say that although the number of participants did increase, the number of users increase dramatically, but the number of people that respond to the contests positively don't. It actually did decrease though. I still remember that 500+ upvotes for a contest announcement are a normal thing back then, but I rarely see them now. And a common thing right now, every single contest that is over will have some comments criticizing it, but not in a good way at all. So I will make this quick for certain types of comments like that. I don't know if you do but I ...
to solve, not to hate. In the end, you will learn, and you will become stronger after each contest, want to. But think twice before blaming the problems. It is unfamiliar? Learn it yourself. It is math

Full text and comments »

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

80.
By errorgorn, 6 years ago, In English
Tutorial on Permutation Tree (析合树) So my O level Chinese exam is in 2 days so I decided to learn a data structure that I can only find [resources](https://oi-wiki.org/ds/divide-combine/) for in Chinese. I thought I might as well write a tutorial in English. This data structure is called 析合树, directly translated is cut join tree, but I think permutation tree is a better name. Honestly, after learning about it, it seems like a very niche data structure with very limited uses, but anyways here is the tutorial on it. Thanks to [user:dantoh,2020-06-16] and [user:oolimry,2020-06-16] for helping me proofread. ### Motivation Consider this [problem](https://codeforces.me/contest/526/problem/F). We are given a permutation,$P$ of length $n$. A good range is a contiguous subsequence such that $\max\limits_{l \leq i \leq r} P_i - \min\limits_{l \leq i \leq r} P_i = r-l$. This can be thought of the number of contiguous subsequence such that when we sort the numbers in this subsequence, we get contiguous values. Count the...
tree is a better name. Honestly, after learning about it, it seems like a very niche data structure, So my O level Chinese exam is in 2 days so I decided to learn a data structure that I can only find

Full text and comments »

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

81.
By Radewoosh, history, 6 years ago, In English
Special place for algorithm explanations/tutorials — feature proposal There are many blogs on Codeforces, and most of them aren't very important a long time after publishing, like round announcements, saying "hello", asking for a better explanation of problem B than the one in the editorial, and so on. Among them, there are a few very interesting blogs that are a great resource of knowledge, like [ODE by MiFaFaOvO](https://codeforces.me/blog/entry/76447), [HLD by Vladyslav](https://codeforces.me/blog/entry/12239), [suffix automaton by quasisphere](https://codeforces.me/blog/entry/20861) or even Blogewooshes. In my opinion, it would be great if there would be a special place for such blogs, accessible for example, by navigation bar, where they would be somehow sorted. It would be much easier to think "Let's learn something new!" and to do it. Also, probably Codeforces would have the greatest such base for competitive programmers. What do you think guys and [user:MikeMirzayanov,2020-06-04]? **EDIT** One more argument after thinking a bit more: of ...
"Let's learn something new!" and to do it. Also, probably Codeforces would have the greatest such base, everybody here knows that it's much easier for "us" to learn from blogs written by other competitive, somehow sorted. It would be much easier to think "Let's learn something new!" and to do it. Also

Full text and comments »

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

82.
By MikeMirzayanov, 5 years ago, In English
Codeforces: Results of 2020 [Annual Report] Hi Codeforces! Yes, I know it's already April. Time flies so fast lately! Exactly a year ago we were just learning all the "delights" of lockdown. So let's remember this 2020! What was it like? I don't know about you, but we had a hell of a lot of work. I will now show you some graphs and you will be very surprised. Lockdown effect? Of course, but we did our best too. Many thanks to everyone who did not stand aside! In 2020, we celebrated our 10th anniversary and crowdfunding money helps us grow and move forward. You helped us and each other. Thank you. <a href="https://codeforces.me/10years/supporters">Thank you for your contribution!</a> We've been working hard all year to make this community a better place. Did it work out? It's up to you to judge. Many thanks to everyone who invested time and effort: * [user:geranazavr555,2021-04-09], [user:kuviman,2021-04-09], [user:cannor147,2021-04-09] helped a lot with development and new features; * [user:Una_Shem,2021-...
; research competitions (marathons) with elements of machine learning * **Raiffeisenbank** &mdash, Yes, I know it's already April. Time flies so fast lately! Exactly a year ago we were justlearning

Full text and comments »

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

83.
By cgy4ever, 12 years ago, In English
Codeforces Round #270 Do you want to win a T-shirt? Do you want to learn how to design tasks for programming contest? Do you want to solve 7 tasks in 2.5 hours? So Codeforces Round #270 is right for you. It was designed by me in California, Assembled in polygon (so Thank you [user:MikeMirzayanov,2014-09-26] for the system and [user:Gerald,2014-09-26] for organize and testing), will start on [regular time this Sunday](http://www.timeanddate.com/worldclock/fixedtime.html?day=28&month=9&year=2014&hour=19&min=30&sec=0&p1=166), don't miss it! The organizers of **<a href="/blog/entry/13929">Marathon24</a>** decided to present gifts to the best finishers of the round! Best 25 participants will get Marathon24 tshirts! Thanks! <center> <img src="http://www.elmostshirts.com/images/tshirts.jpg"/> <br><small>It is just an image to attract your attention. Real tshirts will be designed specially for Marathon24!</small> </center> There are some articles introduced how to become a problem setter, like [Pro...
Los Angeles to learn Game Design and Game Development. As a game designer, I'll try to make my round, Do you want to win a T-shirt? Do you want to learn how to design tasks for programming contest? Do

Full text and comments »

Announcement of Codeforces Round 270
  • Vote: I like it
  • +794
  • Vote: I do not like it

84.
By zscoder, history, 6 years ago, In English
[Tutorial] Generating Functions in Competitive Programming (Part 2) Welcome to Part 2 of my tutorial on generating functions. The [first part](https://codeforces.me/blog/entry/77468) focused on introducing generating functions to those without any background in generating functions. In this post, I will demonstrate a few applications of generating functions in CP problems. Let us start with some relatively straightforward examples. Note: Unless stated otherwise, all computations are done modulo a convenient prime (usually $998244353$). Also, $[n]$ denotes the set $\\{1,2,...,n\\}$. ### Blatant Applications in Counting Problems **Problem.** [AGC 005 Problem F](https://atcoder.jp/contests/agc005/tasks/agc005_f) You have a tree $T$ with $n$ vertices. For a subset $S$ of vertices, let $f(S)$ denote the minimum number of vertices in a subtree of $T$ which contains all vertices in $S$. For all $1 \le k \le n$, find the sum of $f(S)$ over all subsets $S$ with $|S| = k$. Constraints: $n \le 2 \cdot 10^{5}$. <spoiler summary="Solution"> First, ...
interesting to learn. The motivation is the following classic problem.

Full text and comments »

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

85.
By -is-this-fft-, history, 4 years ago, In English
[Tutorial] FFT If I was a YouTuber, this would be the place where I fill the entire screen with screenshots of people asking me to make this. Anyway, not so long ago I gave a lecture on FFT and now [user:peltorator,2023-01-11] is giving away [free money](https://codeforces.me/blog/entry/110840), so let's bring this meme to completion. In this blog, I am going to cover the basic theory and (competitive programming related) applications of FFT. There is a long list of generalizations and weird applications and implementation details that make it faster. Maybe at some point I'll write about them. For now, let's stick to the basics. **The problem.** Given two arrays $a$ and $b$, both of length $n$. You want to quickly and efficiently calculate another array $c$ (of length $2n - 1$), defined by the following formula. $$c_k = \displaystyle \sum_{i + j = k} a_i \cdot b_j.$$ Solve it in $O(n \log n)$. First of all, why should you care? Because this kind of expression comes up in combinatorics a...
But if you are still curious to learn how it works, keep reading..., People in general learn by moving from concrete to abstract. That is, for most people it is best to

Full text and comments »

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

86.
By AkiLotus, 7 years ago, In English
Codeforces Round #614 *"Can you hear me?"* *"Vanessa...?"* ![ ](https://i.imgur.com/82l1lt0.png) Hello Codeforces! We are here to invite you to Codeforces Round #614 (Div. 1) and Codeforces Round #614 (Div. 2), which will take place at [contest_time:1292]. The round is rated for both divisions. This is our first round including Div.1 parts, hopefully you'll find the problems interesting. ;) This round is themed based on the Rayark Inc.'s rhythm game, [_"Cytus II"_](https://www.rayark.com/g/cytus2/). You are about to help our characters in various problems, whether inside or outside of the virtual Internet! Also, feel free to listen to the music tracks I've chosen from the game for each problem (and later, editorial!). ;) Each division will be given **6** problems to solve in **2 hours.** The round's problems were prepared by Xuan-Quang ~xuanquang1999,2020-01-12 D. Nguyen, Duy-Bach ~Akikaze,2020-01-12 Le and Tuan-Dung ~low_,2020-01-12 To. Interactive problem(s) might be found in this ...
Interactive problem(s) might be found in this round. Learn about them [here](https://codeforces.com

Full text and comments »

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

87.
By MikeMirzayanov, 4 years ago, In English
About Problem Coincidences Hi. Of course, there was an unpleasant incident with the problem today. In fact, the problem almost coincided with another problem in the old round, which was hosted 5 years ago. You, of course, are shocked. You, of course, think that the round should be unrated. You are wrong. Here's why. [cut] We need to clearly distinguish between two scenarios with coincided problems in our rounds. First. The writer has knowingly plagiarized. This is an outrageous scenario. Such behavior knows no excuse and it is a conscious detriment to our community. Shame on the writer! Second. The problem was matched unintentionally. The writer was unaware of some old problem. This happens. The coordinator had not seen this old problem before or had forgotten it. We are all human. The round was tested, but the testers did not indicate such a coincidence. Too bad, it happens. Who can we blame for this situation? The writer? Most likely, the writer did a lot of work to prepare the ro...
similar models, learning from similar educational tasks. Of course, sometimes people think alike. And

Full text and comments »

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

88.
By rama_pang, history, 6 years ago, In English
[Tutorial] Li Chao Tree Extended Hello everyone! I discovered a new (?) trick on how to apply lazy propagation on the Li Chao Tree and decided to write a blog about it. I've personally never seen it before (outside of myself), nor have I seen a problem that needs the Extended Li Chao Tree specifically, but it *can* overkill some problems. Of course, I might not be looking hard enough... You can learn about the basics of Li Chao Tree from [cp-algorithms](https://cp-algorithms.com/geometry/convex_hull_trick.html) or [this simple blog](https://robert1003.github.io/2020/02/06/li-chao-segment-tree.html). The Extended Li Chao Tree can do the following problems (and other variations): ## Problem 1 There is an array $A$ of size $N$. There are $Q$ online operations: - Range Line Insertion. Given $l$, $r$, $a$, $b$, do $A_i = \max(A_i, a \cdot i + b)$, $\forall i \in [l, r]$ in $O(\log^2 N)$ - Range Line Addition. Given $l$, $r$, $a$, $b$, do $A_i += a \cdot i + b$, $\forall i \in [l, r]$ in $O(\log^2 N)$. - Po...
You can learn about the basics of Li Chao Tree from [cp-algorithms](https://cp-algorithms.com

Full text and comments »

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

89.
By BledDest, history, 9 years ago, translation, In English
Educational Codeforces Round 33 [Rated for Div. 2] Hello Codeforces! On [November 23, 18:05 MSK](https://www.timeanddate.com/worldclock/fixedtime.html?day=9&month=11&year=2017&hour=18&min=5&sec=0&p1=166) Educational Codeforces Round 33 will start. Series of Educational Rounds continue being held as [Harbour.Space University](https://harbour.space/) initiative! You can read the details about the cooperation between [Harbour.Space University](https://harbour.space/) and Codeforces in the <a href="http://codeforces.me/blog/entry/51208">blog post</a>. As an experiment, the round will be **rated for Div. 2**. It will be held on extented ACM ICPC rules. After the end of the contest you will have one day to hack any solution you want. You will have access to copy any solution and test it locally. You will be given **6 problems** and **2 hours** to solve them. The problems were prepared by Mikhail [user:PikMike,2017-11-08] Piklyaev, Vladimir [user:0n25,2017-11-22] Petrov and me. Good luck to all participants! UPD: [Edito...
Mathematical Institute at. St. Petersburg. He is a computer scientist with vast experience inmachine

Full text and comments »

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

90.
By awoo, history, 15 months ago, translation, In English
Educational Codeforces Round 180 [Rated for Div. 2] <img alt="Neapolis University Pafos" src="/predownloaded/9a/33/9a332fadbb47050ba9405057df022a6e37eaf5c0.png" style="float:right;height: 200px; margin: 10px; max-width:40%;"/> Hello Codeforces! The series of Educational Rounds continues thanks to the support of the [Neapolis University Pafos](https://www.nup.ac.cy/). They offer a BSc in Computer Science and AI with [JetBrains Scholarships] (https://lp.jetbrains.com/academy/csai-program/). Gain cutting-edge skills in AI and machine learning, preparing you for high-demand tech careers. Curious? Check out the [CSAI curriculum] (https://drive.google.com/file/d/19I776O8NG07ie2Q14wwBspuh3De4kbHc/view). Limited scholarships available &mdash; don't miss your chance to study in Europe for free! On [contest_time:2112] [contest:2112] will start. This round will be **rated for the participants with rating lower than 2100**. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a ful...
] (https://lp.jetbrains.com/academy/csai-program/). Gain cutting-edge skills in AI andmachine

Full text and comments »

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

91.
By Kuroni, history, 7 years ago, In English
Codeforces Round #616 Hello Codeforces o(≧∇≦o) I'm glad to introduce you to [contest:1290] and [contest:1291], which will take place on [contest_time:1290]. Each division will contain **6 problems**, and you will have **2.5 hours** to solve them. There might be interactive problems, feel free to learn about them [here](https://codeforces.me/blog/entry/45307). The problems were created by [user:265918,2020-01-30], [user:Ari,2020-01-30], [user:Kuroni,2020-01-30], [user:gamegame,2020-01-30], and [user:hugopm,2020-01-30]. Now, here are some people I would love to mention: - Thank you [user:isaf27,2020-01-30] for being a super helpful, diligent, and humorous coordinator ヽ(〃・ω・)ノ - Thanks to [user:McDic,2020-01-30], [user:nvmdava,2020-01-30], [user:dorijanlendvaj,2020-01-30], [user:antontrygubO_o,2020-01-30], [user:sdssudhu,2020-01-30], and [user:farmersrice,2020-01-30] for helping with the preparation of the tasks. - Thanks to [user:Sofie_Ever,2020-01-30], [user:mcfr,2020-01-30], [user:MathisHamm...
might be interactive problems, feel free to learn about them [here](https://codeforces.me/blog/entry

Full text and comments »

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

92.
By Sharon, history, 8 years ago, In English
I am removing my contest proposal from Codeforces I am removing my contest proposal from Codeforces. Note: This is a serious blog post. Also, the opinions presented in this blog are my own and not of my friend [user:BiIIy,2018-12-26] who wrote the contest with me. Today I have removed my contest proposal from Codeforces. I should probably have done this a long time ago. The proposal was made in February, but the problems were written and finished by March, and that is when I opened the contest proposal for review and messaged [user:KAN,2018-12-26]. It is currently December and no progress or development has been made regarding my contest proposal since, so I will be removing it. I have multiple reasons for removing my contest proposal: - I have no motivation to host an online contest anymore. - I am involved in problem setting with two other high school programming contests in my university, and I write, host, and judge another contest for local high schools. - I have forgotten that I “was in the queue” for writing a...
other problem setter wishes to learn what I wanted to know they will find this blog.

Full text and comments »

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

93.
By BledDest, history, 9 years ago, In English
Educational Codeforces Round 24 Hello Codeforces! On [June 29, 18:05 MSK](https://www.timeanddate.com/worldclock/fixedtime.html?day=29&month=6&year=2017&hour=18&min=5&sec=0&p1=166) Educational Codeforces Round 24 will start. Series of Educational Rounds continue being held as [Harbour.Space University](https://harbour.space/) initiative! You can read the details about the cooperation between [Harbour.Space University](https://harbour.space/) and Codeforces in the <a href="http://codeforces.me/blog/entry/51208">blog post</a>. The round will be **unrated** for all users and will be held on extented ACM ICPC rules. After the end of the contest you will have one day to hack any solution you want. You will have access to copy any solution and test it locally. You will be given **7 problems** and **2 hours 15 minutes** to solve them. The problems were prepared by Mikhail [user:PikMike,2017-06-28] Piklyaev, Alexey [user:Perforator,2017-06-28] Ripinen and me. Good luck to all participants! I also have ...
science today to applying the latest advancements in machine learning to your work., university: Nowadays machine learning technologies are widely used in practice in various applied, Nowadays machine learning technologies are widely used in practice in various applied fields such, We are pleased to announce our Industrial Machine Learning course, aimed to teach the structure and, http://in.harbour.space/data-science/industrial-machine-learning/

Full text and comments »

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

94.
By -is-this-fft-, history, 4 years ago, In English
On "is this greedy or DP", forcing and rubber bands #### Introduction When it comes to "problem-solving techniques", there are roughly 3 levels: 1. Concrete algorithms (Kruskal's algorithm, Li-Chao tree, fast Fourier transform) 2. General patterns (dynamic programming, greedy, square-root decomposition) 3. Meta-strategies ("how do I even go about solving this problem?") There is some grey area, but in general this classification works well. [Many tutorials](https://codeforces.me/catalog) have been written about ideas that fall into 1 or 2. But very little has been written about the third category. On the catalog, I think the only blogs that really qualify are [this](62730) and [this](20548). There is also [this](92248?#comment-809401) valuable comment. As to why there is so little written, I think I can identify two reasons. - Most strong contestants don't really consciously think about these. After solving a problem with FFT, it's hard not to know you used FFT. If you used DP, even if you did it without thinki...

Full text and comments »

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

95.
By kpw29, 4 years ago, In English
You can do it, too! Introduction ------------------------------- So, I set myself [that challenge](https://codeforces.me/blog/entry/81383) to retire as a red coder before 24.09.2020... and I failed **miserably**. At least I am less delayed than most civil infrastructure projects. This blog will be a recap of this _short_ challenge with a mixture of some tips on practicing (for all levels!), some random life advice and, of course my bad sense of humour. It is dedicated to all those who aren't wonderkids, go from failure to failure and feel like banging their head into a wall during most of their competitive programming journey. Whatever your goal is, I'd like to strengthen your beliefs &mdash; you can do it! How it all started ------------------ My skill level has been in constant stagnation for years. I've always thought that I'm just not talented enough to be a grandmaster. Although I've been red twice in the past, it was quite lucky and the next contests were solid $-137$ and $-189$ so th...
interview skills to get a real job, or getting involved in some random machine learning startup that will

Full text and comments »

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

96.
By purplesyringa, 5 years ago, In English
This is not an exit. ![This is not an exit.](https://i.ibb.co/N9zrDNp/cf.png) I am looking at the post called [*Is Mike Mirzayanov dictator?*](https://codeforces.me/blog/entry/94033) at the moment. I'm reading through the comments, I'm looking at people's reactions, I'm reading Mike's replies, and... I am utterly disappointed. I demand progress. For context, I do believe Codeforces is the best website for competitive programming contests at the moment. I sincerely give credit to Mike for creating Codeforces and providing participants and contest authors a platform for interaction completely for free. I am confident that Codeforces is the most appropriate website for being *the* platform for sharing knowledge, exchanging tricks and methods, and collaboration between both contest participants, their authors, and coordinators. **Please consider this an open letter**, for this is a will not of a single person, but of many individuals. Please consider signing it by stating so in a comment under the...
In other words: a wiki-like platform, a place to collect and label learning material from

Full text and comments »

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

97.
By errorgorn, 2 years ago, In English
[RANT] Warning to other coordinators about Wuhudsm Hi again, it is me. I want to preface this blog by saying that I am totally aware that it is not good netiquette to screenshot private messages and publish them publicly. But honestly, I can't care anymore now. Below is an unorganized rant. Sorry, I'm too pissed to write the things below concisely. And here: I'm pinging him: [user:wuhudsm,2024-07-21]. In an ideal world, I could probably just tell him privately to stop doing it. But I already did. So I think I need to write this blog to either stop him from doing this again or just soft-ban him from authoring more rounds by telling everyone about it. Let me just preface this blog with a fact of coordination -- it is very possible that problems from contest A will be used in contest B even after testers from contest A have seen those problems. So there are indeed (many) testers who could possibly be affected by this. Some examples of this happening (where I was involved): - Contest problems based on on-site contests were quit...

Full text and comments »

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

98.
By dpaleka, 5 years ago, In English
OpenAI Codex can solve unseen Codeforces problems In this post, we will use the recent OpenAI Codex product based on GPT-3, first introduced in [Evaluating Large Language Models Trained on Code (Chen et al., 2021)](https://arxiv.org/abs/2107.03374) to solve some Codeforces problems. We use the round [contest:1560] because the current version of the Codex model was released before this round. As the model has been trained on the Github data, it is possible that it memorized some solutions for older problems. ### Solving [problem:1560A] from the statement only This is a simple problem, and the statement kind of explains what we should implement. Let's just give the plaintext statement to Codex: <spoiler summary="Prompt"> Problem: Polycarp doesn't like integers that are divisible by 3 or have the last digit 3 in their decimal representation. Polycarp starts to write out the positive (greater than 0) integers which he likes: 1,2,4,5,7,8,10,11,14,16,…. Output the k-th element of this sequence (the elements are numbered...
If you are a machine learning researcher, or maybe just a competent person in general, try to get

Full text and comments »

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

99.
By ko_osaga, history, 4 years ago, In English
[Tutorial] On Range LIS Queries, Part 1 Hello, Codeforces! At some point of life you want to make a new data structure problem with short statement and genius solution. LIS (Longest Increasing Subsequence) is a classic problem with beautiful solution, so you come up with the following problem: * Given a sequence $A$ of length $N$ and Q queries $1 \le i \le j \le N$, compute the length of Longest Increasing Subsequence of $A[i], A[i + 1], \ldots, A[j]$. But on the other hand this looks impossible to solve, and you just give up the idea. I always thought that the above problem is unsolved (and might be impossible), but very recently I learned that such queries are **solvable** in only $O(N \log^2 N + Q \log N)$ time, not involving any sqrts! The [original paper](https://arxiv.org/abs/0707.3619) describes this technique as *semi-local string comparison*. The paper is incredibly long and uses tons of scary math terminology, but I think I found a relatively easier way to describe this technique, which I will show in t...

Full text and comments »

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

100.
By awoo, history, 12 months ago, translation, In English
Educational Codeforces Round 182 [Rated for Div. 2] <img alt="Neapolis University Pafos" src="/predownloaded/9a/33/9a332fadbb47050ba9405057df022a6e37eaf5c0.png" style="float:right;height: 200px; margin: 10px; max-width:40%;"/> Hello Codeforces! The series of Educational Rounds continues thanks to the support of the [Neapolis University Pafos](https://www.nup.ac.cy/). They offer a BSc in Computer Science and AI with [JetBrains Scholarships] (https://lp.jetbrains.com/academy/csai-program/). Gain cutting-edge skills in AI and machine learning, preparing you for high-demand tech careers. Limited scholarships available &mdash; don't miss your chance to study in Europe for free! On [contest_time:2144] [contest:2144] will start. This round will be **rated for the participants with rating lower than 2100**. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest, you will have 12 hours to hack any solution you want. You w...
] (https://lp.jetbrains.com/academy/csai-program/). Gain cutting-edge skills in AI andmachine

Full text and comments »

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

101.
By zscoder, history, 7 years ago, In English
Valentine's Day Contest 2020 Hello everyone! Will you be single and bored during Valentine's Day? Never fear, as [user:zscoder,2020-02-06] is here to cure your boredom. I would like to invite you to Valentine's Day Contest 2020, which will take place on [Friday, February 14, 2020 at 12:30 GMT](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20200214T2030&p1=122&ah=3&am=30). The contest is unofficial and unrated, but the quality of most (if not all) of the problems are comparable to problems from a Codeforces round. I am the author of all problems. The contest format will be IOI format, which means that each problem is worth $100$ points, and there are subtasks for each problem. There will be no time penalty. The problems are **not sorted in increasing order of difficulty**. Unlike IOI, you are allowed to use any templates or notes you have. There are **7 problems** to be solved in **3.5 hours**. There is an interactive problem, so feel free to learn about them [here](https://codeforces.me/...
free to learn about them [here](https://codeforces.me/blog/entry/45307).

Full text and comments »

Announcement of Valentines Day Contest 2020
  • Vote: I like it
  • +564
  • Vote: I do not like it

102.
By awoo, history, 23 months ago, translation, In English
Educational Codeforces Round 170 [Rated for Div. 2] <img alt="Neapolis University Pafos" src="/predownloaded/9a/33/9a332fadbb47050ba9405057df022a6e37eaf5c0.png" style="float:right;height: 200px; margin: 10px; max-width:40%;"/> Hello Codeforces! The series of Educational Rounds continues thanks to the support of the [Neapolis University Pafos](https://www.nup.ac.cy/). They offer a BSc in Computer Science and AI with [JetBrains Scholarships] (https://lp.jetbrains.com/academy/csai-program/). Gain cutting-edge skills in AI and machine learning, preparing you for high-demand tech careers. Curious? Check out the [CSAI curriculum] (https://drive.google.com/file/d/19I776O8NG07ie2Q14wwBspuh3De4kbHc/view) now. Limited scholarships available &mdash; don't miss your chance to study in Europe for free! Are you looking to sharpen your skills and increase your chances of getting a scholarship? Join the free clubs for high school students from JetBrains: - [Math club](https://lp.jetbrains.com/youth-math-club/) - [AI club](https://lp.jetbra...
] (https://lp.jetbrains.com/academy/csai-program/). Gain cutting-edge skills in AI andmachine

Full text and comments »

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

103.
By antontrygubO_o, history, 7 years ago, In English
On problemsetting 2 [Previous part](https://codeforces.me/blog/entry/70178) Hi there again! Previous part with opinions of some amazing problemsetters turned out to be interesting for you, so I decided to gather some more opinions :D. I really hope that this post will help someone in their problemsetting future! #### When and how did you start problemsetting? [user:300iq,2020-01-11]: April, 2017 [user:maroonrk,2020-01-11]: In 2015 Summer, I hold the first contest with friends at high school club. It was a local Japanese contest. [user:Radewoosh,2020-01-11]: In high school, so probably for 5 years. I was creating problems for other people from my school as my teacher told me that it's a completely different point of view. [user:voidmax,2020-01-11]: It was 3 years ago. I was on plane and I didn't have a clue what to do in my free time. Then I realized that I can try myself in problemsetting. Later I created first and one of my favorite problem ([problem:963B]). I was full of inspiration a...
problems, since it would be a nice opportunity for beginners to learn common techniques. However

Full text and comments »

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

104.
By codetiger927, history, 5 years ago, In English
My Quest to Answer the Ultimate Question Through Machine Learning: If a hamster was born in aquarium, does it become a fish? `If a hamster was born in aquarium, does it become a fish?` &mdash; Rotavirus 2021 When the hour hand is way past twelve and the sky is dark, I often find myself pondering about this question, alone. Of course, a hamster is a hamster, and it cannot just become a fish right? But then again, if its mother gave birth to it inside an aquarium, then who's to say the hamsters didn't acquire a critical mutation that gifted them the ability to breathe underwater, transforming them into fish? I would be awake at 3 am in the morning, frustrated and defeated by this cruel dilemma that I cannot seem to solve. But, Rotavirus must know, right? After all, he was the person that proposed this rhetorical question, so he must have the answer to his own question! If I could just ask him, maybe, just maybe... Yet fate cheated me once again: Codeforces has permanently banned Rotavirus &mdash; I can no longer ask him. All I have left are only pieces of clues and hints scattered around his commen...
My Quest to Answer the Ultimate Question Through Machine Learning: If a hamster was born in

Full text and comments »

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

105.
By awoo, history, 4 years ago, translation, In English
Educational Codeforces Round 143 [Rated for Div. 2] Hello Codeforces! On [contest_time:1795] [contest:1795] will start. Series of Educational Rounds continue being held as [Harbour.Space University](https://harbour.space/) initiative! You can read the details about the cooperation between [Harbour.Space University](https://harbour.space/) and Codeforces in the <a href="http://codeforces.me/blog/entry/51208">blog post</a>. This round will be **rated for the participants with rating lower than 2100**. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest, you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally. You will be given **6 or 7 problems** and **2 hours** to solve them. The problems were invented and prepared by Adilbek [user:adedalic,2023-02-15] Dalabaev, Vladimir [user:vovuh,2023-02-15] Petrov, Ivan [user:BledDest,2023-02-15] Androsov, Ma...
- _Invent and implement approaches to solving problems of computer vision and machine learning

Full text and comments »

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

106.
By AlexSkidanov, history, 9 years ago, In English
Making machines write and execute code #1: Neural programmer-interpreters Hi, everyone, As I mentioned in the last post, myself and a friend of mine got very interested in how close we can get machines to writing software, and whether modern advances in Deep Learning can help us build tools that considerably improve the way people write, review and debug code. I want to start a series of posts discussing some interesting advances in using machine learning for both writing and executing code. This particular post is about a machine learning model proposed early last year by Scott Reed from University of Michigan, then an intern at Google DeepMind, called <a href=https://arxiv.org/pdf/1511.06279.pdf>Neural Programmer-Interpreters</a>. But before I go into the details, I would like to start with an ask. CodeForces and similar websites today host a vast amount of data that we would love to use to train our machine learning models. A particular challenge is that problem statements historically contain a lot of unnecessary information in an attempt to ...
NPI for short, is a machine learning model that learns to execute programs given their execution, can get machines to writing software, and whether modern advances in Deep Learning can help us build, himself before being able to learn it. Other models such as Neural Turing Machines are more interesting, websites today host a vast amount of data that we would love to use to train ourmachine learning models. A, I want to start a series of posts discussing some interesting advances in using machine learning, This particular post is about a machine learning model proposed early last year by Scott Reed from

Full text and comments »

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

107.
By peltorator, 4 years ago, In English
Codeforces Month of Blog Posts (win $300) **TL;DR:** Write an interesting CodeForces blog post until February 15th and win $300. **UPD: Second place will receive $50.** **UPD2: Competition is over, The results are available [here](https://codeforces.me/blog/entry/113041).** I am a huge fan of CodeForces and specifically CodeForces blog posts! There are tens and hundreds of gems posted on this platform throughout the years. Thankfully, recently there was added the [catalog](https://codeforces.me/catalog) page where a lot of cool articles can be found. Personally, if I want to remember some classical algorithm, I would go to websites like [cp-algorithms](https://cp-algorithms.com/), but CodeForces is the place where new or rare stuff is born, where new points of view emerge. I think it is one of the most valuable functions of this website, and I would like to facilitate its growth. I know that many people have cool ideas in their minds that they came up with or maybe something that is known only in their community on ...
people can learn about it and participate, but it is not obligatory in any way, I am not forcing you

Full text and comments »

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

108.
By steven.novaryo, history, 4 years ago, In English
Codeforces Round #831 (Div. 1 + Div. 2, based on COMPFEST 14 Final) <img alt="logo" src="/predownloaded/03/5f/035ff83d655937b478f5fe9f351f79ac0781f6d2.png" style="float: right;height: 100.0px;margin: 10.0px;max-width: 100.0%;max-height: 100.0%;"> Halo, **Codeforces**! &#x1f970;&#x1f970;&#x1f970;&#x1f970; COMPFEST 14 is happy to invite you to participate in [contest:1740] on [contest_time:1740]. **Note the unusual time of the round**. The round will be **rated for everyone**. You will be given **2 hours and 45 minutes** to solve **9 problems**. The problems are written by [user:NeoZap,2022-10-26], [user:Nyse,2022-10-26], [user:Pyqe,2022-10-26], and [user:steven.novaryo,2022-10-26]. Scoring distribution: **500 &mdash; 1000 &mdash; 1500 &mdash; 1750 &mdash; 2000 &mdash; 2500 &mdash; 2750 &mdash; 3000 &mdash; 3500** We would like to thank: - [user:KAN,2022-10-26] for helping to host the round; - [user:errorgorn,2022-10-26] for the based coordination and help with the problem preparation; - [user:Zappeko,2022-10-26] for helping with the ...
. We will use this experience to learn and improve our preparation next time.

Full text and comments »

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

109.
By ouuan, history, 7 years ago, In English
Are there any learning materials of polynomial minimum cost flow algorithms? Many people think they know how to solve the min-cost-max-flow problem, but most of them only know how to solve it with pseudo-polynomial time algorithm (although it usually runs very fast). And in [this blog](https://min-25.hatenablog.com/entry/2018/03/19/235802), min_25 provided a counter case generator, most people's MCMF algorithm runs in $O(2^{\frac n 2}n^2\log n)$ on it. <spoiler summary="the counter case"> ``` 42 421 1 2 1 0 1 3 3 0 1 4 5 0 1 5 10 0 1 6 20 0 1 7 40 0 1 8 80 0 1 9 160 0 1 10 320 0 1 11 640 0 1 12 1280 0 1 13 2560 0 1 14 5120 0 1 15 10240 0 1 16 20480 0 1 17 40960 0 1 18 81920 0 1 19 163840 0 1 20 327680 0 1 21 655360 0 2 22 5242880 0 2 23 5242880 1 2 24 5242880 3 2 25 5242880 7 2 26 5242880 15 2 27 5242880 31 2 28 5242880 63 2 29 5242880 127 2 30 5242880 255 2 31 5242880 511 2 32 5242880 1023 2 33 5242880 2047 2 34 5242880 4095 2 35 5242880 8191 2 36 5242880 16383 2 37 5242880 32767 2 38 5242880 65535 2 39 5242880 131071...
Are there any learning materials of polynomial minimum cost flow algorithms?, ://ouuan.github.io/基于-Capacity-Scaling-的弱多项式复杂度最小费用流算法/); for those who want Englishlearning materials, [the one, Are there any other learning materials besides the papers? Thanks in advance., I tried to find learning materials of polynomial minimum cost flow algorithms, but I can only find

Full text and comments »

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

110.
By SlavicG, history, 4 years ago, In English
The Toxic Mindset in Competitive Programming and How to Fight It #### Introduction Rating is a great measure of skill and a nice way to observe progress by comparing yourself to your past self and seeing where you stand in the community. As great measure as it is, there are a lot of problems that come with it. They have nothing to do with how the rating system works but rather with how human beings function. In this blog post, I will talk about some of the most pressing personal problems that come up with rating and try to provide some advice on how to solve them, speaking from personal experience and from the experience of a lot of other people I know. #### Associating self-worth to rating This is, in my opinion, the most significant problem people face, and it also pretty much contains all the following problems as a subset. It's extremely easy to fall into this rabbit hole since, as a competitive programmer, it only feels natural to associate our rating with intelligence and, respectively, our intelligence with self-worth. Why is this su...
are a great way to practice in a competitive environment, learn to deal with the competition stress, more open to learning new things by collaborating. It's easier to work with others when you aren't

Full text and comments »

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

111.
By catgirl, 10 months ago, In English
I have solved problems on Codeforces for 500 days in a row It's been a while since I started my journey into competitive programming and in this year and (almost) a half I would say that I learned a bit not only about problem solving but also about myself, so I wanted to share my reflections on some mental aspects of practicing competitive programming hoping they can help someone else. Please note that these reflections are merely personal and mostly stem from personal experience, if you disagree with something I would like to know your point of view! I would also like to thank [user:Intellegent,2025-12-08], [user:turska,2025-12-08] and [user:LMeyling,2025-12-08] for proofreading. ![ ](/predownloaded/07/0b/070b72002cfad69b15bb24a5a086d9b8466bcb96.png) #### Some background I used to do math olympiads for 8 years before starting university, in hindsight I did not really like it that much since I never practiced on my own and would've rather played League of Legends / Minecraft / VALORANT or whatever game I was obsessed at the time. ...
every contest I could on Codeforces, the prospect of gaining rating or either waylearning something

Full text and comments »

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

112.
By Hoks_, history, 10 months ago, In English
Maybe It’s Time to Stop Unrated Accounts from Submitting Recently, we’ve run into an unpleasant situation: some large companies have been using a huge number of accounts to submit AI-generated solutions purely for model training, which ended up causing serious “in queue” congestion for everyone else. **Maybe it’s time to consider restricting submissions from unrated users.** If those AI-driven accounts were required to participate in at least one contest before being allowed to submit normally, it would drastically cut down the number of accounts they could abuse. On top of that, we could improve AI-detection during contests and apply stricter monitoring to accounts that submit massive amounts of AI-generated code. For regular users, the requirement is trivial — just join a single Codeforces round, and you’re good to go. Compared to the awful experience of having the queues jammed for hours, this small inconvenience might be a reasonable trade-off. That’s the best idea I can think of at the moment. What do you think? How can we ...
> Perhaps assigning a separate evaluation machine specifically for Unrated Users would be a better

Full text and comments »

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

113.
By Vladithur, 2 years ago, In English
EPIC Institute of Technology Round Summer 2024 (Div. 1 + Div. 2) <a href="https://epic-institute.io/"><img alt="EPIC" src="https://assets.codeforces.com/images/deltix/2_logo.gif" style="float:right; height: 154px; padding-left: 35px; padding-right: 73px; padding-top: 41px; padding-bottom: 33px;"/></a> Hi, Codeforces! We are pleased to invite you to [contest:1987], which will be held on [contest_time:1987]. You will be given **8 problems**, two of which are divided into two subtasks, and you will have **3 hours** to solve them. The round will be rated for **everyone**. At least one of the problems will be interactive, so please read the [guide for interactive problems](https://codeforces.me/blog/entry/45307) if you are not familiar with it. We would like to thank: - [user:errorgorn,2024-06-27] for coordinating the round. - [user:Geothermal,2024-06-27], [user:turmax,2024-06-27], [user:noimi,2024-06-27], [user:SomethingNew,2024-06-27], [user:feecIe6418,2024-06-27], [user:Endagorion,2024-06-27], [user:glebustim,2024-06-27], [user:zelibo...
Please [visit our website](https://epic-institute.io/) to learn more about EPIC Institute of

Full text and comments »

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

114.
By bukefala, history, 9 years ago, In English
Top 10 optimizations 2017- (collectors edition) Hello friends. The year is almost over so I have prepared the top 10 optimizations of 2017 for your viewing pleasure. Without forthor ado, let us begin. 1. OPTIMIZATION OF FLOYD VARŠAL ALGORITHM TO RUN IN N^2: simply instead of going from 1 to N in third loop we willuse bitset which will visit the remaining nodes automatically 2. SEGMENT TREE OPTIMIZATION TO RUN IN O(NlogMlogQ) complexity. We will simply use bitset to fetch our data between nodes instead of every time having to calculate hashes in nodes all over again. 3. OPTIMIZATION OF FENWICK TO ACCEPT QUERIES OF TYPE: EXPAND INTERVAL BY CONSTANT C We will simply use bitset which will store every expansion in every possible moment in time. You will say this is obviously too slow. But it can be easily optimized. We will simply make another bitset map for these changes. 4. USING LCA AS A TOOL TO OPTIMIZE TRIE You maybe thinking that LCA has nothing to do with trie. but-witg SIMPLE usage of little thing called bitset...
9. MACHINE LEARNING TRICK WITH BITSET Simply use AI bitset for storing your patterns.

Full text and comments »

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

115.
By awoo, history, 5 years ago, translation, In English
Educational Codeforces Round 110 [Rated for Div. 2] Hello Codeforces! On [contest_time:1535] [contest:1535] will start. Series of Educational Rounds continue being held as [Harbour.Space University](https://harbour.space/) initiative! You can read the details about the cooperation between [Harbour.Space University](https://harbour.space/) and Codeforces in the <a href="http://codeforces.me/blog/entry/51208">blog post</a>. This round will be **rated for the participants with rating lower than 2100**. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally. You will be given **6 or 7 problems** and **2 hours** to solve them. The problems were invented and prepared by Roman [user:Roms,2021-06-03] Glazov, Adilbek [user:adedalic,2021-06-03] Dalabaev, Vladimir [user:vovuh,2021-06-03] Petrov, Ivan [us...
**What you will learn:**, - _We change the way of learning_ - _We learn by doing_ - _We are your home_

Full text and comments »

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

116.
By Sanae, history, 4 months ago, In English
Apology for faults in Codeforces Round 1098 Hello, I'm Sanae. In ufc+8 zone, I watched the entire contest at midnight. Too many cheaters emerged and we were busy banning them. I noticed WA submissions on [problem:2228B], [problem:2228C2] and TLE submissions on [problem:2228D], which was intended. Soon after the end of the contest, I released the editorial. The bad news was, the complaints flooded the website and my contribution fell from +91 to -92. After reflecting on the issues, I was anixous and blamed myself. Now, I make an apology to point out the problems to avoid them next time. Sorry, everyone! 1. Too many cheaters emerged. [Comment 1](https://codeforces.me/blog/entry/153617?#comment-1365371) 2. The problems stay in the queue for a very long time bothered contestants. 3. B is easy but many contestants misssed the corner case. And C has many corner cases. [Comment 1](https://codeforces.me/blog/entry/153617?#comment-1365212), [Comment 2](https://codeforces.me/blog/entry/153617?#comment-1365256), [Comment 3...
a novel opinion to me. Some of his words are just what I want to say. I learn a lot from the

Full text and comments »

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

117.
By beaaaan, history, 18 months ago, In English
The very first red LLM cheater? Let me introduce you to [user:lequoctran181,2025-04-06] a.k.a Lê Trần Quốc Anh, a shining star in the competitive programming community from National Economics University, Hanoi. He is a philosopher who talks about CP-ing quite a lot on his Facebook page, sharing tips, talking about his journey, etc... ![ ](https://i.imgur.com/VAEYfGh.png) ![ ](https://i.imgur.com/vTQHQrk.jpeg) ![ ](https://i.imgur.com/cT5jp7Y.png) I admit, he is skilled, but not at cp, but at cheating. The first time I paid attention to this account was in December of 2024, where he had 2 different templates, submitting C and D only around 10 minutes apart from each other, and achieving rank 35 on [contest:2042], notice how he didn't space down, and the different way of naming variables: ![ ](https://i.imgur.com/0t0x1OD.png) ![ ](https://i.imgur.com/5OFpgeX.png) Now, after this "achievement", of course, he would be very proud, as seen bragging about it here on the blog post of the round: ![ ](h...
unordered_map, guess he still didn't learn..., unordered_map, again! I guess he didn't learn his lesson, despite saying that he would here :(, or

Full text and comments »

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

118.
By -Morass-, history, 9 years ago, In English
Problem Topics Good Day to you! I've been asked to make some topic-wise list of problems I've solved. Even though I couldn't involve all problems, I've tried to involve at least "few" problems at each topic I thought up (I'm sorry if I forgot about something "easy"). I've alredy made such list once anyway I've tried to include more problems now &mdash; so here it is: <spoiler summary="aho"> http://www.spoj.com/problems/ADAJOBS/ URI 2226 (5) //[NICE][NUMBERS][DP] http://www.spoj.com/problems/SUB_PROB/en/ http://codeforces.me/contest/696/problem/D 8 http://www.spoj.com/problems/AHOCUR/ 5 //Aho-Corassic + DP https://www.codechef.com/problems/LYRC (5) //Sample aho-brute-force http://codeforces.me/problemset/problem/346/B //Proposed by [user:bradyawn,2019-08-03] </spoiler> <spoiler summary="automat"> 6861 [LA] //CYK UVA 10679 //Suffix Automat http://www.spoj.com/problems/STRMATCH/ //Suffix Automat &mdash; trie might do too http://www.spoj.com/problems/NSUBST...
(learning!)

Full text and comments »

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

119.
By AlexLuchianov, 4 years ago, In English
[Tutorial, Flows] Project Selection Problem One advanced topic in competitive programming are flows. The main challenge in flow problems lays often not in the algorithm itself, but in modelling the graph. To solve the project selection problem, we will model it as an instance of the minimum cut problem: _"You are given a directed graph with weighted edges. One node is designated as a source and another as a sink. Erase a set of edges of minimal total weight such that the source and the sink become disconnected. The source and the sink are considered to be disconnected if there no longer exists a directed path between them"_ The minimum cut problem is equivalent to the [maximum flow problem](https://cp-algorithms.com/graph/edmonds_karp.html). Note that we can consider the maximum flow problem as a black-box that solves our instances of minimum cut. Thus, once we manage to reduce our problems to minimum cut, we can consider them solved. ###The project selection problem This problems is most often stated as: _"You a...
abandon project $j$ without also abandoning project $i$. If machine $i$ is dependent onmachine $j$ we, between the $i$-th machine and the sink is cut, then we have to buy the $i$-th machine. It is easy to, $ vertices. Each vertex represents the source, the sink, a project or a machine . We will note the source, _"You are given a set of $N$ projects and $M$ machines. The $i$-th machine costs $q_i$. The $i$-th

Full text and comments »

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

120.
By phpduke, 9 years ago, In English
Introduction to Competitive Machine Learning I realized a lot of people keep pursuing and learning Competitive Programming because they get addicted to Rankings & Ratings. In this blog i have tried to help you exploit your same existing mechanism and learn Machine Learning in the process while pursuing it a competitive way. _I have drawn examples from around 10 kaggle Competitions_ and illustrated what works and what doesn't , what is important and what is not and how much time usually it takes for each step while competing. I have also heavily linked through the blog post and it contains more than enough links for you to start competing on Kaggle or Analytics Vidhya seriously. [Link to original Blog Post on "Introduction to Competitive Machine Learning"](https://threads-iiith.quora.com/Introduction-to-Competitive-Machine-Learning) Also last event by Threads, Felicity'18 called ["Kings of Machine Learning"](http://simplernow.com/redirects/koml.php) is still live. There is Rs 15,000 cash prizes and 20 T-shirts up for th...
Introduction to Competitive Machine Learning, mechanism and learn Machine Learning in the process while pursuing it a competitive way., Also last event by Threads, Felicity'18 called ["Kings of Machine Learning "](http://simplernow.com

Full text and comments »

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

121.
By AkiLotus, history, 8 years ago, In English
Codeforces Round #538 (Div. 2) **TREMBLE BEFORE THE MIGHTY OMEGALULGRAPE** ![ ](https://i.imgur.com/kpS7NEq.png) Hello Codeforces! We are honored to invite you to Codeforces Round #538 (Div. 2), which will take place at [contest_time:1114]. The round will be rated for all Division 2 participants **(with rating less than 2100)**. Still, we warmly welcome Division 1 participants to join us out of competition. You will be given **6** problems to solve in **2 hours.** The round's problems were initially prepared by Duy-Bach ~Akikaze,2019-02-05 Le, Xuan-Tung ~neko_nyaa,2019-02-05 Nguyen and Xuan-Quang ~xuanquang1999,2019-02-05 D. Nguyen. **There will be an interactive problem in this round.** Learn more about interactive problems [here](https://codeforces.me/blog/entry/45307). This is our first attempt in making a Codeforces round, so suggestions are much welcome to help us improve ourselves. ;) We also want to thanks many friends for making this round possible: - Dmitry ~_kun_,2019-02-05 Sayutin...
**There will be an interactive problem in this round.** Learn more about interactive problems [here

Full text and comments »

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

122.
By Seyaua, 12 years ago, In English
Rockethon 2015 Announcement <a href="http://rocketfuel.com/"><img src="http://assets.codeforces.com/images/rockethon/HZ-LOGO-TAG-RGB-big.png" style="float:right;margin:0 2em 2em 2em;"/></a> Hello Codeforces community, I am happy to announce that [Rocket Fuel Inc.](http://rocketfuel.com/) will be hosting a Rockethon competition again! The contest is prepared by Rocket Fuel employees Eldar Bogdanov, Anton Lomonos, Lasha Lakirbaia, Alexander Ruff, Nikhil Goyal and me, Ievgen Soboliev. We hope everyone will find some interesting problems in the contest and everyone will have as much fun solving these problems as we had preparing them. Just like last year, the best participants will receive valuable prizes and top performers will get Rockethon 2015 T-shirts! Also, Rocket Fuel is interested in hiring people after this event, so please fill out the simple form during registration. About Rocket Fuel --------------------- Rocket Fuel is building technology platform to do automatic targeting and optimization of a...
It has been a nice opportunity to learn advanced concepts of software engineering from a huge

Full text and comments »

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

123.
By BledDest, history, 9 years ago, In English
Educational Codeforces Round 32 Hello Codeforces! On [November 09, 18:05 MSK](https://www.timeanddate.com/worldclock/fixedtime.html?day=9&month=11&year=2017&hour=18&min=5&sec=0&p1=166) Educational Codeforces Round 32 will start. Series of Educational Rounds continue being held as [Harbour.Space University](https://harbour.space/) initiative! You can read the details about the cooperation between [Harbour.Space University](https://harbour.space/) and Codeforces in the <a href="http://codeforces.me/blog/entry/51208">blog post</a>. The round will be **unrated** for all users and will be held on extented ACM ICPC rules. After the end of the contest you will have one day to hack any solution you want. You will have access to copy any solution and test it locally. You will be given **7 problems** and **2 hours** to solve them. The problems were prepared by Mikhail [user:PikMike,2017-11-08] Piklyaev and me. Good luck to all participants! UPD: [Editorial](http://codeforces.me/blog/entry/55701). I a...
not only focused on the coding aspect, but the machine learning, the data processing and the practices

Full text and comments »

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

124.
By vsb, 8 years ago, In English
Level 5 Engineer Story <img src="/predownloaded/ef/06/ef06711388a4a67082905886a52d4842593bed73.jpg" style="width:400px;float:right; margin: 0 1em 1em 1em;"/> I'm Viktor Barinov (vsb), and I'd like to share a little about my experience with coding competitions and working at Level 5, Lyft's self-driving division. I graduated from [Taurida National University](https://en.wikipedia.org/wiki/Tavrida_National_V.I._Vernadsky_University), and have been an avid competitor in programming contests since high school. My first introduction to ACM ICPC problems was at [Timus](http://acm.timus.ru) in 2003. I was intrigued by math and algorithmic problems with tricky edge cases. Then I became hooked, solving a few problems from the archive daily. I later discovered UVA Online and started participating in local Ukrainian competitions, trying to advance to all-Ukrainian Finals and ACM ICPC SEERC. I then started competing at TopCoder and Codeforces. After a long path of learning, coding, and debugging, I became red o...
#### Machine Learning

Full text and comments »

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

125.
By Dominater069, 2 years ago, In English
How to Solve Questions [Dominater Version] Recently, I got a request asking me to write down my thought process while solving questions. So, here is the promised blog. I would like to thank [user:Iceknight1093,2024-08-30], [user:qwexd,2024-08-30], [user:Sana,2024-08-30], [user:Everule,2024-08-30] and [user:NovusStellachan,2024-08-30] for proof reading and suggesting edits in the blog. Special thanks to [user:satyam343,2024-08-30] for discussing most of the blog with me. <h3> 1. Overview </h3> The blog contains my solutions to $7$ problems in a wide range of ratings, starting from $1200$ all the way upto $2700$. Each problem has a step-by-step solution and you can notice how there are no large jumps in logic, but everything comes naturally. I do not claim that this is always possible in each problem, however I solve majority of CF problems in such a manner. There are certainly other high rated people who will have completely different methods of solving. However, this is about what works for me. There are some meta ...

Full text and comments »

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

126.
By Vladithur, history, 3 years ago, In English
Codeforces Round #890 (Div. 2) #####Hi, Codeforces! [user:Alexdat2000,2023-08-03], [user:Igorfardoc,2023-08-03], and I are pleased to invite you to our [contest:1856], which will be held on [contest_time:1856]. **This round will be rated for participants with a rating lower than 2100.** We would like to thank: - [user:errorgorn,2023-08-03] for coordinating the round. - [user:Yuu,2023-08-03], [user:maomao90,2023-08-03], [user:thenymphsofdelphi,2023-08-03], [user:Dominater069,2023-08-03], [user:Mike4235,2023-08-03], [user:valeriu,2023-08-03], [user:irkstepanov,2023-08-03], [user:zengminghao,2023-08-03], [user:Gheal,2023-08-03], [user:DeMen100ns,2023-08-03], [user:FEDIKUS,2023-08-03], [user:thanhchauns2,2023-08-03], [user:MinaRagy06,2023-08-03], [user:Java,2023-08-03], [user:xudian,2023-08-03], [user:madlogic,2023-08-03], [user:squishybanana04,2023-08-03], [user:stefanbalaz2,2023-08-03], [user:kobebryan9,2023-08-03], [user:Murinh0,2023-08-03], [user:IlyinAD,2023-08-03], [user:Respectively,2023-08-03], [user:p...
_To learn more about Constructor Institute and its programs, visit our [webpage](https

Full text and comments »

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

127.
By Errichto, 7 years ago, In English
Randomized algorithms lecture, part 1 & 2 You can watch the lecture on Youtube: https://youtu.be/0r2D32esF3Y. I will do a second part soon. Some problems are quite vague, it's a nature of this topic. 1. Warm-up: You toss a coin till you get tails. How many tosses there will be, on average? 2. **X or smaller** &mdash; There is a hidden number $X$. An interactor repeatedly gives you a number, either $X$ or something smaller than $X$. All numbers are positive integers. When can you stop and say that you are (almost) certain what is the value of $X$? 3. **Line through N/4 points** &mdash; Given $N \leq 10^5$ points, find a line that passes through the maximum number of points. It's guaranteed that the answer is at least $N / 4$. 4. **GCD** ([problem:364D]) &mdash; given a set of $N \leq 10^6$ numbers, each up to $10^{12}$, find the maximum possible number that is a divisor of at least half of given numbers. 5. **ACTG prefix** &mdash; Guess a hidden string $S$ with characters A, C, T, G. You can choose some string and ask if...
And if you want to learn more about expected value: https://codeforces.me/blog/entry/62690

Full text and comments »

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

128.
By Um_nik, history, 4 years ago, In English
MIT Mystery Hunt Disclaimer: This blog is not about competitive programming; you probably will not learn anything about algorithms and data structures. In other words, it doesn't qualify for [this initiative](https://codeforces.me/blog/entry/110840), but I want to give a link to it anyways because I think it's cool. I love solving problems. No, seriously. I LOVE it. The mindset described in [this blog](https://codeforces.me/blog/entry/91114) is 100% how I feel. But it is not constrained to competitive programming problems. I loved math problems for a much longer time, and physics was somewhere there. But I also love solving puzzles. And playing puzzle games on the computer (well, on consoles). And participating in intellectual games. I am not as good in them as in cp, but it was never about being good for me, I just love the process. And I think that there might be some people with a similar love for puzzles among competitive programmers, this is why I decided to write this blog on CF <s>and no...
Disclaimer: This blog is not about competitive programming; you probably will notlearn anything

Full text and comments »

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

129.
By Errichto, 6 years ago, In English
Community IOI Weekly Classes (on Codechef?) Let's discuss the idea of IOI preparation in form of weekly contests and classes. Many programming camps reuse problems from old national camps and contests. What about doing this on a bigger scale and conducting weekly mashup contests open for everybody for free? The problem analysis would be in English, in written or (live) video format, possibly combined with a lecture. Make a discord server for further discussion and questions, encourage students to upsolve, maintain yearly leaderboard and upsolving leaderboard. Once or twice a year, call it a 1-week online camp and organize these mashup contests daily. I can take part in this initiative but I want to be just one of many teachers. When it's my turn, I would pick some old interesting POI or ONTAK problems because I either know them or can look up the solution in Polish. If I do this once per 1-2 months, I won't run out of good problems anytime soon, and I have enough time to prepare analysis and lecture, and later spend severa...
they still have something to do and learn. Still, maybe once a month the contest should be just much

Full text and comments »

Tags ioi
  • Vote: I like it
  • +466
  • Vote: I do not like it

130.
By PersistentLife, history, 5 weeks ago, In English
As an CNOI Gold Medalist: How I Train CNOI Gold Medal Winning Competitive Programmers UPD: [Curated Problem Set #1](Thhttps://codeforces.me/blog/entry/156427) is released. Please join our Discord server to receive the latest updates: https://discord.gg/DsHSfmVgG UPD: Curated problem set #1 (both normal and advanced) **for subscribers** is ready! Feel free to join our Discord server and subscribe! This post is about: 1. The Main Two Abilities You Need in Competitive Programming 2. How to Choose Problems of an Appropriate Difficulty 3. How Should You Work on a Problem 4. When You Should Learn New Knowledge (Like New Algorithms) 5. How to Train Before an Important Contest 6. Free Content, Personalized Subscription Services, and Potential Opportunity for One-to-One Coaching 7. Survey About the Services I won a gold medal at NOI 2024 in my second year of high school and was admitted to the Turing Class at Peking University. After securing my admission, I continued pursuing competitive programming: I began studying new material at university in advance whi...
subscribed problems and learning materials, such as requesting a small hint, explaining a solution, ## 4. When You Should Learn New Knowledge (Like New Algorithms), learning a topic, you already have a natural problem in front of you, which helps you understand and apply

Full text and comments »

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

131.
By ZhouShang2003, 2 years ago, In English
Pinely Round 4 (Div. 1 + Div. 2) <img src="/predownloaded/25/f9/25f953f1e0d453d352b1a0bde08014923fce0577.png" align="right" style="height: 200px;" alt="header"/> Hello, Codeforces! We are pleased to invite you to [contest:1991], which will start on [contest_time:1991]. The round will be rated for **everyone**. You will be given **9 problems** and **3 hours** to solve them. There is at least one interactive problem, so please read the [guide for interactive problems](https://codeforces.me/blog/entry/45307) if you are unfamiliar with it. The problems were authored and prepared by me. We would like to thank: - [user:errorgorn,2024-7-24] for the excellent coordination. - [user:dXqwq,2024-7-24], [user:StarSilk,2024-7-24], [user:jiangbowen_,2024-7-24], [user:Endagorion,2024-7-24], [user:JCY_,2024-7-24], [user:jiangbowen,2024-7-24], [user:QwertyPi,2024-7-24], [user:chen_zexing,2024-7-24], [user:YocyCraft,2024-7-24], [user:zeliboba,2024-7-24], [user:HackerMonk,2024-7-24], [user:axs7384,2024-7-24], [user:Vlad...
Learn more about us on our [website](http://pinely.com) or find [our employees on CF](https

Full text and comments »

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

132.
By ToxicPie9, 6 months ago, In English
April Fools Day Contest 2026 Editorial Thanks for participating! ### [2214A &mdash; Odd One Out](https://codeforces.me/contest/2214/problem/A) Idea: [user:flamestorm,2026-04-01] <spoiler summary="Solution"> You just need to output the arrow that only appears once. That arrow is **C2**. </spoiler> <spoiler summary="Code (Python)"> ~~~~~ print("C2") ~~~~~ </spoiler> <spoiler summary="Feedback"> - I liked it! </spoiler> ### [2214B &mdash; Are You Smiling?](https://codeforces.me/contest/2214/problem/B) Idea: [user:prvocislo,2026-04-01] <spoiler summary="Solution"> One unusual thing about the statement is the presence of a emoji. More precisely, a smiling, emoji. Okay, let's try to print a smiling emoji. However, the output should be a string of characters and numbers, so we cannot do it directly. There's one more suspicious thing in the statement &mdash; the $U+?=HAPPY$ equation. If we should print ?, what is the meaning of U? U+ often indicates that an unicod...

Full text and comments »

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

133.
By Geothermal, history, 3 years ago, In English
A Highly Experimental Training Plan for Beginners Very loosely inspired by some comments on [Thoughts on Reaching Cyan?](https://codeforces.me/blog/entry/101561) and [my recent AMA](https://codeforces.me/blog/entry/118845). Until now, I've avoided telling beginners to practice math before working on competitive programing problems because I haven't figured out a helpful way of doing so. This post is my attempt at telling grays to train math first in a way that might lead to improvement without an absurd time commitment. ## Introduction This section is largely motivation for why I'm proposing this training plan. If you just want to see the instructions for the training plan I'm proposing, you can skip this part. The first subsection in particular is not especially relevant to the rest of the post, but I wanted to have some documentation explaining why I still think the traditional "just solve problems" advice is good. ### The Conventional Advice on Improvement I'm frequently asked for advice on how to improve at co...
people to focus on solving problems and learning from the ones they can't do, and I think this is the

Full text and comments »

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

134.
By Yandex, history, 12 months ago, In English
Yandex Cup 2025! Hello Codeforces!
 ------------ We are pleased to announce the start of the Yandex Cup 2025 Championship! ![ ](/predownloaded/64/9f/649f08211f39f970e9f2a3fb71c5e413d7302261.png) This year, we still have 6 tracks and a prize fund of 12 million rubles: - [Algorithm](https://yandex.com/cup/algorithm/)❤️ - [Machine Learning](https://yandex.com/cup/ml/) - [Backend](https://yandex.com/cup/backend/) - [Analytics](https://yandex.com/cup/analytics/) - [Frontend](https://yandex.com/cup/frontend/) - [Mobile development](https://yandex.com/cup/mobile/) <center style="margin: 2em;"> <a href="https://yandex.ru/cup/?utm_source=partners&utm_medium=social&utm_campaign=yandex-cup25&utm_term=CodeForces" style="text-decoration: none;font-size: 18.0px;background-color: rgb(255, 232, 28);color: rgb(0, 0, 0);font-weight: bold;padding: 0.5em 1.0em;">REGISTER</a> </center> Let's talk in more detail about two directions: **Algorithm** ❤️ An important change this year: we ask a...
**Machine Learning**, - the top 20 participants in the Algorithm, Backend, Analytics and Machine Learning directions, The new format of the Machine Learning track:

Full text and comments »

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

135.
By plagues, history, 3 months ago, In English
I finally became IGM — please don't spend years hating yourself for failures Hello everyone! A couple of days ago I finally reached IGM, and you cannot even imagine how happy I am. I want to tell you a bit about my journey. In 8th grade I got my first prize diploma at ROI. That was a pretty cool achievement, but I always wanted to be better. I had three whole years ahead of me to become a winner, yet I never managed to do it. My competitive programming career has been full of disappointments. The only year when I truly believed in myself was 8th grade. I was top 2 at IATI Junior by a huge margin, got my first VKOSHP diploma, became a ROI prizewinner, and overall progressed very fast. For example, that was when I reached 2100 on Codeforces for the first time. As you can see, it took me another 5 years just to finally become a grandmaster. In 9th grade, my team and I got top 5 at VKOSHP. For me it was a huge tilt, because it was the first “not gold” result after I had been dreaming about gold for so long. In 10th grade I was supposed to particip...
I visited countless doctors, but only much later did I learn that this was just my nervous system

Full text and comments »

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

136.
By neal, 6 years ago, In English
Problems with clock timing on Codeforces After making several submissions earlier today to [problem:1463F] that all involved calling `clock()`, I think I've found some major inconsistencies in clock timing on Codeforces. I had a solution that was correct but borderline on runtime because it needs to generate enough data to extrapolate from (via Berlekamp-Massey). So I made it iterate until 3.8 seconds, and looking through the submission list, it appears I wasn't the only one with this type of idea. Unfortunately I got WA on several submissions: [submission:101579005] [submission:101581695] [submission:101583625]. The strange thing was that each test case that resulted in WA didn't actually run for the full 3.8s, but only about half of that. When I took the same code and ran it in [custom invocation](https://codeforces.me/problemset/customtest) with the same input, it used the full 3.8 seconds and got the right answer each time. So what's going on here? To try to figure this out, I set up a simpler version of some timed...

Full text and comments »

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

137.
By awoo, history, 6 years ago, translation, In English
Educational Codeforces Round 88 [Rated for Div. 2] Hello Codeforces! On [contest_time:1359] [contest:1359] will start. Series of Educational Rounds continue being held as [Harbour.Space University](https://harbour.space/) initiative! You can read the details about the cooperation between [Harbour.Space University](https://harbour.space/) and Codeforces in the <a href="http://codeforces.me/blog/entry/51208">blog post</a>. This round will be **rated for the participants with rating lower than 2100**. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally. You will be given **6 or 7 problems** and **2 hours** to solve them. The problems were invented and prepared by Roman [user:Roms,2020-05-27] Glazov, Adilbek [user:adedalic,2020-05-27] Dalabaev, Vladimir [user:vovuh,2020-05-27] Petrov, Ivan [us...
valuable content and insiders’ knowledge that you don’t get to learn about in traditional

Full text and comments »

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

138.
By I_love_Hoang_Yen, 11 years ago, In English
The 'science' of training in competitive programming So few minutes ago [I answered this question on Quora](https://www.quora.com/What-is-the-best-strategy-to-improve-my-skills-in-Competitive-programming-in-2-3-months/answer/Thanh-Trung-Nguyen). It felt like a good answer (because it has pictures), so I would like to share it again here. **If you don't see the images, just click the Quora link above** Many people tell you that solving lots of problems and you will become red on Topcoder/Codeforces one day. It is true, and is the only universally approved way in competitive programming community, but actually it is just half of the story. Let me first explain to you the 'science' of problem solving (which is not very scientific, since it was only developed by myself). For each problem, in order to solve it, you must jump over a gap. It can be either a difficult implementation, or some hard-to-see observation, or difficult algorithm, etc. <a href="http://tinypic.com?ref=353d2df" target="_blank"><img src="http://i58.tinypic.com/...
- Some guys learn very fast, got to div 1 only after like a couple of weeks after he just started

Full text and comments »

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

139.
By vntshh, 8 years ago, In English
Divide by Zero 2018 and Codeforces Round #474 (Div. 1 + Div. 2, combined) Hi Codeforces! [Programming Club, IIT Indore](https://pclubiiti.github.io/) and [Euristica 2018](https://euristica.in/) are proud to present our flagship event, **Divide By Zero!** The contest will take place on [Saturday, 7th April at 9:35PM IST](https://www.timeanddate.com/worldclock/fixedtime.html?day=7&month=4&year=2018&hour=19&min=5&sec=0&p1=166). ![ ](https://i.imgur.com/hW6OEd4.jpg) **Prizes :** Codeforces T-shirts for top 15 participants overall and top 15 participants in India. Thanks to the following people for making the round possible : - [user:apoorv_kulsh,2018-04-06], [user:arnabsamanta,2018-04-06], [user:AakashHanda,2018-04-06], [user:vicennial,2018-04-06], [user:kr_abhinav,2018-04-06], [user:decrypt.cp,2018-04-06], [user:rohitranjan017,2018-04-06] and myself for setting the problems. - [user:usaxena95,2018-04-06] and [user:killer_bee,2018-04-06] for their help with the problems. - [user:300iq,2018-04-07] and [user:demon1999,2018-04-07] for testin...
Competitive Programming, Application Development, Cyber Security and Machine Learning. For more information

Full text and comments »

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

140.
By Nickolas, 6 years ago, In English
Announcement: Microsoft Q# Coding Contest – Summer 2020 Microsoft's Quantum team is excited to announce the Q# Coding Contest – Summer 2020, the third in the series of Q# contests! In this contest you can put your quantum programming skills to the test, solving quantum computing tasks in Q#. The winners (as well as some lucky participants) will receive a Microsoft Quantum T-shirt! Quantum computing is a radically different computing paradigm compared to classical computing. Indeed, it is so different that some tasks that are believed to be classically intractable (such as factoring integers or simulating physical systems) can be performed efficiently on a quantum computer. In December 2017 Microsoft introduced the [Quantum Development Kit](https://docs.microsoft.com/quantum) which includes the Q# programming language. In summer of 2018 we hosted the [first quantum programming contest](https://codeforces.me/blog/entry/60209), which included problems on introductory topics in quantum computing: superposition, measurement, quantum oracl...
and programming exercises that help you learn quantum computing and Q# (includes most of the

Full text and comments »

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

141.
By bashkort, history, 2 years ago, translation, In English
Codeforces Month of Blog Posts Pt. II (Win $800+!) **TL;DR:** Post an interesting Codeforces blog until October 15th and win $800+1. **UPD:** We decided to shift the deadline to 15th of November! _This blog is inspired by [user:peltorator,2024-09-10]'s [Codeforces Month of Blog Posts](https://codeforces.me/blog/entry/110840)._ Hi everyone! The last time, this initiative was a gem for me! I've enjoyed every bit of it and the [winner](https://codeforces.me/blog/entry/113041) in particular &mdash; it helped me when I needed it the most. So now I willing to pay back (or forward :D) &mdash; by organizing the Codeforces Month of Blog Posts one more time! #### Intro My view is the same as [peltorator's one](https://codeforces.me/blog/entry/110840) &mdash; I am a huge Codeforces fan, it almost replaces me social media, and the blogs section is one of the best parts of it! Many people may be waiting for the best time to publish their blogs &mdash; now the time has come! #### Rules & Deadlines The rules are simple: *...
people can learn about it and participate. So the general deadline is 15th of October.

Full text and comments »

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

142.
By zxqfl, history, 10 years ago, In English
Canada Cup <div style="float:right;margin:0 1em 1em 1em;"><a href="https://diagram.ca/"><img src="http://codeforces.me/predownloaded/60/1a/601ad2651390b1ff2232c003a354c60ac059d570.png"/></a></div> Hi Codeforces, I'm excited to announce the Canada Cup, the first Codeforces contest to be sponsored by <a href="https://diagram.ca/">Diagram</a>! This is a rated Codeforces round (with T-shirts!) for both divisions which will take place on <a href="http://www.timeanddate.com/worldclock/fixedtime.html?day=22&month=10&year=2016&hour=18&min=0&sec=0&p1=166">October 22 at 11:00am EDT</a>. <b>Although the contest is organized in Canada, all competitors worldwide will be able to compete and win prizes.</b> The problems for this round were written me ([user:zxqfl,2016-10-15]) and the Codeforces team. I'd like to thank: - My coauthors for contributing great problems to the round - [user:GlebsHP,2016-10-15] for his help in preparation - [user:MikeMirzayanov,2016-10-15] for creating Codeforce...
at their highest potential. Dialogue is using machine learning, natural language processing, and AI

Full text and comments »

Announcement of Canada Cup 2016
  • Vote: I like it
  • +313
  • Vote: I do not like it

143.
By maroonrk, history, 7 years ago, In English
Hello maroonrk announcement Hello, Codeforces! I have news today: I joined the AtCoder team and started working as an admin. It does not mean I take [user:rng_58,2020-03-07]'s place right now. I'm just a beginner as an admin, so, for the time being, we will hold contests together, and I will learn how to do it. For this year, I don't stop participating in all AtCoder contests(especially AGCs) and aim to get a ticket for the WTF2021. I will mainly supervise ARC-level contest (and Japanese local contests). From next year, I'll start checking submitted problems from all writers and organize contests as main admin. Tomorrow's ARC-level contest is the first contest coordinated by me (with the help of [user:rng_58,2020-03-07]). I'm looking forward to your participation!
being, we will hold contests together, and I will learn how to do it.

Full text and comments »

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

144.
By Timosh, 8 days ago, In English
Personal thoughts on learning and improvement _Recently, some people have asked for advice, so I decided to write a blog._ In this blog, I will talk about my approach to problem-solving, what I think about solving problems, how do I learn techniques, data structures and/or algorithms and others. ### Solving is guessing From my interpretation, solving any problem is just some sort of guessing: making an educated guess of the solution, validating, and repeating until solved. You can speed up the "guessing procedure" by simplifiying the problem to a certain degree by, for example, not considering obviously wrong solutions. ### Abstraction and Decomposition Usually, as soon as I finish reading a problem, I try to simplify it as much as possible. For example, sorting arrays, removing elements, handling simple cases, doing greedy decisions whenever can be done, rearranging formulas to more familiar ones, or decomposing the problems into several independent problems. You might even have to solve a harder problem, just becaus...
Personal thoughts on learning and improvement, , how do I learn techniques, data structures and/or algorithms and others., P.S. I would like you to share the way you approach problem-solving and/or how youlearn new, learning new concepts. It makes it a lot easier to understand some seemingly advanced data structures

Full text and comments »

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

145.
By Fefer_Ivan, 12 years ago, translation, In English
Andrew Stankevich Contests — 46 contests later Good evening, Codeforces. Some time ago I added the last 46th Andrew Stankevich Contest to the Gym. Now all of them are added. Here is a complete [list](/group/j9VlExDLmA/blog/entry/64) and the [group](/group/j9VlExDLmA/contests) with all the contests. Now I want to tell what was done during the process of adding all the contests to the gym. &nbsp;[cut]&nbsp; - In some problems tests and checkers (the program to check if the participant's answer is correct if it is ambigious) are fixed. Errors were found not only by me, but by the members of Codeforces community as well. - In most of the archive tests were generated from scratch. I tried to use the sam compiler versions because some test generator program used built-in pseudorandom number generator and they can produce different numbers in different compilers. - In old contests time limits were adapted to fit on modern computers. For more precise time limit tuning I used not only jury's solutions from the contest arch...

Full text and comments »

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

146.
By SuperJ6, 3 years ago, In English
How to Effectively Practice CP + Problem Solving Guide This is a slight tweak of [a practice guide](https://www.reddit.com/r/usaco/comments/pk3tjp/the_ultimate_usaco_practice_method/) I wrote a while ago on USACO reddit since I thought it could be helpful to people here. Some USACO specific sections or extra clutter I left out here that aren't needed for a general audience. This should cover all general cp advice I have so I never have to retype. #Introduction This is a post on how I believe is the best method to practice modern day competitive programming based on my experiences. I assume you already have some knowledge and know simple things like binary search and dfs/bfs, but **read the footnote if you are complete beginner** (never code, solved <50 problems, div2 A/B too difficult, grey or stuck low pupil). First, a quick tl;dr of the practice strategy before a bunch of specifics and explanation: >**In short, mostly you only need to use codeforces (no matter what contest you're training for), find a rating range where you c...
# When to Learn Algorithms/Data structures

Full text and comments »

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

147.
By awoo, history, 5 years ago, translation, In English
Educational Codeforces Round 107 [Rated for Div. 2] Hello Codeforces! On [contest_time:1511] [contest:1511] will start. Series of Educational Rounds continue being held as [Harbour.Space University](https://harbour.space/) initiative! You can read the details about the cooperation between [Harbour.Space University](https://harbour.space/) and Codeforces in the <a href="http://codeforces.me/blog/entry/51208">blog post</a>. This round will be **rated for the participants with rating lower than 2100**. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally. You will be given **6 or 7 problems** and **2 hours** to solve them. The problems were invented and prepared by Roman [user:Roms,2021-04-11] Glazov, Adilbek [user:adedalic,2021-04-11] Dalabaev, Vladimir [user:vovuh,2021-04-11] Petrov, Ivan [us...
_In return, we demand dedication to learning and improving yourselves:_

Full text and comments »

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

148.
By defnotmee, 2 years ago, In English
Catching the Mole (Psychotic_D cheating accusation) Hello codeforces! You guys must have seen the recent blog accusing international master [user:Psychotic_D,2024-07-23] of cheating in the most recent div2 round: [Codeforces Round 960 (Div. 2)](https://codeforces.me/contest/1990). This is due to the fact that the author, [user:wuhudsm,2024-07-23] is [user:Psychotic_D,2024-07-23]'s friend and that [user:Psychotic_D,2024-07-23] had a ridiculous performance, winning the amongst official participants. ![ ](https://i.imgur.com/tLslIlv.png) They are both big members of [TheForces](https://theforces.netlify.app/), raising suspicions of whether there was some collusions between the two. At first i thought it was nonsense since the evidence was lacking, but after a bit of my own investigation I've compiled the most interesting pieces of evidence of why i believe [user:Psychotic_D,2024-07-23] (along with some accomplices from TheForces) is in fact a cheater. Case #1: Introduction ------------------ I first learned about the sub...

Full text and comments »

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

149.
By ko_osaga, history, 2 years ago, In English
My Korean Blog [user:bobr_babizon,2024-06-15] posted an [article](https://codeforces.me/blog/entry/130415), a machine translation of a Kinetic Segment Tree post in my Korean blog. Given this interest in my small Korean blog, I felt obliged to introduce it. In most of my undergrad period, I was sponsored by the generous [Samsung Software Membership](https://infossm.github.io/about/), where one of their remarkable features was to fund "individual research projects" &mdash; In short, each month, I write an article on interesting stuff, and they will pay me 500,000 KRW per article. Amazing, as it motivates me to learn new stuff and also get paid. Here is [the full list of posts](https://koosaga.com/249) written by that initiative. Not all posts are good. Sometimes, I need to keep up with the deadline and rush the post; sometimes, I write stuff in specific interest; sometimes, the topic is too hard and I only obtain a superficial understanding. But there are some posts, which I think are the ...
machine translation of a Kinetic Segment Tree post in my Korean blog. Given this interest in my small

Full text and comments »

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

150.
By Qingyu, 10 months ago, In English
The 2025 Universal Cup Online Challenge is Happening Soon! <center> <img src="/predownloaded/43/f6/43f69acd4c854a20d5f7064fe6252b346f9f5d5a.png" style="height:262.0px;max-width: 100.0%;max-height: 100.0%; "> </center> **UPD: The [contest platform](https://challenge.ucup.ac/) is up! Everyone can now register through the platform!!!!** **UPD: The champion will be invited as a guest (with full accommodation and travel expense covered) to the 2026 Universal Cup Finals. The champion will be awarded at the time and will be invited to participate in the onsite challenge.** Hello Codeforces! We are very happy to announce that, after months of preparation, we have finally scheduled our first online challenge from December 17th to December 24th! Sponsored by Huawei, we have prepared valuable prizes for everyone to compete for! Although many details are still to be finalized, we are too excited to share the following details with you as an early Christmas gift! - Contest Name (Subject to Change): The 2025 Universal Cup Online Challenge...
To learn more about Universal Cup, please visit our [official website](https://ucup.ac/). The 4th

Full text and comments »

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

151.
By Yandex, history, 2 years ago, translation, In English
Yandex Cup 2024! Hello Codeforces!
 ------------ We are delighted to invite you to participate in Yandex Cup 2024!
Yandex Cup is a championship in six different tracks: - [Algorithm](https://yandex.com/cup/algorithm/)❤️ - [Backend](https://yandex.com/cup/backend/) - [Analytics](https://yandex.com/cup/analytics/) - [Mobile development](https://yandex.com/cup/mobile/) (iOS and Android tracks) - [Frontend](https://yandex.com/cup/frontend/) - [Machine Learning](https://yandex.com/cup/ml/) (Self-Driving Cars and Music information retrieval tracks) This year, as a pilot project, we are inviting schoolchildren (so far only from Russia) to participate in the Algorithm and Analytics tracks.
 The championship consists of three stages. Schedule ------------ ![ ](/predownloaded/a5/70/a5707a42aef27d51bac8aa8db343a83d4b10576a.jpg) The stages and dates are different for Machine Learning and Mobile Development. More details about the terms and conditions can be found on the track's pages. ...
The stages and dates are different for Machine Learning and Mobile Development. More details about

Full text and comments »

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

152.
By dhirajfx3, history, 8 years ago, In English
Manthan, Codefest'18, IIT (BHU) Announcement Hello Codeforces, Manthan, Codefest'18 will take place on [contest_time:1037] with a duration of 2 hours (tentative). The round is rated for both Div1 and Div2 participants and will consist of 8 problems. The Department of Computer Science and Engineering, IIT (BHU) is conducting Codefest from 31st August-2nd September. Manthan (मंथन in Hindi, meaning Brainstorming), the algorithmic programming contest under the banner of Codefest, is being held as a special Codeforces round. The round follows regular Codeforces rules. The round has been prepared by [user:hitman623,2018-09-01], [user:karansiwach360,2018-09-01], [user:GT_18,2018-09-01], [user:ezio07,2018-09-01], [user:Enigma27,2018-09-01], [user:csgocsgo,2018-09-01] and me ([user:dhirajfx3,2018-09-01]). Special thanks to [user:praran26,2018-09-01] and [user:dark_n8,2018-09-01] for their contribution in the preparation of the round. We express our heartiest thanks to [user:KAN,2018-09-01], [user:gritukan,2018-09-01], [user:30...
events covering domains from Math, Machine Learning, Natural Language Processing and Capture The Flag

Full text and comments »

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

153.
By chromate00, 20 months ago, In English
Codeforces Round 1000 (Div. 2) — Anti-LLM Evaluation Report As the main problemsetter of [contest:2063], I know that a lot of you were somewhat disappointed to see that it was not a Div.1 contest. Though I am not the one who caused a lack of Div.1 contests, I understand your feeling. So I present to you the great surprise: The **Anti-LLM Evaluation Report** for [contest:2063], the first of its kind on a Div.2! In this blog we discuss about how the round combats against LLMs (especially focusing on OpenAI o1, the greatest of its kind while we prepared and tested the problemset), by looking at the timeline of how the problemset changed. --- So, let us begin with the initial problemset we had when the testing began. (The task names are anonymized, unless they are released to the public before or in the round) In the beginning, we had a problemset that looks like this: - **A' &mdash; B &mdash; C0 &mdash; D' &mdash; E' &mdash; F0** (If you are confused with the meanings, (letter)' means it was not used in the final problemset but exis...
%20deserve.) I hope you learn from negative delta, and become honest and diligent again. I hope you are

Full text and comments »

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

154.
By Um_nik, history, 7 years ago, In English
More videos? I'm thinking about doing more videos, not only screencasts of rounds. For some time now I'm using [OI Checklist](https://oichecklist.pythonanywhere.com/) by [user:Rezwan.Arefin01,2019-12-15] (cannot recommend enough, especially if you are preparing for hard IOI-style contests) as an archive, so I'm thinking about doing videos with editorials (more like my thinking process) for some old POI problems. So, here are some questions for you: 1. Is this interesting? 2. Should I read (and think about) problems beforehand? Pros: I will have more structured thoughts about problem, I will know for sure if I will be able to solve this problem in a short time, ??? Cons: It is kinda unfair, it may look like I'm crushing it when in reality it could take hours for me to solve, ??? 3. Should I do one-problem length videos? The problem is that I prefer to open some (3-6) problems, read all of them, and then think about each problem for some time, probably starting with the one I liked more. ...
willing to invest some time to learn basic video editing (yeah, didn't do anything before, just recording

Full text and comments »

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

155.
By osmanorhan, history, 5 years ago, In English
Quora Programming Challenge 2022 Hey all, We are excited to invite everyone to the *Quora Programming Challenge 2022*, a free programming competition open to participants from around the world*! The competition will take place on February 5, 2022 from 14:00 to 18:00 (UTC + 00:00). We had a successful challenge [last year](https://codeforces.me/blog/entry/86539) with great participation and positive feedback for the problems, so we’re excited to do it again this year! Quora (https://www.quora.com/) is a platform to ask questions, get useful answers, and share what you know with the world. In this contest, we include some problems inspired by real-world challenges that Quora engineers faced building and growing the product. In addition to competitive programming-style questions, there will also be some machine learning problems. We hope that this contest will be fun for everyone! You will be given several algorithm problems and a few machine learning problems. 1. Algorithm problems: These are competitive pr...
algorithmic solutions. It is possible to achieve a full score on these problems. 2.Machine Learning, You will be given several algorithm problems and a few machine learning problems.

Full text and comments »

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

156.
By EvenImage, history, 4 years ago, In English
What is your opinion about copying problems from math contests? There are some examples that there are similar problems in math contests (I can't distinguish if it's deliberately copied from math contests or just a coincidence). - [317E Princess and Her Shadow](https://codeforces.me/contest/317/problem/E), which is almost the same as a problem from Canadian National Olympiad [link] (https://artofproblemsolving.com/community/c6h477299p2672506) - [618F Double Knapsack](https://codeforces.me/contest/618/problem/F), see the discussion [here](https://codeforces.me/blog/entry/23142?#comment-275495) - [1684H Hard Cut](https://codeforces.me/contest/1684/problem/H), see the discussion [here](https://codeforces.me/blog/entry/102961#comment-913544) - [K in Yuhao Du Contest 5](http://qoj.ac/problem/2213). Yes, I admit the idea is from a problem in All-Russian MO [link](https://artofproblemsolving.com/community/c6h1634980p10278677) Sometimes authors just learn the idea from MO problems. But sometimes, the problem is just identical (like 1684...
Sometimes authors just learn the idea from MO problems. But sometimes, the problem is just

Full text and comments »

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

157.
By lnishan, 11 years ago, In English
An awesome list for competitive programming! This is a project I started from late January 2016. My motive is that: Although there's fantastic information out there, I think they're still spread all over the place. Therefore, in my opinion it would probably be cool if there's an [awesome list](https://github.com/sindresorhus/awesome) for competitive programming! ( *It's now featured on the main list!* ) I'm actively updating the list here: [https://github.com/lnishan/awesome-competitive-programming](https://github.com/lnishan/awesome-competitive-programming) # Awesome Competitive Programming [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) A curated list of awesome `Competitive Programming`, `Algorithm` and `Data Structure` resources. Created with a view to connecting people to information, this list below contains a complete collection of all the fantastic resources I've collected over the course of my 11...
## Syllabuses > Find out what topics you need to learn.

Full text and comments »

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

158.
By awoo, history, 8 years ago, translation, In English
Educational Codeforces Round 50 [Rated for Div. 2] On [contest_time:1036] Educational Codeforces Round 50 will start. Series of Educational Rounds continue being held as [Harbour.Space University](https://harbour.space/) initiative! You can read the details about the cooperation between [Harbour.Space University](https://harbour.space/) and Codeforces in the <a href="http://codeforces.me/blog/entry/51208">blog post</a>. This round will be **rated for the participants with rating lower than 2100**. It will be held on extented ACM ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally. You will be given **7 problems** and **2 hours** to solve them. The problems were invented and prepared by Vladimir [user:Vovuh,2018-09-06] Petrov, Roman [user:Ajosteen,2018-09-06] Glazov, Ivan [user:BledDest,2018-09-06] Androsov, Maxim [user...
, computer vision, and machine learning - Experience working with robot parts and components

Full text and comments »

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

159.
By shashwatchan, 6 years ago, In English
Codeforces Round #682 (Div. 2) Good Evening Codeforces! ^_^ This round is unrated; please read [this](https://codeforces.me/blog/entry/84595) to know why. I invite you to participate in [Codeforces Round #682 (Div.2)](https://codeforces.me/contests/1438) taking place on [contest_time:1438]. The round, authored by [user:Anti-Light,2020-11-11] and me, is rated for users rated less than 2100, while other users can participate non-competitively. The round features six problems, and you have 2 hours to solve them. There may, or may not, be an interactive problem; regardless, you should [know](https://codeforces.me/blog/entry/45307) how to deal with them. I would, now, like to thank– - [user:antontrygubO_o,2020-07-31] for coordination. - [user:AwakeAnay,2020-07-31] and [user:AsleepAdhyyan,2020-07-31] for helping me solve one of the problems. - [user:BRCode,2020-08-03] for making [3b1b-style](https://youtube.com/channel/UCSQmpb_K_I37JN-QLArZbFw) video editorials of the problems! - [user:knightron00,...
). If you're interested in participating in other technical events, such as Machine Learning and

Full text and comments »

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

160.
By Errichto, 7 years ago, In English
Bitwise operations for beginners You can watch my Youtube video ([link](https://www.youtube.com/watch?v=xXKL9YBWgCY&list=PLl0KD3g-oDOHpWRyyGBUJ9jmul0lUOD80)) with the same content as this blog. Anyway, enjoy. ### Introduction Let's learn bitwise operations that are useful in Competitive Programming. Prerequisite is knowing the binary system. For example, the following must be clear for you already. $$13 = 1 \cdot 8 + 1 \cdot 4 + 0 \cdot 2 + 1 \cdot 1 = 1101_{(2)} = 00001101_{(2)}$$ Keep in mind that we can pad a number with leading zeros to get the length equal to the size of our type size. For example, `char` has $8$ bits and `int` has $32$. ### Bitwise AND, OR, XOR You likely already know basic logical operations like AND and OR. Using `if(condition1 && condition2)` checks if both conditions are true, while OR (`c1 || c2`) requires at least one condition to be true. Same can be done bit-per-bit with whole numbers, and it's called bitwise operations. You must know bitwise AND, OR and XOR, typed r...
Let's learn bitwise operations that are useful in Competitive Programming. Prerequisite is knowing

Full text and comments »

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

161.
By mariza_CY, history, 9 months ago, In English
Reaching gold: Everything I learned from the 2025 Olympiads Hi, Codeforces! 2025 is almost over, so I decided to post some things I learned from this year's olympiads. It's been a crazy year for me — I participated in 6 olympiads and even managed to get a gold medal in JBOI and EGOI. There was so much I learned, so I decided to post the 6 most important lessons. Also, I definitely still have a lot to learn so please share your own stories and lessons learned in the comments! ## Lesson 1: It's okay if you're unmotivated How can you stay consistent when you’re not motivated? Well, the answer is actually... don’t. I spent way too much time during the school year trying to practice and stay as consistent as the previous years even though I didn't really feel like it. Being unmotivated doesn't mean you don't enjoy CP as much — maybe you're just tired, stressed, or disappointed by your performance in a contest (which is not necessarily wrong!). Practicing should never be something you do just because you have to. Nothing will ruin y...
Also, I definitely still have a lot to learn so please share your own stories and lessons learned

Full text and comments »

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

162.
By BledDest, history, 3 years ago, translation, In English
Educational Codeforces Round 152 [Rated for Div. 2] Hello Codeforces! On [contest_time:1849] [contest:1849] will start. Series of Educational Rounds continue being held as [Harbour.Space University](https://harbour.space/) initiative! You can read the details about the cooperation between [Harbour.Space University](https://harbour.space/) and Codeforces in the <a href="http://codeforces.me/blog/entry/51208">blog post</a>. This round will be **rated for the participants with rating lower than 2100**. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest, you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally. You will be given **6 or 7 problems** and **2 hours to solve them**. The problems were invented and prepared by Adilbek [user:adedalic,2023-07-26] Dalabaev, Mikhail [user:awoo,2023-07-26] Piklyaev, Maksim [user:Neon,2023-07-26] Mescheryakov and ...
_Immerse yourself in the professional world during your apprenticeship. You’ll learn from the best

Full text and comments »

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

163.
By -is-this-fft-, 6 years ago, In English
[Feature request] Some suggestions for blogs I wanted to suggest some improvements for the blog system. Some of these things have probably been said before. Some of these things should be pretty easy to implement, others are harder and might require a complete rework. I tried to put the easy things first. [cut] $~$ #### Let's do something about necroposting This is probably my biggest pet peeve about Codeforces blogs. Most of the time, Recent Actions is filled with very old blogs, some of which have been brought up for pretty much no reason at all. Currently, we have [useful C++ "library](https://codeforces.me/blog/entry/8387) from 2013 in Recent Actions, where the recent comment answers an old question which has already been answered better. Similarly, there is [How to add friends?](https://codeforces.me/blog/entry/2006) which was brought up to make some joke that has already been done. The thing is though, a lot of the time these blogs are not brought up by trolls or anything like that. They are brought up by hel...
two solutions. - "I have TLE" — the solution is to learn what the words "time complexity" mean.

Full text and comments »

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

164.
By galen_colin, 2 years ago, In English
THE OPTIMAL PRACTICE STRATEGY (**NOT CLICKBAIT**) Spoiler: it's clickbait. Sorry. Titles like those are fun. ...but, it's the same style of clickbait as my [roadmap](https://www.youtube.com/watch?v=bSdp2WeyuJY) [spoiler 2: if you haven't seen that, it markets itself as a standard roadmap (y'know, soulless and devoid of purpose), but then a few minutes in, says "ok but roadmaps are stupid and here's the advice that you really need" and completely changes the direction of the video]. That's my style of clickbait, and that's the vibe this blog goes for. [cut] <br><br> So... hear me out, please. The start ------------------ First, a couple meta-notes. I will likely exaggerate my tone a bit here for dramatic effect. Don't take it personally, please. Also, **this applies to almost all ratings**. At the very least, I recommend you process the main point of this blog and see whether or not you already do something similar (for most people... probably not?) The problem ------------------ I'm sure if you've looked at the...
(4) There's often an enormous amount of emphasis on topic-based learning

Full text and comments »

Tags hi
  • Vote: I like it
  • +207
  • Vote: I do not like it

165.
By maomao90, history, 5 years ago, In English
Tutorial on SIMD vectorisation to speed up brute force I decided to write a blog on this as I was doing a problem on our local judge and I decided to try to speed up my brute force code. However, it was quite difficult to find resources on SIMD vectorisation, so I decided to try to compile some of the resources I found to hopefully allow more people to learn <s>to scam brute force solutions</s> Thanks to ~iloveioi,2022-01-02 and ~jamessngg,2022-01-02 for proofreading. Introduction ================== SIMD stands for single instruction, multiple data. SIMD allows us to give vector instructions which will allow the code to run faster. Vector instructions are instructions that handle short (length 2-16) vectors of integers / floats / characters in a parallel way by making use of the extra bits of space to do operations simultaneously. The most common form of vectorisation is making use of pragmas such as ~~~~~ #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") ~~~~~ This form of vecto...

Full text and comments »

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

166.
By ko_osaga, history, 2 years ago, In English
Anarchy in the APSP: Algorithm and Hardness for Incorrect Implementation of Floyd-Warshall Hello Codeforces! I just uploaded the [first paper of my life](https://arxiv.org/abs/2404.08173) to arXiv, and I'm happy to share this with the community, especially because it is very related to competitive programming. Here is the [presentation](https://docs.google.com/presentation/d/1OE9cPSLMl4cHFqxjbPL8FRXo4ZKmRvTHKqgJbcoRobU/edit?usp=sharing) I gave in MIT Theory Lunch. ## What's the problem? Everyone knows the Floyd-Warshall algorithm for computing the shortest path, it goes like this: ~~~~~ rep(k, n) rep(i, n) rep(j, n) A[i][j] = min(A[i][j], A[i][k] + A[k][j]); ~~~~~ And everyone knows this *incorrect variant* of Floyd-Warshall. I certainly implemented this when I was learning CP, cause I kinda wanted to "fix the loop order". ~~~~~ rep(i, n) rep(j, n) rep(k, n) A[i][j] = min(A[i][j], A[i][k] + A[k][j]); ~~~~~ This is bad, it does not compute the shortest path. It does, however, compute "something". Imagine someone gives you a sparse graph and asks you to ...
was learning CP, cause I kinda wanted to "fix the loop order".

Full text and comments »

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

167.
By Xiaohuba, 11 months ago, In English
Codeforces Global Round 30 Editorial ## A Sequence Game Idea from [user:cmk666,2025-11-06], Prepared by [user:cmk666,2025-11-06] <spoiler summary="Hint 1"> Think some straightforward necessary conditions. They are also sufficient. </spoiler> <spoiler summary="Tutorial"> [tutorial:2164A] </spoiler> ## B Even Modulo Pair Idea from [user:244mhq,2025-11-06], Prepared by [user:NetSpeed1,2025-11-06] <spoiler summary="Hint 1"> Consider a brute force solution. What's the actual complexity of it? </spoiler> <spoiler summary="Tutorial"> [tutorial:2164B] </spoiler> ## C Dungeon Idea from [user:Link_Cut_qwq,2025-11-06], Prepared by [user:Xiaohuba,2025-11-06] <spoiler summary="Hint 1"> If you gain a new sword after killing a monster, its damage will be greater or equal than the previous sword. </spoiler> <spoiler summary="Hint 2"> When will we attempt to kill monsters with $c_i = 0$? </spoiler> <spoiler summary="Hint 3"> Consider a greedy approach. </spoiler> <spoiler summ...
## G Pointless Machine

Full text and comments »

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

168.
By Everule, history, 4 years ago, In English
How to prove your solutions in Competitive Programming It seems many people struggle to understand what a proof even looks like, for greedy problems. The issue is the polarized forms of proof in CP and academic math, which may seem to be overly rigorous and difficult to during contest. However there is spectrum of what a proof even is. It is important to understand, that you cannot truly write and verify a proof within yourself, or within an entity (the entirety of codeforces for example). It is necessary to have judgement on what level of rigor is sufficient. If you want to tell yourself that you just don't have math background and therefore can't prove and will perpetually use it as excuse this blog is not for you. Academic proofs usually tend to be as rigorous as possible, and are carefully verified by other experts in the field, to be objectively certain of its correctness. Clearly that is not a level of rigor you need while solving a codeforces problem. You only need to prove it _to yourself._ For this, there are certain heu...
The first thing you learn proofs can do, is you can play with an example, except you're playing

Full text and comments »

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