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.

Practical

Last visit:  9 years ago
Registered:  10 years ago
2.
By EvenImage, history, 7 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 ...
academia. But I don't know whether it's practical. The most popular algorithm is $O(n^2 + n^{1.5, practical. The most popular algorithm is $O(n^2 + n^{1.5} \log n)$. You can also read the discussion and

Full text and comments »

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

3.
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...
be enumerated with integers for practical purposes. **Graphic matroid.** This matroid is defined, . Colors can be enumerated with integers for practical purposes., Now, speaking about practical purposes of matroids. We have the following problem: we need to find

Full text and comments »

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

4.
By adamant, history, 18 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...
The first practical limitation we encounter is, if we use `double` type for our computations, it, manner for large $k$, we assume that the practical effect of doing this would be quite similar to, But there is still another practical observation, that would also allow us to explain the factor of, From practical perspective, I tried a bunch of various testing strategies, but in all cases the, In my practical experiments, generally speaking, FFT itself seems to be very efficient, so it only, The first practical limitation we encounter is, if we use `double` type for our computations, it

Full text and comments »

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

5.
By Geothermal, history, 6 years ago, In English
Remove Virtual Contestants from Contest Leaderboards As most of you are likely aware, cheating in virtual contests (typically by submitting prewritten or copied solutions in order to appear at the top of the leaderboard) is very common. Most recently, [user:wannabecandidatemaster,2020-05-28] submitted solutions to all problems in [this round](https://codeforces.me/contest/1358/standings) in order to take first place in the standings, and [user:bemandrei,2020-05-28] competed virtually in [this round](https://codeforces.me/contest/1360/standings) after competing in the round officially, and ended up in second place on the leaderboard. In response to the rise of VC cheating (as well as some other issues with the VC system I'll describe below), I'd like to make a simple proposal: **Remove all virtual participants from the contest leaderboards.** The one exception is that you should see your own name on leaderboards for contests you VCed (that is, virtual contestants should be visible only to themselves). Similarly, virtual participan...
kind of strategy is very common, but the presence of VC cheaters makes it much lesspractical, very common, but the presence of VC cheaters makes it much less practical because in pretty much

Full text and comments »

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

6.
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...
. Many actual, practical number theoretic algorithms use these ideas. For example, [Pollard's, Many actual, practical number theoretic algorithms use these ideas. For example, [Pollard's rho

Full text and comments »

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

7.
By Proof_by_QED, 17 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...
assignments and participation in practical classes., participation in practical classes. #### How will the classes be held? Lectures will be pre, Lectures will be pre-recorded and available for self-study. Practical classes will be held at the

Full text and comments »

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

8.
By shiven, history, 2 years ago, In English
A summary of what passes for an Indian ICPC Contest, apparently The online round for the India’s ICPC was held on 23rd. And also a week before that. The first time around, the organisers tried debuting a self-hosted DOMjudge instance. That didn’t go too well, so a recontest was scheduled on CodeChef. If you’re not too familiar with the Indian ICPC system — this online prelims is used to select teams that can participate in the offline regionals. From a single university, usually approx. 2 teams (for the top unis) or 1 (for almost all unis that aren’t in top-15) qualify. As you could guess, it’s quite easy for good teams to miss a spot. Looking at the first contest’s rankings, teams from rank 2 to 100+ all had 4 solves. Owing to severe system issues in the first contest, the time penalties weren’t too reliable differentiators, leading to the recontest this Saturday. In hindsight, we forgot to be grateful for the problemset and reliable testcases the first time. I’m sure everyone agrees that the basic requirements (ignoring all other stuff...
, [available here](https://www.codechef.com/ICPC2024OL). 4, for all practical purposes, since the first, 4, for all practical purposes, since the first was a cakewalk (and insta-GPTable). And also easily

Full text and comments »

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

9.
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...
exists some alternate solution that uses X. The best I can say is usually "it's notpractical to think, uses X. The best I can say is usually "it's not practical to think about it this way". If you

Full text and comments »

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

10.
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...
assignments and participation in practical classes., . Practical classes will be held at the specified time according to the provided schedule. Also, students

Full text and comments »

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

11.
By Monogon, history, 6 years ago, In English
[Tutorial] Voronoi Diagram and Delaunay Triangulation in O(n log n) with Fortune's Algorithm What's a Voronoi Diagram? ------------------ Given a set $S$ of $n$ points in the 2D plane, the Voronoi diagram is a partition of the plane into regions. The region associated with a point $p\in S$ contains precisely the points $q$ such that $q$ is closer to $p$ than any other point in $S$. In other words, a point $q$ belongs to the region of its nearest neighbor. <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/54/Euclidean_Voronoi_diagram.svg/1024px-Euclidean_Voronoi_diagram.svg.png" width="300px" height="auto"/> The Voronoi diagram can be represented by the planar graph of boundaries between regions. A vertex in this graph is where three or more segments meet (or a point at infinity), and an edge is a segment connecting two of these vertices. The way the regions were defined, we see that a segment contains the points equidistant to two points in $S$, so it is part of their perpendicular bisector. Similarly, a Voronoi vertex is equidistant to three or more v...
to have quite a bad constant for practical use. Fortune's Algorithm ------------------ In this, )$ randomized incremental implementation, but it turns out to have quite a bad constant forpractical

Full text and comments »

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

12.
By adamant, history, 4 years ago, In English
Duality in linear programming. Part 1 — definition and construction Hi everyone! Previously I [wrote](https://codeforces.me/blog/entry/98334) about theoretical grounds of "aliens trick". Specifically, I introduced the concept of the Lagrangian duality and explained its connection with the trick. Today I want to elaborate a bit more on the concept of dual problems and their applications to linear programming as well as to common problems in competitive programming. I initially wanted to also write about some applications in competitive programming problems, but given that the introduction is already quite lengthy, I decided to leave it for another blog, while using most common and well-known theoretical examples here, focusing more on how to construct and interpret dual problems to begin with, rather than how to use it in contests. I think, it is a crucial first step towards using the duality in actual programming challenges. #### Prerequisites It is highly recommended to have some general understanding of basic mathematical optimization...
#### Practical example

Full text and comments »

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

13.
By ouuan, history, 7 years ago, In English
One thing you should know about comparators — Strict Weak Ordering Is "In C++, comparator should return false if its arguments are equal." [all you should know about comparators in C++](https://codeforces.me/blog/entry/70237)? **Definitely NOT.** ### What's the requirement of the custom comparator in STL? It should be a *Strict Weak Ordering*. In other words, let the comparator be $f$, and $f(x, y)=true$ means $x< y$, then: 1. $f(x, x)$ must be false (Irreflexivity) 2. If $f(x, y)$ is true, then $f(y, x)$ must be false. (Antisymmetry) 3. If $f(x, y)=true$ and $f(y, z)=true$, then $f(x, z)$ must be true. (Transitivity) 4. If $f(x, y)=false$, $f(y, x)=false$, $f(y, z)=false$ and $f(z, y)=false$, then $f(x, z)=false$ and $f(z, x)=false$. (Transitivity of equivalence) In fact, *Antisymmetry* can be deduced by *Irreflexivity* and *Transitivity*, so we can ignore it. Here are some examples that these rules aren't satisfied: | Comparator | Irreflexivity | Transitivity | Transitivity of equivalence | Example | | :----------: | ...
problem on other OJs, please make a comment. There is a practical statement in [LOJ10003](https, #### Practical version, There is a practical statement in [LOJ10003](https://loj.ac/problem/10003), and a mathematical

Full text and comments »

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

14.
By Monogon, 4 years ago, In English
[Tutorial] Supporting Priority-Queue-like Undoing on DS _Good morning!_ In this blog, I will present an online algorithm that can perform priority-queue-like undoing on a data structure, given a few assumptions. I will also present and solve a generalization of that problem. For context, I highly recommend reading this blog that shows how to solve the easier problem of queue-like undoing. That blog gave me the inspiration for the trick I will describe here, but I will still try to write this blog so that it can be understood without it. Thank you [user:Noam527,2023-01-08] for introducing such a great trick to the competitive programming community. [[Tutorial] Supporting Queue-like Undoing on DS](https://codeforces.me/blog/entry/83467) Acknowledgment ----------------- Huge thanks go to [user:peltorator,2023-02-20] for hosting a [blog contest](https://codeforces.me/blog/entry/110840). His generous prize of $300 got many people to write blogs on new, interesting ideas, and it was one of the main reasons I wrote this blog. I'm...
better in a practical implementation. With that out of the way, here is a reference table of approximate, different value might be better in a practical implementation. With that out of the way, here is a

Full text and comments »

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

15.
By pajenegod, 3 years ago, In English
The Ultimate Reroot Template Hi Codeforces! Have you ever had this issue before? ![ ](https://cdn.discordapp.com/attachments/572613134020247562/1191774699110285392/image.png?ex=65a6a9ae&is=659434ae&hm=aeb62b0d97a84c226709b88bc3db7647f4509eef7c3a757a798ffe37e7e91c2b&) If yes, then you have come to the right place! This is a blog about my super easy to use template for (reroot) DP on trees. I really believe that this template is kind of revolutionary for solving reroot DP problems. I've implemented it both in [Python](https://codeforces.me/contest/1324/submission/240129139) and in [C++](https://codeforces.me/contest/1324/submission/240131453) (the template supports `Python2`, `Python3` and `>= C++14`). Using this template, you will be able to easily solve > 2000 rated reroot problems in a couple of minutes, with a couple of lines of code. A big thanks goes out to everyone that has helped me by giving feedback on blog and/or discussing reroot with me, [user:nor,2024-01-03], [user:meooow,2024-01-03], [u...
in Python is both relatively slow and increadibly memory hungry. So for a far morepractical version, more practical version, I've also implemented this same algorithm using a BFS instead of a DFS. This

Full text and comments »

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

16.
By errorgorn, 5 years ago, In English
[Tutorial] Knapsack, Subset Sum and the (max,+) Convolution **Edit**: I have realized that this blog has been sent quite a lot on discord servers, so I am adding a content page at the start to help organize this blog better. ## Prerequisites Let us first define the classical knapsack, unbounded knapsack and subset sum problems. #### Subset Sum There are $N$ items. The $i$-th item has weight $w_i$. Find a set $S$ such that $\sum\limits_{i \in S} w_i = C$. #### Knapsack There are $N$ items. The $i$-th item has weight $w_i$ and value $v_i$. Find a set $S$ such that $\sum\limits_{i \in S} w_i \leq C$ and $\sum\limits_{i \in S} v_i$ is maximized. #### Unbounded Knapsack There are $N$ items. The $i$-th item has weight $w_i$ and value $v_i$. Find a **multiset** $S$ such that $\sum\limits_{i \in S} w_i \leq C$ and $\sum\limits_{i \in S} v_i$ is maximized. You should know how to do both versions of knapsack in $O(NC)$ and subset sum in $O(\frac{NC}{32})$ before reading this blog. In this blog post, I will just show some res...
^2 (\log \log n)^3}{(\log n)^2})$, which does not seem practical for competitive programming., }{\log n})$ or $O(\frac{n^2 (\log \log n)^3}{(\log n)^2})$, which does not seem practical for

Full text and comments »

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

17.
By errorgorn, 3 years ago, In English
Confession: I sent problem H to goodbye Going to be 100% honest here, I sent problem H to goodbye. I feel really bad to authors of Goodbye 2023 for ruining their round, it seems the round would have been better by just removing H. As much as the community is out here roasting [user:74TrAkToR,2023-12-31], I also had a part to play in this contest. I wish to be as transparent as I can here without saying any classified information (apologies to [user:KAN,2023-12-31] and [user:74TrAkToR,2023-12-31] if anything here shouldn't be disclosed). To give some context, here is what went down in goodbye round from my perspective: - 13 days before contest: KAN asks me if I can source a 1E for goodbye. I asked traktor to send me the testing gym so that I could gauge how hard the 1E should be. He told me he will send me after he translates the statements. (UPD: Note that the IMO 1986 problem was already removed before this stage which is why a new 1E was needed, I never saw this IMO problem) - 11 days before contest: traktor send it...
view, this is a super standard exercise From a practical point of view, the only unclear place, , this is a super standard exercise From a practical point of view, the only unclear place is what

Full text and comments »

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

18.
By purplesyringa, history, 5 years ago, In English
Analysis of polynomial hashing Unfortunately, most derivations of the chance of polynomial hashing collision are invalid, wrong, or misleading, and finding reliable public sources with proofs is incredibly difficult. This article is a formal analysis of the method. The goal of this article is to complement well-known empirical facts with theory, provide boundaries on the probability of collision, justify common choices, and advise against certain popular parameters. There is no code in this article, and it's mostly theoretical. It's more of a summa of everything we know about polynomial hashing in integers rather than a guide for beginners. You'll probably find something of interest still. I do, however, describe some methods of cracking hashes, which I can provide code and additional explanation for if someone asks in the comments and some general guidelines in the last section of the present article. ## Table of contents - The concept of polynomial hashing - Classical justification of the coprimality r...
From a practical viewpoint, this is a condition on $M$ more than on $b$. We know that $\mathrm{ord, In most practical applications, $\Sigma$ is either a segment of integers or a union of segments, It is reasonable to improve our collision model by analyzing the practical use cases more, The MitM method has more theoretical than practical value because the birthday paradox allows us to, This preliminary result has an important impact: in most practical use cases, the probability of, We assume that the strings $s$ and $t$ are of equal length here because this is a morepractical, practical answer, but we will return to this shortly., }. $$ We assume that the strings $s$ and $t$ are of equal length here because this is a morepractical

Full text and comments »

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

19.
By Monogon, history, 6 years ago, In English
Efficient 3D Convex Hull Tutorial _Warning: The following contains graphic depictions of geometry, precision errors, and degenerate cases. Viewer discretion is advised._ ### Prerequisites I assume the reader is familiar with: - 2D Convex Hulls - 3D Vector Operations (dot and cross products) ### Introduction Recall that in the 2D convex hull problem, you are given a set of 2D points, and you must compute the smallest convex polygon containing all the given points. By convex, we mean that for any two points $A$ and $B$ inside the polygon, the entire line segment $AB$ is also inside the polygon. The problem in 3D is completely analogous. You are given $n$ 3D points, and you must compute the smallest convex polyhedron containing all the given points. Similarly, a polyhedron is convex if for any two points $A$ and $B$ inside the polyhedron, the line segment $AB$ is also inside the polyhedron. In the 2D case, it is more obvious what the output is. We can simply output a circular list of vertices on the ...
in $O(n^2)$ Now we want a more practical algorithm. The strategy of the incremental algorithm is, Now we want a more practical algorithm. The strategy of the incremental algorithm is to build the

Full text and comments »

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

20.
By ifsmirnov, history, 9 years ago, translation, In English
Jngen: generic library for generating testcases Two years ago I came up with an [idea](http://codeforces.me/blog/entry/20108) (Russian only) of making a generic library for creating testcases. Months have passed, thoughts circulated in my mind over and over, and finally I sculpted something in code. Far many things are yet not implemented, but I already frequently use ones which are. Here it is: https://github.com/ifsmirnov/jngen. You can download the library itself (its single header jngen.h) [here](https://raw.githubusercontent.com/ifsmirnov/jngen/master/jngen.h). Jngen works with arrays, graphs and trees. It also can generate some strings and geometry and provides command-line options parser and cool SVG drawer. Here are some working examples. ~~~~~ cout << Array::id(10).shuffled().add1() << endl; // permutation of elements from 1 to 10 cout << Tree::random(100000, 20) << endl; // "long" tree with elongation 20 pair<string, string> test = rnds.antiHash({{mod1, base1}, {mod2, base2}}, "a-z", 10000); // should be s...
there are more bricks than practical testcases. We're working on it: soon several "test suites" will be, " – I mean there are more bricks than practical testcases. We're working on it: soon several "test

Full text and comments »

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

21.
By purplesyringa, history, 2 years ago, In English
AI might erase CP, but not us I haven't slept for 20 hours and I can't fall asleep. I've been reading others' topics on AI, and I had a sort of epiphany. These ideas have been brewing inside me for many years, and I thought it might be time to share them with the community. --- There were times when I was a "competitive programmer" at the core. I spent many years doing that exclusively. I've never been to IOI, but I like to think that I've reached some good heights. Two years ago, I stopped writing online competitions. I've written a few offline competitions after that, but eventually, I decided to stop that too. Yet somehow Codeforces still attracts me. I don't want to solve problems, but I keep typing codeforces.com into the address bar. *Why?* Just yesterday, I didn't have an answer. --- Imagine a layperson asking you what competitive programming is. What are you going to say? My answer has always been "Oh, we solve interesting algorithmic problems with time constraints and other limits". Many ...
computer, too, just wider, more practical in some ways, and less practical in others. They have, practical in some ways, and less practical in others. They have "contests" too, called demo parties

Full text and comments »

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

22.
By purplesyringa, history, 4 years ago, In English
Fixing the contest management mess ...or "How legacy systems fight obstacles no sane person would introduce in the first place". Hello, Codeforces! I am sure that those of you who tried to host their own programming competitions or write their own utilities for contest management are aware of the state of affairs regarding contest hosting. There are lots of incompatible formats, no one knows exactly how stuff ought to work, Polygon is full of nondescript and seemingly contradictory options, ej-polygon never seems to work quite correctly, modifications have to be applied to jury archives to make them work on your particular installation, non-trivial problem types require constant maintenance and hacks, *ad infinitum*. Personally, I stumbled upon all these problems when I tried to get my own judge system working and suddenly discovered that the difficult part is not judging complex problems, but handling artificial complexity introduced by legacy software and standards. So here I am, attempting to solve these pro...
compilation on each test, which would come in handy for some practical development competitions, - Optional compilation on each test, which would come in handy for some practical development

Full text and comments »

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

23.
By awoo, history, 7 years ago, translation, In English
Educational Codeforces Round 85 [Rated for Div. 2] Hello Codeforces! On [contest_time:1334] [contest:1334] 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-04-09] Glazov, Adilbek [user:adedalic,2020-04-09] Dalabaev, Vladimir [user:vovuh,2020-04-09] Petrov, Ivan [us...
Harbour.Space team on their mission for 4 hours/day, getting valuable practical experience in the field and, practical experience in the field and working in a team with some of the brightest young professionals

Full text and comments »

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

24.
By Elegia, history, 23 months ago, In English
More on D-Finite Functions I: Theories Hello everyone. Several years ago [user:jqdai0815,2025-01-03] released a [blog](https://codeforces.me/blog/entry/76447) on the topic of D-Finite functions. In this blog, I will introduce some more theories, and show the relation between some CP problems. Also, I found out that what I show is like opening Pandora's box: it provides some new ways to solve problems, but they also somehow prevent us from really understanding them. Therefore, I'll also talk about some of my personal critiques on this topic. Since this blog is quite long, I'll divide it into several parts. This is the first part. ## Appetizer We start with this toy problem. **$n$-King Problem.** Given $n$, count the number of permutations $\sigma$ of $[n]$ such that for any $i$, $|\sigma(i) - \sigma(i+1)| \neq 1$. Of course, this sequence has already been studied before, it is the [A002464](https://oeis.org/A002464) in OEIS. You can find its recurrence relation $$ a_n = (n+1)a_{n-1} - (n-2)a_{n-2} - (n-5...
problem _Chinese Elephant Chess_ is D-Finite. He suspected that it would be non-practical to, ## Make Practical

Full text and comments »

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

25.
By Elegia, history, 3 years ago, In English
How to composite (some) polynomials faster? Hi everyone, today I'd like to elaborate something more on the [problem I](https://codeforces.me/contest/1930/problem/I) on the recently ended div 1 contest. As described in the [official solution](https://codeforces.me/blog/satyam343), a bottleneck of the problem is the following: Given a sequence $\{c_j\}_{-n \leq j \leq n}$, compute $$ g_k = \sum_{-k\leq j\leq k} ([x^j] (x + 1/x)^k) c_j $$ for all $0 \leq k \leq n$. In the official solution, an $O(n\log^2 n)$ time algorithm is presented, and we also claimed that it is possible to compute $g_k$ in $O(n\log n)$ time. In this post, I'd like to elaborate on how to do that. By the way, another bottleneck of the problem is the relaxed convolution problem, where the usual implementation also takes $O(n\log^2 n)$ time. I mentioned in [comment](https://codeforces.me/blog/entry/111399#comment-996712) that the relaxed convolution has a somehow practical solution that has time complexity $$ O\left(\frac{n\log^2 n}{\log \log n...
convolution has a somehow practical solution that has time complexity $$ O\left(\frac{n\log^2 n}{\log \log, not so practical according to my experimental test, but I think it is still an interesting result., /entry/111399#comment-996712) that the relaxed convolution has a somehow practical solution that has

Full text and comments »

Discussion of think-cell Round 1
  • Vote: I like it
  • +269
  • Vote: I do not like it

26.
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...
negatively during the COVID-19 global pandemic._ _Tune in for some practical examples of how, practical examples of how companies are using AI to innovate and disrupt during a time of crisis

Full text and comments »

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

27.
By errorgorn, 4 years ago, In English
[Tutorial] Theoretically Faster HLD and Centroid Decomposition This blog was going to be translation of $[1]$ (which is in Chinese) but I think I ended up deviating too much from the source material that it would not be appropriate to call this a translation. Anyways, I am honestly amazed by how ahead of its time this paper is. In its abstract, it starts by saying that the state of art for tree path queries is $O(n \log n + q \sqrt n \log n)$, which I honestly can't fathom how one would arrive, then proceeds to claim that it has found an $O((n+q) \log n)$ algorithm. All the more, in 2007. While I was in the process of writing this blog, [user:smax,2022-07-18] sniped me and posted $[9]$. However, we will focus on static trees **only**. Thanks to [user:oolimry,2022-07-18], [user:everule,2022-07-18] and [user:timreizin,2022-07-18] for proofreading. Note to reader: I am expecting the reader to be familiar with what a splay tree and HLD is. You do not really need to know why splay trees are $O(\log n)$ amortised but you should know what the z...
better ideas of the practical performance of the things I will describe so you will realize that

Full text and comments »

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

28.
By adamant, history, 4 years ago, In English
Partitions and pentagonal number theorem Hi everyone! In today's blog I'd like to write about the theorem that allows to efficiently solve the following problems: - What is the number of partitions of a non-negative number $n$ for $n \leq 10^5$? - What is the number of partitions of a non-negative number $n$ for $n \leq 10^5$, so that no summand repeats $d$ or more times? - What is the number of partitions of a non-negative number $n$ for $n \leq 10^5$, so that no summand is divisible by $d$? - **[HackerEarth &mdash; Perfect Permutations](https://www.hackerearth.com/de/problem/algorithm/perfect-permutations-september-clash/)**: What is the number of permutations of length $n$ with $k$ inversions for $k \leq n \leq 10^5$? - **[problem:102354E]**: Let $\phi = \frac{9}{10} \cdot \frac{99}{100} \cdot \frac{999}{1000} \cdot \dots$, what is the $k$-th digit of $\phi$ for $k \leq 10^{18}$? - **[SNSS-2018 Round 5 &mdash; Investment Portfolio](https://contest.yandex.ru/contest/8703/problems/C/)**: You have $2n$ dollars and ...
practical, as

Full text and comments »

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

29.
By MikeMirzayanov, 7 years ago, In English
New on Codeforces: Allowed Programming Languages Customization for Mashups/Private Trainings Hello! Codeforces supports a wide range of languages. Just yesterday I supported Java 11. On the other hand, my website is not only just open public rounds and trainings, but also an advanced system of groups, custom domains and mashups. This ecosystem makes it possible to conduct private trainings, local contests/olympiads, provides the work of computer science clubs, and so on. Sometimes you ask me to somehow limit the languages that can be used in a particular contest. For example, an official competition is held that does not support Rust. Or this contest is a practical session specifically for classes in Python. Now you can configure allowed programming languages (more precisely, their groups) for your mashups and private trainings. Thanks for the help to [user:geranazavr555,2019-10-22] who helped to realize this opportunity! Here are some screenshots of how it looks in action. <center> <img src="/predownloaded/49/19/4919e2326a4b99b50aee02f92487a4bb99dbd1f7.png"...
example, an official competition is held that does not support Rust. Or this contest is apractical, , an official competition is held that does not support Rust. Or this contest is apractical session

Full text and comments »

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

30.
By catalystgma, history, 2 years ago, In English
Exponential Length Substrings in Pattern Matching Hi all, I would like to share with you a part of my undergraduate thesis on a Multi-String Pattern Matcher data structure. In my opinion, it's easy to understand and hard to implement correctly and efficiently. It's (relatively) competitive against other MSPM data structures (Aho-Corasick, suffix array/automaton/tree to name a few) when the dictionary size is specifically (uncommonly) large. I would also like to sign up this entry to [user:bashkort,2024-10-04]'s [Month of Blog Posts](https://codeforces.me/blog/entry/133806):-) Many thanks to him and peltorator for supporting this initiative. #### Abstract This work describes a hash-based mass-searching algorithm, finding (count, location of first match) entries from a dictionary against a string $s$ of length $n$. The presented implementation makes use of all substrings of $s$ whose lengths are powers of $2$ to construct an offline algorithm that can, in some cases, reach a complexity of $O(n \log^2n)$ even if there are $O...
bound is tight for practical values of $n$ (e.g. generate $s$ with $n = 10^8$ such that all, #### Practical results, The bound is tight for practical values of $n$ (e.g. generate $s$ with $n = 10^8$ such that all, We want to compute a practical upper bound for $NT(m)$. We know a point that has to be on the graph, practical bound.

Full text and comments »

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

31.
By BledDest, 5 weeks ago, translation, In English
Educational Codeforces Round 195 [rated for Div. 2] <img alt="Neapolis University Pafos" src="/predownloaded/9a/33/9a332fadbb47050ba9405057df022a6e37eaf5c0.png" style="float:right;height: 150px; 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/). [contest:2276] will start on [contest_time:2276]. 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 **7 problems** and **2 hours** to solve them. I hope everyone participating finds interesting problems for them to solve. **The round is based on the problems from The ICPC Southern and Volga Russia Regional Contest. If you par...
through practical assignments. A chance to explore the programming, mathematics, and experiments, , train models, and work with neural networks through practical assignments. A chance to explore the

Full text and comments »

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

32.
By Qingyu, 9 months ago, In English
The 2026 Universal Cup Finals Announcement Hello Codeforces! I am excited to announce that The 2026 Universal Cup Finals will be held in Shanghai, China from May 7 to 12, 2026! <center style="margin-top:20px;"> <img src="/predownloaded/40/72/40729f130c6d86d6ec06078b24e2f5c8fd61e5dc.png" alt="2026 ucup finals" style="zoom:80%;" /> </center> <center style="margin-top:20px;"> <img src="/predownloaded/b8/87/b887ffab8b998244f31367f6867d25c1ccfc20f7.png" alt="lianqiu" style="zoom:80%;" /> </center> Based on the results of The 3rd Universal Cup Online Stages and The 3rd Universal Cup Semifinals, the Universal Cup Scientific Committee will start promoting teams to the Finals according to [this rule](https://ucup.ac/news/the-3rd-ucup-finals-qualification-rules/). Invitations will be delivered through email. <!-- more --> ## Competition Overview Universal Cup is a non-profit organization dedicated to providing practical training opportunities for teams aspiring to improve their algorithmic competition skills. At ...
Universal Cup is a non-profit organization dedicated to providing practical training opportunities, practical training opportunities for teams aspiring to improve their algorithmic competition skills. At

Full text and comments »

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

33.
By adamant, history, 4 years ago, In English
CDQ convolution (online FFT) generalization with Newton method Hi everyone! This is yet another blog that I had drafted for quite some time, but was reluctant to publish. I decided to dig it up and complete to a more or less comprehensive state for the [$300 contest](https://codeforces.me/blog/entry/110840). Essentially, the blog tells how to combine CDQ technique for relaxed polynomial multiplication ("online FFT") with linearization technique from Newton method (similar approach is used in the first example of the [ODE blog post](https://codeforces.me/blog/entry/76447) by [user:amiya,2023-01-14]), so that the functions that typically require Newton's method can be computed online as well. I will try to briefly cover the general idea of "online FFT" too and provide some examples, in case you're not well familiar with it. That being said... [cut] <hr> Consider the following setting: There is a differentiable function $F(x)$ such that $F(0)=0$ and a polynomial $f(x)$. You want to compute first $n$ coefficients of a formal power...
equation above, formulated through logarithms. It is not very practical because of a very high, on the equation above, formulated through logarithms. It is not very practical because of a very

Full text and comments »

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

34.
By xcyle, 2 years ago, In English
EPIC Institute of Technology Round August 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:2002], which will be held on [contest_time:2002]. The problems are prepared by [user:Flamire,2024-08-06], [user:le0n,2024-08-06] and [user:xcyle,2024-08-06]. You will be given **8 problems** and **3 hours** to solve them. Two problems are divided into two subtasks. The round will be rated for **everyone**. We would like to thank everyone who has helped prepare for this round: - [user:TheScrasse,2024-08-06] for his brilliant coordination. - [user:AdunAdunov,2024-08-08] and [user:Alexdat2000,2024-08-08] for Russian translation. - [user:orzdevinwang,2024-08-06], [user:arvindf232,2024-08-08], [user:MagicalFlower,2024-08-06], [user:rui_er,2024-08-06], [user:LipArcanjo,2024-08-06], [u...
assignments and participation in practical classes., . Practical classes will be held at the specified time according to the provided schedule. Also, students

Full text and comments »

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

35.
By Endagorion, 12 years ago, In English
Codeforces Round #265 Editorial I'll upload my example solutions and will post links to them as soon as it becomes possible. Some of the problems editorials contain an additional challenge which is apparently harder to comprehend than the original problem. Feel free to share and discuss your ideas in the comments. =) [problem:465A] If we add 1 to a number, its binary representation changes in a simple way: all the least significant $1$'s change to $0$'s, and the single following $0$ changes to $1$. It suffices to find the length of largest suffix which contains only $1$'s, suppose its length is $l$. Then the answer is $l+1$ except for the case when all the string consists of $1$, when the answer is $l$. It is amusing that div1E problem is concerned with addition of 1 to a binary integer as well. =) [problem:465B] Optimal strategy is as follows: for every segment of consecutive $1$'s open the first letter in segment, scroll until the last letter in segment, if there are more unread letters left, retu...
has $O(m \log n \log d)$ complexity. However, great caution is needed to achieve apractical, practical solution. First of all, in clueless implementation comparison of two "numbers" may require $O

Full text and comments »

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

36.
By awoo, history, 7 years ago, translation, In English
Educational Codeforces Round 75 [Rated for Div. 2] Hello Codeforces! On [contest_time:1251] [contest:1251] 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 **7 problems** and **2 hours** to solve them. The problems were invented and prepared by Roman [user:Roms,2019-10-23] Glazov, Adilbek [user:adedalic,2019-10-23] Dalabaev, Vladimir [user:Vovuh,2019-10-23] Petrov, Ivan [user:Bl...
includes daily lectures and practical exercises. It will be quite educational, insightful and entertaining!_, lectures and practical exercises. It will be quite educational, insightful and entertaining!_ _And you

Full text and comments »

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

37.
By arvindf232, history, 2 years ago, In English
How might LGMs cheat using current AI. Or, are these not cheating? Disclaimer: My natural English ability is questionable. I have passed the blog through chatgpt to correct grammatical mistakes. I experimented with o1-mini and tried to understand its implications for competitive programming on Codeforces at level 2500 or higher. Obviously, the current AI cannot outright provide you with solutions; however, there are already ways it can help quite a lot. ### Brute Force Writing I believe most competitors regularly use brute-forces. They are kind of an admission of failure to find your mistakes on your own. Previously, brute-forces came with the cost of taking 5 minutes to write. I would not do it unless it is a very hard problem, or I have tried debugging by hand for 10 minutes and seen nothing. If AI usage is assumed, then these 5 minutes would be completely saved. Five minutes would correspond to approximately a 10 performance rating if on the final problem and increasingly more on earlier problems. ### Translations of Languages Thi...
, option 2B was not very practical for long data structures, and option 2A was possible but limited to only, Previously, option 2B was not very practical for long data structures, and option 2A was possible

Full text and comments »

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

38.
By OtterZ, history, 11 months ago, In English
Border Theory:There's a fast approach to bruteforce on borders UPD:Thanks to comment from [user:arvindf232,2025-12-20] and [user:pajenegod,2025-12-20],I rewrote parts of this post to improve clarity with the help of Chatgpt. I hope it reads more smoothly now. # Preface In this blog, I want to share Border Theory, a useful and elegant insight about string borders that often appears in competitive programming. Although this idea deserves to be as well-known as the KMP algorithm, many people today aren’t aware of it or how to use it to speed up their solutions. # Main Theoretical Result of Border Theory ## Main Result For a string $S$, a border is a substring that is both a prefix of $S$ and a suffix of $S$. For a string $S$, we define that: $$ \{b_i\}_{i=1}^n$$ is the sequence of all lengths of the border of $S$, sorted in increasing order. According to the theory,it's garenteed that for all possible $S$, ${B_i}_{i = 1}^n$ can be partitioned into $\operatorname{O}(\log |S|)$ continuous subsequences where each subsequence f...
same arithmetic subsequence, then $2x < y$, making the theory right. ## Practical Use: The Series, ## Practical Use: The Series-Link (shlink) Trick, A practical formulation of this theory is the series link (often written `shlink`), which groups

Full text and comments »

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

39.
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 ...
front-end codebase. The intern will have the opportunity to gain practical experience in front-end, practical experience in front-end development within the context of blockchain technology and contribute

Full text and comments »

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

40.
By adamant, history, 3 years ago, In English
Implementing Dinitz on bipartite graphs Hi everyone! if you read about [Dinic algorithm](https://cp-algorithms.com/graph/dinic.html) on CP-Algorithms, especially the [section](https://cp-algorithms.com/graph/dinic.html#unit-networks) about how it works on unit networks, you'll notice that its supposed runtime for bipartite matching is $O(E \sqrt V)$, where $E$ is the total number of edges, and $V$ is the total number of vertices of a bipartite graph. Let's try it out on the following problem: **[Library Checker &mdash; matching on Bipartite Graph](https://judge.yosupo.jp/problem/bipartitematching)**. Given a bipartite graph with $V, E \leq 2 \cdot 10^5$, find the maximum matching. The implementation of the Dinitz algorithm that I typically use looks as follows: <spoiler summary="code"> ```cpp struct unit_network { int n; vector<int> to, cap; vector<vector<int>> g; unit_network(int n): n(n), g(n) {} void add_edge(int a, int b, int cp) { g[a].push_back(size(to)); ...
/149186)?! Okay, that's weird. Apparently, roughly the fastest practical algorithm for maximum, ://judge.yosupo.jp/submission/149186)?! Okay, that's weird. Apparently, roughly the fastestpractical

Full text and comments »

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

41.
By Leeking, history, 3 months ago, In English
Proposal: Standardized Editorial URLs **Proposal: Standardized Editorial URLs (`/contest/xxxx/editorial`) & API Endpoint Support** Finding tutorials for past Codeforces contests is currently far more inconsistent than it needs to be. Depending on the contest author and round, editorials are scattered across different formats: For anyone upsolving or building community tools (like browser extensions and problem trackers), this unpredictability causes constant friction. **The Proposal** Introduce a standardized URL alias and API endpoint for contest tutorials. **1. Standardized Web Route** Allow users to access any contest editorial via a single, predictable URL: ``` codeforces.com/contest/{contestId}/editorial ``` Practical Implementation & Settings: - **Contest Manager Settings:** In the contest dashboard, coordinators or authors simply enter the `blogEntryId` (or external link) designated as the official tutorial. - **Problem-Level Linking & Discussion:** [user:Errichto,2026-08-27] sugge...
Practical Implementation & Settings:

Full text and comments »

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

42.
By awoo, history, 7 years ago, translation, In English
Educational Codeforces Round 79 [Rated for Div. 2] Hello Codeforces! On [contest_time:1279] [contest:1279] 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 problems** and **2 hours** to solve them. The problems were invented and prepared by Roman [user:Roms,2019-12-26] Glazov, Adilbek [user:adedalic,2019-12-26] Dalabaev, Vladimir [user:Vovuh,2019-12-26] Petrov, Ivan [user:Bl...
includes daily lectures and practical exercises. It will be quite educational, insightful and entertaining!_, three weeks of training, 5 training days each week. The program includes daily lectures andpractical

Full text and comments »

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

43.
By purplesyringa, history, 2 years ago, In English
We teach wrong When I was a child, I knew software development well (though not much of C++), and my parents motivated me to try out competitive programming. The first thing I tried was dkirienko's section. In the first 20 minutes, GCD and the Euclidian algorithm were explained, the complexity of the Euclidian algorithm was proven, and that was pretty much it. We were then asked to solve a problem set on Codeforces individually. I didn't understand much from the complexity proof, couldn't solve a single problem, failed to figure out what I was supposed to do, and left crying. So yeah, stuff like that doesn't work. I understood simpler topics, though. I knew basic math, like how to solve linear systems and quadratic equations, and could make simple observations, so the school stage of ROI was quite easy to get through. (The hardest part was to explain to my then-informatics teacher that yes, I want the adult problems.) During the municipal stage, I had 3 hours to solve what I'd classify as a 5-t...
algorithms because there was nothing practical to learn anymore. With segment trees, there's a high, practical to learn anymore. With segment trees, there's a high variety of problems waiting to be approached

Full text and comments »

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

44.
By galen_colin, 3 years ago, In English
fix problem ratings pls (the rainboy effect) [The first few paragraphs of this blog, above the first spoiler, are just for story purposes and are irrelevant to the problem statement] One fateful day, a naive and young version of me from about 5 days ago had a dream. A dream to stop being so terrified of hard problems. A dream to conquer the most challenging stuff that CF ever had to offer. A dream to... ok, enough of that, that's so stupid. Basically, I've been grinding 3500s lately, mostly for fun (and my god, has it been fun). Two days prior, I found myself solving [1919G](https://codeforces.me/contest/1919/problem/G). That went fine, but after getting it, I noticed that despite G being 3500, it wasn't even the hardest problem in the contest &mdash; that honor went to the next problem, [1919H](https://codeforces.me/contest/1919/problem/H) (the subject of this blog), which had **no solves in-contest**. I concluded that I would have to be insane to try that, and moved on to other problems. Well, yesterday, I decided I...
debug and make everything much easier. Yes, it's practical in contests too, particularly when you, Yes, it's practical in contests too, particularly when you predict a problem to be "WA hell" &mdash

Full text and comments »

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

45.
By jdurie, 4 years ago, In English
Codeforces Round #801 — EPIC Institute of Technology Round (Div. 2) <a href="https://epic-institute.io/"><img alt="EPIC" src="https://assets.codeforces.com/images/deltix/epic2022.gif" style="float:right; height: 230px; padding-left: 35px; padding-right: 73px; padding-top: 41px; padding-bottom: 33px;"/></a> Hi, Codeforces! We welcome everyone to take part in [contest:1695], which will start on [contest_time:1695]. The round will be rated for participants of Division 2 with a rating lower than 2100. Division 1 participants can participate unofficially in the round. You will be given 5 problems and 2 hours to solve them. One problem will consist of multiple subtasks. The score distribution will be 500 &mdash; 750 &mdash; 1250 &mdash; (1250+1000) &mdash; 3000. The round was prepared by me, [user:ki0apa,2022-06-16], and [user:akifpatel,2022-06-16]. We would like to say a word of appreciation: - to [user:antontrygubO_o,2022-06-16] for amazing coordination of the round - to [user:18o3,2022-06-16], [user:bobbilyking,2022-06-16...
course, depends on the quality of the laboratory work and participation in lectures andpractical, participation in lectures and practical classes. Lectures, practical classes, seminars, All classes will be held online. Lectures and practical classes will be held at the specified time, Lectures, practical classes, seminars, conferences, and other interesting activities are provided

Full text and comments »

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

46.
By TheScrasse, history, 3 years ago, In English
[Tutorial] How to read editorials Hello everyone, in this blog I'm trying to convince you that editorials are useful, especially if you read them "correctly". #### "Algorithm $1$" vs "Algorithm $2$" This is what many users do when reading the editorial for one problem (let's call it "algorithm $1$"): - Read it. - Repeat until able to implement the solution. - Implement the solution; possibly forget about any previous attempt to solve that problem without editorial, and any detail in the editorial that seems unrelated to the implementation of the solution. - Possibly, read the comments trying to find out how it is possible to come up with the solution in the editorial. This is what you should do in my opinion (let's call it "algorithm $2$"): - Keep the editorial open until you are able to implement the solution, using both your ideas and editorial's ideas: sometimes, this just means opening the editorial for $1$ second, because you had already found most of the ideas on your own. - Implement the so...
, consider $\text{gcd}$" which seem random and not so practical. - With algorithm $2$, you have an, }$" which seem random and not so practical. - With algorithm $2$, you have an intuitive

Full text and comments »

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

47.
By abdude824, 5 years ago, In English
Operating Systems Notes If you are struggling with the right track and a 10-min read for Operating systems from beginning to end, you're at the right place. Even I am not sure where to start, but we would figure it and if you are reading this, I have successfully completed these notes or at least am on right track. Let's start our struggle for OS: ### The Track I found many resources to learn, let's just list all: (Galvin Concise PPTs)[https://www.os-book.com/OS9/slide-dir/index.html]: These were great but I felt that these are a little bit too much, so here are the chapters we would do: 1. Processes 2. Threads 3. Process Synchronization 4. CPU Scheduling Algorithms 5. Deadlocks 6. Main memory 7. Virtual memory 8. Virtual Machines > I am skipping the introduction of OS for now as it was not that important, this is going to be a fast article that works like a last night dose. <spoiler summary="A simple introduction(May skip if you are already familiar)"> An Operating system is like a...
1. Unbounded Buffer: It has no practical limit on the size of, algorithm. But as far as the practical application of this algorithm goes, as we saw previously also, process. Obviously, it is also not practical, as suppose you are using a printer and your half-page, summary="Types of Buffers"> 1. Unbounded Buffer: It has no practical limit on the size of the buffer

Full text and comments »

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

48.
By kartik8800, history, 3 years ago, In English
Introduction to Disjoint Set Data Structure | DSU # Introduction to Disjoint Set Data Strucutres Hello Codeforces! I recently read about Disjoint Sets from the book Introduction to Algorithms and wanted to share the learnings in a simplified manner. So below article(and corresponding videos) is an attempt to create a good starting point for people who: 1. want to learn about DSU 2. practice some good DSU problems ## Contents 1. Introduction through an illustrative problem (video version: https://youtu.be/JDycPHW4kIs?si=WEp5Ft2jBWp9KnO2) 2. Sample SPOJ Problem and Implementation (video version: https://youtu.be/O4w-aX5mSks?si=vr0XSbyUswcXx-Yv) 3. Upcoming Practice Problems 4. Some Applications and References We will learn about disjoint set data structures and their operations union and find through a sample problem. ## Illustrative Problem Q: Given a undirected $Graph(V, E)$, answer Q queries of the form $(u, v)$ where answer to the query is True if there is a path from u to v, false otherwise. ![image](ht...
observable universe Hence for all practical purposes $\alpha(n) = 4 = constant$. Proof is harder, Hence for all practical purposes $\alpha(n) = 4 = constant$., Hence time complexity is now **$O(V^2 + Q)$** for all practical purposes.

Full text and comments »

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

49.
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...
admissions, and our industrial partners.** Our programmes are both fundamental andpractical. Upon, Our programmes are both fundamental and practical. Upon joining, you start working with

Full text and comments »

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

50.
By miaowtin, history, 3 years ago, In English
Stirling Transformations Hello, Codeforces! **1.** Recently, [user:adamant,2023-07-08] published an excellent blog [Stirling numbers with fixed n and k](https://codeforces.me/blog/entry/117906). There he described an approach to them via generating functions. In this (messy) blog, I want to share one useful technique on the example of Stirling numbers of the first kind. **2.** We start with the definition of the _Stirling transformation_ of a sequence $(x_n)$ is the following mapping $$\displaystyle \{x_n\} \xrightarrow{\quad Stirling\quad} \left\{ \sum_{k=0}^{n} s(n,k) x_k \right\}, $$ where $s(n,k)$ is a first-kind Stirling number. Here we have a place of flexibility for our technique: we can choose any other function $f(n,k)$ instead of Stirling numbers, though it only sometimes turns out to be useful. **3.** The essence of this method is to find the transition formulae between _Stirling transformations_ of a sequence $(x_n)$ and the sequence of its _finite differences_ (one can think of ...
) n^k = \sum_{j=1}^{k} S(k,j) s(N+1, j+1) j!. $$ The last formula is obviously practical. **7, The last formula is obviously practical.

Full text and comments »

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

51.
By waipoli, history, 3 years ago, In English
Eolymp Weekend Practice #2 ![ ](https://eolympusercontent.com/images/mtmk2k9dal4757t0rp5albg0no.png) On [May 19, at 16:00 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Eolymp+Weekend+Practice+%232&iso=20240519T16&p1=1440&ah=2) the second [competition](https://basecamp.eolymp.com/en/contests/l2spv0jiqp3ojahlvtfl997vig) of the **Eolymp Weekend Practice** series will take place. Learn more on the [competition website](https://eolymp.com/en/learning/weekend-practice). ### Format and Difficulty Same as the first round, the competition is primarily aimed at improving practical skills. There will be 5 tasks of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made ear...
as the first round, the competition is primarily aimed at improving practical skills. There will be, Same as the first round, the competition is primarily aimed at improving practical skills. There

Full text and comments »

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

52.
By THE_FOOL_ON_THE_GREY_FOG, history, 9 months ago, In English
Bahnasy Tree [cut] ** بسم الله والحمدلله والصلاة والسلام على رسول الله ** Bahnasy Tree ================== **GitHub Repository:** [Bahnasy-Tree](https://github.com/Mostafa-Bahnasy/Bahnasy-Tree) Bahnasy Tree is a dynamic tree that represents a **sequence of length $N$** (positions $1..N$). It is controlled by two parameters: - $T$ ( **threshold** ): the maximum fanout a node is allowed to have before we consider it "too wide". - $S$ ( **split factor** ): used when splitting; computed from the node size using the smallest prime factor (SPF). If $S > T$, we fallback to $S = 2$. The tree supports the usual sequence operations (find by index, insert, delete) and can be extended to support range query / range update by storing aggregates (sum, min, etc.) and optionally using lazy propagation. --- ## 1) Node meaning and the main invariant Each node represents a contiguous block of the sequence. If a node represents a block of length `sz`, then its children partition this block into...
A common practical choice is:, practical choice is: $$T \approx \sqrt[3]{N}$$ Because plugging $T = N^{1/3}$ into the rebuild term

Full text and comments »

53.
By ICPCNews, 3 years ago, In English
ICPC 2023 Online Challenge powered by Huawei <img src="/predownloaded/60/ed/60eddb18a54159e57dd1ffc836857f58420039bf.jpg" align="right" style="height: 280px;" alt="text"/> #### Hello, Codeforces! From the ICPC 2023 World Finals, we are happy to bring you an exciting online event: **The ICPC 2023 Online Challenge powered by Huawei**,which will start on November 20, 2023 15:00 UTC (UTC+8) In this Challenge, you will have a unique chance: - to **compete with top programmers globally** - to **solve 1 exciting problem** prepared by Huawei - to **win amazing prizes** from Huawei! **It is an individual competition.** #### The ICPC 2023 Online Challenge powered by Huawei: **Start:** [November 20, 2023 15:00 (UTC+8)](https://www.timeanddate.com/worldclock/fixedtime.html?day=20&month=11&year=2023&hour=10&min=0&sec=0&p1=166) **Finish:** [December 4, 2023 15:00 (UTC+8)](https://www.timeanddate.com/worldclock/fixedtime.html?day=04&month=12&year=2023&hour=10&min=0&sec=0&p1=166) **We hope you'll enjoy this ...
resource, and power resource. Due to several practical constraints, the scheduling task is a typical, resources, e.g., time resource, frequency resource, and power resource. Due to severalpractical

Full text and comments »

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

54.
By Wind_Eagle, history, 4 years ago, translation, In English
Codeforces Round #843. One of the contests authors decided to entertain again Hello, Codeforces! Codeforces #843 (Div. 2) round took place not so long ago, and I was one of its authors. When an hour had passed since the contest had started, I (you could say, by tradition) decided to enter the groups with cheaters and make fun of them once again. And one more thing before we begin. [user:peltorator,2023-01-08] has launched a cool blog contest, I encourage everyone to participate: [blog](https://codeforces.me/blog/entry/110840). Next. [user:COOLMAARK,2023-01-13], thanks for writing about the cheaters group, but it was better to do it not in the comments to the announcement, for not to advertise the group. <spoiler summary="Comment under blog"> <a href="https://ibb.co/WtS5ZYz"><img src="https://i.ibb.co/NSwC5HN/pic1.png" alt="pic1" border="0"></a> </spoiler> Now to the point. So, since some cheaters recognize me, I invited [user:try_kuhn,2023-01-08] to help. In all the past cases, there was a problem: yes, sure, cheaters would submit the bad code, bu...
really understand why do you do it. Well, look: there's nothing in it from a practical point of view, why do you do it. Well, look: there's nothing in it from a practical point of view. The rating on

Full text and comments »

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

55.
By chromate00, 3 years ago, In English
Dynamic maintenance of undirected graph in O(1) update/query time (UNBELIEVABLE) #### **Disclaimer: If it was not clear to you already, this article is not about an algorithm which is practical on computare hardware. It is about a "natural" algorithm, working based on physical/real-life principles. It may give you some insights on algorithmic thinking, though. Either way, it's interesting to know this.** In this article, I will discuss about an interesting data structure that can deal with all of the following operations in $O(1)$ time and $O(V+EW)$ space complexity. The operations are: - $link(u,v,w)$: Connect two vertices $u$ and $v$ with an edge of weight $w$. - $cut(e)$: Cut the edge $e$. - $mpath(u,v)$: Find a shortest path between two vertices $u$ and $v$, if one exists. - $connected(u,v)$: Check if two vertices $u$ and $v$ are connected. Here are how each operation works and are implemented. #### "Base structure" Each vertex is an object where you can tie a string on. A plastic ring should work fine. Each edge is a flexible (but not elastic...
is practical on computare hardware. It is about a "natural" algorithm, working based on physical

Full text and comments »

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

56.
By waipoli, history, 15 months ago, In English
Eolymp Weekend Practice #9 ![ ](https://eolympusercontent.com/images/mtmk2k9dal4757t0rp5albg0no.png) On Aug 23, at 12:00 UTC the ninth [competition](https://basecamp.eolymp.com/en/contests/3hdr42rsv164r0602arq87cfu8) of the **Eolymp Weekend Practice** series will take place. Learn more on the [competition website](https://eolymp.com/en/learning/weekend-practice). ### Format and Difficulty Same as the first round, the competition is primarily aimed at improving practical skills. There will be 5 tasks of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will be ranked higher in the leaderboard. This series has a standard duration of two hours. The statements wi...
York, Barcelona, and Pune, builds practical solutions rooted in strong values, curiosity, and a, , the competition is primarily aimed at improving practical skills. There will be 5 tasks of varying, Same as the first round, the competition is primarily aimed at improving practical skills. There

Full text and comments »

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

57.
By awoo, history, 7 years ago, translation, In English
Educational Codeforces Round 87 [Rated for Div. 2] Hello Codeforces! On [contest_time:1354] [contest:1354] will start. **Please notice the unusual time.** 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-15] Glazov, Adilbek [user:adedalic,2020-05-15] Dalabaev, Vladimir [...
positively and negatively, during the COVID-19 global pandemic. Tune in for somepractical examples of, practical examples of how companies are using AI to innovate and disrupt during a time of crisis

Full text and comments »

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

58.
By dedsec_29, history, 4 years ago, In English
[Tutorial] Space-Filling Curves for Mo's Algorithm Ever since I read this [blog](https://codeforces.me/blog/entry/61203), I have been curious to see how space-filling curves other than Hilbert can be used to reduce the run time. In this blog, we will see how Peano curves can help bring down the run time of Mo's algorithm-based solutions. Peano curve generalizes very easily to higher dimensions, so it's worth using for problems based on Mo's algorithm with updates. Prerequisites: [Mo's algorithm](https://cp-algorithms.com/data_structures/sqrt_decomposition.html#mos-algorithm), [Mo's algorithm using Hilbert Curve order](https://codeforces.me/blog/entry/61203), [Mo's algorithm with updates](https://codeforces.me/blog/entry/83630) <br><br> # Relation with TSP In Mo's algorithm, we try to come up with a comparator that can help us sort the queries in such a way that minimizes the total movement of L and R pointers. In other words, if we have $Q$ queries, each of the form $l_i$, $r_i$, then we wish to find such an arrangement of t...
We can take k = 13 for all practical reasons, as $3^{13} \geq 10^{6}$ Time complexity using, practical reasons, as $3^{13} \geq 10^{6}$ Time complexity using Peano order is $O(N \sqrt{Q

Full text and comments »

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

59.
By waipoli, history, 3 years ago, In English
Eolymp Weekend Practice #1 Announcement ![ ](https://eolympusercontent.com/images/952do3ijg14v96mqe36qbbjhhk.png) Next Sunday, [March 24, at 16:00 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Eolymp+Weekend+Practice+%231&iso=20240324T16&p1=1440&ah=2) the first [competition](https://basecamp.eolymp.com/en/contests/n4rbvsi2lt50t4b1h0ccl1oi3c) of the **Eolymp Weekend Practice** series will take place. Format and Difficulty --------------------- As the name suggests, this series of competitions is primarily aimed at improving practical skills. There will be **5 tasks** of varying difficulty, the easiest of which can even be solved by beginners. The distribution of points by tasks is 50-100-200-300-350, with scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one poin...
aimed at improving practical skills. There will be **5 tasks** of varying difficulty, the easiest of, As the name suggests, this series of competitions is primarily aimed at improvingpractical skills

Full text and comments »

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

60.
By RobinFromTheHood, history, 2 years ago, In English
Codeforces Round 974 (Div. 3) Editorial Thank you all for participating in the round! We hope you had fun, as we did thinking of the problems. We would like to again thank our coordinator [user:Vladosiya,2024-09-18] who made many suggestions for improving all problems here, and rejecting others. [problem:2014A] Author: [user:RobinFromTheHood,2024-09-18] <spoiler summary="solution"> This problem requires a simple implementation. Set a variable (initially $0$) to represent the gold Robin has, and update it according to the rules as he scans through $a_i$, adding $1$ to answer whenever Robin gives away a gold. </spoiler> <spoiler summary="code python"> ~~~~~ import sys input = lambda: sys.stdin.readline().rstrip("\r\n") sint = lambda: int(input()) mint = lambda: map(int, input().split()) aint = lambda: list(map(int, input().split())) ############################################### t = sint() for _ in range(t): n,k=mint() a=aint() cur=0 ans=0 for ai in a: if ai >= k: ...
practical and helpful. Like all good parents, Mrs Hood is a worrier.

Full text and comments »

61.
By estoy-re-sebado, history, 3 years ago, In English
CP is hard? Try breaking both hands I recently [broke both of my hands](https://codeforces.me/blog/entry/124704), which forced me to type rather slowly, so I've had to come up with some strategies to optimize my contest performance and so on. To be honest, it wasn't that bad (and it's less noticeable the longer a contest is, as implementation speed becomes less relevant. For example, I got 11th place on a 5 hour individual contest at the Brazilian ICPC Summer School a week ago) but I'm still very happy to announce that they removed both my casts today and I'm finally back to "properly" coding using both hands. I say "properly" in quotes because I'm not really back to 100% yet, as months of immobilization caused my muscles and ligaments to slightly atrophy, which causes some stiffness and pain when I move the affected joints. This is apparently easily solved by a month of rehab :^). Also, because of the way the bone came back together, the index finger on my right hand is now slightly rotated towards my middle fing...
using my hand muscles after rehab, so it should be fine for practical purposes much sooner) My, practical purposes much sooner)

Full text and comments »

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

62.
By Xellos, 12 years ago, In English
Slovak OI, national round 2015 These days (26.-27.3.2015), another national round of Slovak Olympiad in Informatics took place. Just short problem statements for now, I'll write it in more detail and with solutions later: #### 1. #### There's a hazelnut chocolate of size $N\times M$, which can be viewed as a 2D grid. In each cell of the grid, there's a given number of nuts. Two players play a game, alternating turns: each player has to cut off either the bottom row or the rightmost column of the remaining part of the chocolate in her turn (and do with it guess what). The cut off row/column has to contain an even number of nuts. The player that can't make a move loses. Determine the winner if both play optimally. #### 2. #### You have two numbers $N,K$ ($N \gg K$), one input file with $N-K$ distinct numbers between $1$ and $N$ and $2K+2$ empty files. Find the missing $K$ numbers. Your program has a very limited amount of memory (the files' content isn't stored in that memory), just 10 kB for $K \le 10...
problems are theoretical (points for explaining your algorithm), the other 2 practical (typical contest, The first 3 problems are theoretical (points for explaining your algorithm), the other 2practical

Full text and comments »

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

63.
By Pa_sha, history, 2 years ago, In English
Eolymp Weekend Practice #3 ![ ](/predownloaded/da/f3/daf314d0dcdb835fcfcd817a35619436f4008852.svg) We are excited to announce a new [Weekend Practice round](https://basecamp.eolymp.com/contests/1vakgi35sp4cd24th3vp7aekqg) on [August 3, at 19 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Eolymp+Weekend+Practice%233&iso=20240803T18&p1=367&ah=3). This is a ranking competition at Eolymp. #### **Format and Difficulty** Same as in previous rounds, the competition is primarily aimed at improving practical skills. There will be 2.5 hours for 5 tasks of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will be ranked higher in the leaderboard. The statemen...
improving practical skills. There will be 2.5 hours for 5 tasks of varying difficulty, the easiest of, practical skills. There will be 2.5 hours for 5 tasks of varying difficulty, the easiest of which can even

Full text and comments »

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

64.
By Litusiano_, history, 13 months ago, In English
Looking for Teaching Assistants for the Summer in Ethiopia and Jamaica (Expenses Paid) Hey CodeForces, Last year I was a TA in AddisCoder, a non-profit 4-week course to teach programming to the best high schoolers in Ethiopia, some of the alumni have gone to Harvard, MIT or Stanford. As a TA I was there from July 21st to August 22nd (we went one week before the course started to prepare materials, get to know each other and visit Ethiopia!). The role of a TA is to answer 1:1 questions from the students in lab, with the goal of making sure each student grasps the concepts and can go through the exercises by themselves. Some of the typical questions are: Why this doesn't work? I don't understand X, or if X happens why doesn't Y happen? etc. My experience there was amazing, the TAs became very close and really good friends, we had tons of fun together, and with the students too! Another thing we really enjoyed was Ethiopian culture, there were some traditional restaurants that we used to go that showed them and was really fun. The same program is also available...
This is the practical information, I really encourage you to apply!, practical information, I really encourage you to apply! - Both application deadlines are Dec 31st

Full text and comments »

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

65.
By MikeMirzayanov, history, 9 years ago, translation, In English
My Course "Advanced Algorithms and Data Structures" at Harbour.Space University <img src="/predownloaded/c0/52/c052c92fc998292e9705f9924413b581d13515ba.jpg" style="float:right; margin: 0 1em;"/> Hi, Codeforces! This is not an ordinary post from me. This is not an announcement of new features or a championship, but I'm no less enthusiastic. I am glad to inform you that from January 29 to February 16, 2018 I will be giving the course <a href="https://goo.gl/u5nTmk">"Advanced Algorithms and Data Structures"</a> in <a href="https://goo.gl/zDSsaQ">Harbour.Space University (Barcelona, Spain)</a>. The course will be in English. The students of this course will not only be students of Harbour.Space, but is open to all! Who wants to join? This course isn't just for Harbour.Space students, it is also open to Codeforces participants, who will be offered a special price, 1000 EUR. The cost does not include travel or accommodation. <center style="margin:20px;"> <a style="font-size: 24px; padding: 8px 14px; background-color: #673AB7; color: white;" href="https:/...
includes daily lectures and practical exercises. It will not be boring for sure!, story about some algorithms and data structures, a lot of practical exercises and emphasis not only on, In my plans there is a detailed story about some algorithms and data structures, a lot ofpractical

Full text and comments »

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

66.
By MathModel, history, 13 months ago, In English
Invitation to Eolymp Weekend Practice #12 (Difficulty Updated) ### **Hello Codeforces!** ------------------ I'm excited to invite you to [Weekend Practice round #12](https://eolymp.com/en/contests/d1vblrqu112ord1d68l1dh4670) , taking place on [**26th October, at 14:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20251026T1600&ah=2&am=0&msg=Weekend%20Practice%20%2312). This is a **rated** contest at Eolymp. ## Format and Difficulty Same as in previous rounds, the competition is primarily aimed at improving practical skills. There will be $2$ hours for $5$ tasks of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will be ranked higher in the leaderboard. The statements wi...
Difficulty Same as in previous rounds, the competition is primarily aimed at improvingpractical skills, York, Barcelona, and Pune, builds practical solutions rooted in strong values, curiosity, and a, improving practical skills. There will be $2$ hours for $5$ tasks of varying difficulty, the easiest of

Full text and comments »

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

67.
By RomeoFantastik, history, 7 years ago, In English
Breadth First Search (BFS) #### _**In what context does this work?**_ As you probably know, there are two types of graphs in terms of their edges: 1. Graphs with unweighted edges (the cost of traversing/processing/... each edge is 1) 2. Graphs with weighted edges (each edge has a particular cost to be traversed/removed/processed/... particular not necessary unique) There are a couple of classic problems on graphs, but one of the most approached one is to find the **shortest path between some node(we call it the source node) and all the other nodes**. You are going to see this problem in a lot of different formats: - Could be shortest path from a set of nodes to some specific node => which is obviously exactly the same - You can have some "obstacles"(or "bad nodes" or "bad cells") => which is exactly the same but you are not going to include those nodes in your graph/algorithm. - You can have some forbidden actions(for example, you are not allowed to move from some node to another if thei...
#### _**5. Some practical examples:**_

Full text and comments »

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

68.
By MathModel, history, 15 months ago, In English
Eolymp Blitz #1 ### Hello Codeforces ! I'm glad to invite you to the First [**Eolymp Blitz Round #1**](https://basecamp.eolymp.com/en/contests/k4s9lmqljd6ttcsrh0fm71hbec) on [**6th September, at 10:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?day=6&month=9&year=2025&hour=13&min=00&sec=0&p1=166) , a regular programming contest for beginners! This is rated competition for members with rating $\le 1600$. ## Format and Difficulty The competition is meant help you get started with competitive programming and improve your problem solving skills. You will be given **1.5 hours** to solve **5 problems** of easy difficulty. The scoring for each task being block-based, meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block. If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made *earlier* will be ranked higher in the leaderboard...
York, Barcelona, and Pune, builds practical solutions rooted in strong values, curiosity, and a, trends. Our team, based in New York, Barcelona, and Pune, builds practical solutions rooted in

Full text and comments »

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

69.
By chen_zhe, history, 2 years ago, In English
A very brief introduction to Olympiad in Informatics in mainland China This article relies on ChatGPT-4 for translation. China has been hosting the National Olympiad in Informatics (NOI) since 1984. Over the past forty years, it has developed a unique system. I intend to provide a brief introduction to this system for everyone. In mainland China, about 100,000 people prepare for informatics competitions each year. The first step in these competitions is to participate in the CCF Certified Software Professional Junior/Senior (CSP-J/S). CSP-J is for contestants aged 8-14, while CSP-S is for contestants aged 10-18. CSP-J/S is divided into two stages. The first stage tests general and practical computer science knowledge, such as base conversion, principles of linked lists, and reading programs to answer questions. About 40,000 to 50,000 people pass the first stage of CSP-J/S. The second stage of CSP-J/S focuses on programming. The CSP-J second stage exam lasts 3.5 hours, while the CSP-S second stage exam lasts 4 hours, each with 4 problems. Approxi...
first stage tests general and practical computer science knowledge, such as base conversion, CSP-J/S is divided into two stages. The first stage tests general and practical computer science

Full text and comments »

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

70.
By hydroshiba, 5 years ago, In English
Weird sorts #1 — LIS sort I like sorting algorithms very much, and I usually come up with weird ideas for sorting. Sometimes I wonder would those work properly, and now when I finally have the time from social distancing, I decided to start a series on my eccentric ideas &mdash; Weird sorts. As an introductory problem for Dynamic Programming, you all probably know about the Longest Increasing Subsequence problem (LIS). But what if we apply this… to sorting? Today in the first blog of the Weird sorts series, I introduce to you… the LIS sort. #### **Basic idea** The core idea is to extract the LIS from the current array and repeat it until the current array is empty. It can be shown that this process always terminates, because there will always be a LIS that have a size of at least 1, thus at each pass, we will always take at least 1 element away from the array. In the implementation, we will first find the LIS of the array and separate the LIS from the rest of the array. We will then recursively perfo...
think there are any practical uses of this sort. There are many other sorting algorithms that are, To be honest, I don’t think there are any practical uses of this sort. There are many other sorting

Full text and comments »

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

71.
By __Dangcoder__, history, 2 months ago, In English
Fast I/O in C++ # Fast I/O in C++: A Practical Guide In Competitive Programming, Fast I/O is one of those things that people either use everywhere or completely ignore. Usually, `ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);` is already enough, but when the input and output become really large, a custom implementation can make a noticeable difference. The main idea is simple: avoid doing expensive I/O work more often than necessary. A common approach is to read a large block with `fread`, keep it in memory, and parse the characters directly. For output, we do the opposite: write into a buffer and flush it with `fwrite` when the buffer is full. Here is the Fast I/O implementation I currently use: ```cpp typedef long long ll; typedef unsigned long long ull; #define fast #ifdef fast struct FastIO { int prec = 6; char ib[1 << 21], ob[1 << 21], *p1 = ib, *p2 = ib, *p3 = ob; ~FastIO() { flush(); } inline int gc() { return (p1 == p2 && (p2 = ib + fread(ib, 1, 1 << 21, ...
# Fast I/O in C++: A Practical Guide

Full text and comments »

  • Vote: I like it
  • -13
  • Vote: I do not like it

72.
By MathModel, history, 13 months ago, In English
Invitation to Eolymp Blitz #4 ### Hello Codeforces ! I'm glad to invite you to the Fourth [**Eolymp Blitz Round #4**](https://basecamp.eolymp.com/en/contests/7mk1e6onrl4pb69590dkne46j4) on [**19th October, at 10:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20251019T1000&ah=1&am=30&msg=Blitz%20Round%20%234) , a regular programming contest for beginners! This is rated competition for members with rating $\le 1600$. ## Format and Difficulty The competition is meant help you get started with competitive programming and improve your problem solving skills. You will be given **1.5 hours** to solve **5 problems** of easy difficulty. The scoring for each task being block-based, meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block. If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made *earlier* will be ranked higher in the leaderbo...
York, Barcelona, and Pune, builds practical solutions rooted in strong values, curiosity, and a, practical solutions rooted in strong values, curiosity, and a culture that fosters innovation and

Full text and comments »

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

73.
By IamDragonite, history, 11 months ago, In English
Frequency Splitting (Binary Decomposition) Knapsack trick # Frequency Splitting (Binary Decomposition) Knapsack ## Problem Overview You are given a multiset of items. Each item has a **weight** `w`, and weight `w` appears **`cnt` times**. Your task is to determine **which total sums are achievable**. i.e., solve the subset-sum/knapsack *feasibility* problem. **Constraints** * Total sum of all weights `S = Σ (w · cnt) ≤ 1e6` * Many items may have identical weights * Only *reachability* matters (we do not need the number of ways) --- ## Naïve Approach Treat every copy as a separate item and run a standard bitset DP: ``` bitset<MAXS> dp; dp[0] = 1; for (int w : all_items) dp |= (dp << w); ``` Time complexity: * Number of items = `n` * One bitset shift costs `O(S / W)` where `W` is machine word size (typically 64) So total complexity is: `O(n · S / W)` Worst case example: * `n = 1e6`, `S = 1e6` → ~`1.5 × 10^10` word operations → **Time Limit Exceeded** --- ## Key Observations * M...
Overall practical complexity:

Full text and comments »

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

74.
By MathModel, history, 11 months ago, In English
Invitation to Eolymp Weekend Practice #15 (Good Bye 2025 WP) ### **Hello Codeforces!** ------------------ I'm excited to invite you to [Weekend Practice round #15](https://eolymp.com/en/contests/8oa8tul6ip5678mhp3g6pcq4qs) , taking place on [**21st December , at 15:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20251221T1500&ah=2&am=30&msg=Weekend%20Practice%20%2315). This is a **rated** contest at Eolymp. ## Format and Difficulty Same as in previous rounds, the competition is primarily aimed at improving practical skills. There will be $2$ hours for $5$ tasks of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will be ranked higher in the leaderboard. The statemen...
Difficulty Same as in previous rounds, the competition is primarily aimed at improvingpractical, improving practical skills. There will be $2$ hours for $5$ tasks of varying difficulty, the easiest of

Full text and comments »

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

75.
By YipChip, history, 6 months ago, In English
Farey sequence and Approximation of real number First, the Farey sequence $F_n$ represents the set of all completely reduced proper fractions with denominators not exceeding $n$, arranged in ascending order of value. Formally speaking, $$F_n = \left\{\frac{p}{q} \bigg\vert 0 < p < q \le n, \, \gcd(p, q) = 1\right\}$$ The asymptotic size of this sequence is $\sum\limits_{i = 1}^{n} \varphi(n) \sim \frac{3}{\pi^2}n^2 + o(n \log n)$. Regarding the Farey sequence, there are two classic conclusions: - If $\frac{a}{b}$ and $\frac{c}{d}$ are two consecutive elements in $F_n$, then $\frac{a + c}{b + d}$ is also a valid Farey fraction. - If $\frac{a}{b}$ and $\frac{c}{d}$ are two consecutive elements in $F_n$, then their next element $\frac{p}{q}$ satisfies $$\begin{cases}p = \left\lfloor\frac{n + b}{d}\right\rfloor c - a \\ q = \left\lfloor\frac{n + b}{d}\right\rfloor d - b\end{cases}$$ We will only prove the second theorem above. For the Farey sequence of order $n$, two adjacent terms $\frac{a}{b} < \frac{c}{d}$ satisfy...
number in practical problems. Therefore, we can naturally assume $x = \frac{p}{q}$, giving us, that we rarely encounter situations where $x$ is an irrational number in practical problems. Therefore

Full text and comments »

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

76.
By MathModel, history, 14 months ago, In English
Invitation to Eolymp Weekend Practice #10 ### **Hello Codeforces!** ------------------ I'm excited to invite you to [Weekend Practice round #10](https://basecamp.eolymp.com/en/contests/n0qoftbe7p7q59gr3p5fft07kk) , taking place on [**14th September, at 14:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?day=14&month=9&year=2025&hour=17&min=00&sec=0&p1=166). This is a **rated** contest at Eolymp. ## Format and Difficulty Same as in previous rounds, the competition is primarily aimed at improving practical skills. There will be $2$ hours for $5$ tasks of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will be ranked higher in the leaderboard. The statemen...
Difficulty Same as in previous rounds, the competition is primarily aimed at improvingpractical, York, Barcelona, and Pune, builds practical solutions rooted in strong values, curiosity, and a, improving practical skills. There will be $2$ hours for $5$ tasks of varying difficulty, the easiest of

Full text and comments »

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

77.
By MathModel, history, 11 months ago, In English
Invitation to Eolymp Weekend Practice #16 ### **Hello Codeforces!** ------------------ I'm excited to invite you to [Weekend Practice round #16](https://basecamp.eolymp.com/contests/m7f5egpjit7n32822i6ged4m1k) , taking place on [**4th January, at 15:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20260104T1500&ah=2&am=0&msg=Weekend%20Practice%20%2316). This is a **rated** contest at Eolymp. ## Format and Difficulty Same as in previous rounds, the competition is primarily aimed at improving practical skills. There will be $2$ hours for $5$ tasks of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will be ranked higher in the leaderboard. The statem...
Difficulty Same as in previous rounds, the competition is primarily aimed at improvingpractical, improving practical skills. There will be $2$ hours for $5$ tasks of varying difficulty, the easiest of

Full text and comments »

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

78.
By awoo, history, 3 years ago, translation, In English
Educational Codeforces Round 153 [Rated for Div. 2] Hello Codeforces! On [contest_time:1860] [contest:1860] 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="https://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-08-15] Dalabaev, Ivan [user:BledDest,2023-08-15] Androsov, Maksim [user:Neon,2023-08-15] Mesch...
front-end codebase. The intern will have the opportunity to gain practical experience in front-end

Full text and comments »

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

79.
By MathModel, history, 18 months ago, In English
Eolymp Weekend Practice #6 ### **Hello Codeforces!** ------------------ ![ ](https://codeforces.me/predownloaded/da/f3/daf314d0dcdb835fcfcd817a35619436f4008852.svg) I'm very super duper ultra excited to invite you to the first round I have written on my own, [Weekend Practice round #6](https://basecamp.eolymp.com/en/contests/uukkpfajrh5fb729u5p4n5cti8) , taking place on [May 11, at 12:30 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?day=11&month=5&year=2025&hour=15&min=30&sec=0&p1=166). This is a **rated** contest at Eolymp. <strike>At the same time, **The Team Selection Test for the Palestinian Team for IOI 2025** will be taking place in a private mirror, and is open for potential participants </strike>. #### **Format and Difficulty** Same as in previous rounds, the competition is primarily aimed at improving practical skills. There will be 2 hours for 5 tasks of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being...
York, Barcelona, and Pune, builds practical solutions rooted in strong values, curiosity, and a, competition is primarily aimed at improving practical skills. There will be 2 hours for 5 tasks of varying, improving practical skills. There will be 2 hours for 5 tasks of varying difficulty, the easiest of

Full text and comments »

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

80.
By byte2004knight, history, 6 weeks ago, In English
ICPC Prelims — Request to Re-conduct the Contest The recent ICPC Prelims have raised serious concerns regarding the fairness and integrity of the qualification process. There have been widespread reports of teams receiving unfair assistance during the contest. The main issue is not simply that some teams may have cheated. The bigger concern is that **legitimate teams are directly affected by this**. A genuine team that solves problems honestly can lose a qualifying position because another team gained an unfair advantage. Since the Prelims determine who gets to participate in the Regionals, this can mean that a deserving team loses a major opportunity because someone else did not follow the rules. ## The Problem with Relying Only on Plagiarism Checks Post-contest plagiarism checks are important, but they may not be sufficient. Sophisticated cheating may not always result in highly similar code, and even if most cases are detected, **a few undetected teams around the qualification cutoff can still make the final ranking un...
conducting the Prelims again with a completely new problem set and stronger proctoring. Apractical, A practical setup could include:

Full text and comments »

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

81.
By Monogon, history, 20 months ago, In English
[Unsolicited Analysis] On Segment Tree Branching Factor Recently I've been wondering, why do we always use a branching factor of $2$ in segment trees, and are there situations where it would actually be better to use a different branching factor? First, by branching factor I mean the number of children of each node. As we all know, in a segment tree each node represents an interval $[l, r]$ and splits into two children, representing the intervals $[l, m]$ and $[m+1, r]$, respectively, where $m=\lfloor(l+r)/2\rfloor$. But what if we instead split each interval into $k$ intervals, so that each node of the segment tree has $k$ children? In an extreme example, you can set $k=\sqrt n$ and this is essentially the Sqrt tree. In this blog I'd like to explore the analysis of choosing an optimal branching factor, effectively questioning whether we've been doing segment trees wrong all this time. ## First Analysis For simplicity, let's just say that we must support range queries and point updates (no range updates). If our branching factor ...
boils down to the practical implementation details and constant factors., practical implementation details and constant factors. Also, I doubt I'm the first person to do this kind

Full text and comments »

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

82.
By MathModel, history, 14 months ago, In English
Invitation to Eolymp Blitz #3 ### Hello Codeforces ! I'm glad to invite you to the Third [**Eolymp Blitz Round #3**](https://basecamp.eolymp.com/en/contests/u4io2i7j451dd0bnvcr30l5sh8) on [**5th October, at 10:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20251005T1000&ah=1&am=30&msg=Blitz%20Round%20%233) , a regular programming contest for beginners! This is rated competition for members with rating $\le 1600$. ## Format and Difficulty The competition is meant help you get started with competitive programming and improve your problem solving skills. You will be given **1.5 hours** to solve **5 problems** of easy difficulty. The scoring for each task being block-based, meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block. If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made *earlier* will be ranked higher in the leaderboar...
York, Barcelona, and Pune, builds practical solutions rooted in strong values, curiosity, and a

Full text and comments »

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

83.
By MathModel, history, 10 months ago, In English
Invitation to Eolymp Weekend Practice #18 ### **Hello Codeforces!** ------------------ I'm excited to invite you to [Weekend Practice round #18](https://basecamp.eolymp.com/contests/rdm1k2j4hl01t781obt10ku2lo) , taking place on [**1st February, at 15:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20260201T1500&ah=1&am=30&msg=Weekend%20Practice%20%2318). This is a **rated** contest at Eolymp. ## Format and Difficulty Same as in previous rounds, the competition is primarily aimed at improving practical skills. **There will be $\LARGE \color{red}{\textbf{2}}$ hours for $5$ tasks** of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will be ranked highe...
and Difficulty Same as in previous rounds, the competition is primarily aimed at improvingpractical, improving practical skills. **There will be $\LARGE \color{red}{\textbf{2}}$ hours for $5$ tasks** of

Full text and comments »

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

84.
By MathModel, history, 8 months ago, In English
Invitation to Eolymp Weekend Practice #21 (Higher Difficulty) ### **Hello Codeforces!** ------------------ We're excited to invite you to [Weekend Practice round #21](https://console.eolymp.com/en/basecamp/contests/idp1eoul596rpbbmp0mfbbo94g) , taking place on [**29th March, at 08:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20260329T0800&ah=2&am=15&msg=Weekend%20Practice%20%2321). This is a **rated** contest at Eolymp. ## Format and Difficulty Same as in previous rounds, the competition is primarily aimed at improving practical skills. **There will be $\LARGE \color{red}{\textbf{2.25}}$ hours for $5$ tasks** of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will b...
improving practical skills. **There will be $\LARGE \color{red}{\textbf{2.25}}$ hours for $5$ tasks** of

Full text and comments »

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

85.
By MathModel, history, 13 months ago, In English
Invitation to Eolymp Weekend Practice #13 ### **Hello Codeforces!** ------------------ I'm excited to invite you to [Weekend Practice round #13](https://eolymp.com/en/contests/4usu8j57353kj76bh7mj7dv4jk) , taking place on [**9th November, at 14:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20251109T1500&ah=2&am=30&msg=Weekend%20Practice%20%2313). This is a **rated** contest at Eolymp. ## Format and Difficulty Same as in previous rounds, the competition is primarily aimed at improving practical skills. There will be $2$ hours for $5$ tasks of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will be ranked higher in the leaderboard. The statements...
Difficulty Same as in previous rounds, the competition is primarily aimed at improvingpractical, improving practical skills. There will be $2$ hours for $5$ tasks of varying difficulty, the easiest of

Full text and comments »

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

86.
By MathModel, history, 18 months ago, In English
Weekend Practice #7 ### **Hello Codeforces!** ------------------ ![ ](https://codeforces.me/predownloaded/da/f3/daf314d0dcdb835fcfcd817a35619436f4008852.svg) I'm very super duper ultra excited to invite you to [Weekend Practice round #7](https://basecamp.eolymp.com/en/contests/uitnv9tt356kj7di2bqsabpps0) , taking place on [June 7, at 13:00 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?day=1&month=7&year=2025&hour=16&min=00&sec=0&p1=166). This is a **rated** contest at Eolymp. #### **Format and Difficulty** Same as in previous rounds, the competition is primarily aimed at improving practical skills. There will be $2$ hours for $5$ tasks of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a sub...
York, Barcelona, and Pune, builds practical solutions rooted in strong values, curiosity, and a, improving practical skills. There will be $2$ hours for $5$ tasks of varying difficulty, the easiest, practical skills. There will be $2$ hours for $5$ tasks of varying difficulty, the easiest of which

Full text and comments »

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

87.
By MathModel, history, 8 months ago, In English
Invitation to Eolymp Weekend Practice #20 ### **Hello Codeforces!** ------------------ We're excited to invite you to [Weekend Practice round #20](https://basecamp.eolymp.com/contests/4pe1cne4r571j089budf65juq4) , taking place on [**15th March, at 15:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20260315T1500&ah=2&am=0&msg=Weekend%20Practice%20%2320). This is a **rated** contest at Eolymp. ## Format and Difficulty Same as in previous rounds, the competition is primarily aimed at improving practical skills. **There will be $\LARGE \color{red}{\textbf{2}}$ hours for $5$ tasks** of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will be ranked higher...
and Difficulty Same as in previous rounds, the competition is primarily aimed at improvingpractical, improving practical skills. **There will be $\LARGE \color{red}{\textbf{2}}$ hours for $5$ tasks** of

Full text and comments »

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

88.
By Xellos, 13 years ago, In English
Slovak OI, national round 2014: Day 1 This Thursday (27.3.2014), the first (theoretical) day of the national round of Slovak Olympiad in Informatics took place (and I appeared there, much to everyone's surprise :D). So, I bring you the problems and solutions. The second, practical day, can be found [here](http://codeforces.me/blog/entry/11434). **UPD**: The original version of the [problems](http://oi.sk/archiv/2013/sl-2013-3-zad-day1.pdf) and [solutions](http://oi.sk/archiv/2013/sl-2013-3-vzo-day1.pdf) is up. In case you were curious, [final results](http://oi.sk/archiv/2013/sl-2013-3-vys.pdf). In Slovak, of course :D You can have fun trying to find CF handles of some contestants :D **UPD2: The contest is [in Gym](http://codeforces.me/gym/100584) now (both days merged into 1 contest, one problem omitted due to being too theoretical). It only took a year!** **Problems:** [1](#p1) [2](#p2) [3](#p3) **Solutions:** [1](#s1) [2](#s2) [3](#s3) [cut] <a></a> ### <a name="p1"></a>Problem 1: Mr. Bur...
problems and solutions. The second, practical day, can be found [here](http://codeforces.me/blog

Full text and comments »

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

89.
By MathModel, history, 7 months ago, In English
Invitation to Eolymp Weekend Practice #23 ### **Hello Codeforces!** ------------------ We're excited to invite you to [Weekend Practice round #23](https://eolymp.com/en/contests/ge8iibieop4sjashagi3iv5ta0) , taking place on [**26th April, at 08:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20260426T0900&ah=2&am=0&msg=Weekend%20Practice%20%2323). This is a **rated** contest at Eolymp. ## Format and Difficulty Same as in previous rounds, the competition is primarily aimed at improving practical skills. **There will be $\LARGE \color{red}{\textbf{2}}$ hours for $5$ tasks** of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will be ranked higher in the l...
Difficulty Same as in previous rounds, the competition is primarily aimed at improvingpractical skills, improving practical skills. **There will be $\LARGE \color{red}{\textbf{2}}$ hours for $5$ tasks** of

Full text and comments »

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

90.
By Nyaan, history, 6 weeks ago, In English
AAL Contest 001: Let's use segtree! Announcement We will hold [AAL Contest 001: Let's use segtree!](https://atcoder.jp/contests/aalc001), an official educational contest focused on segment trees, on AtCoder. - Contest URL: https://atcoder.jp/contests/aalc001 - Start Time: https://www.timeanddate.com/worldclock/fixedtime.html?iso=20261012T1300&p1=248 - Duration: 300 minutes - Number of Problems: 24 - Problem statements will be provided in both English and Japanese. - This contest is unrated. There will be no rating updates. - Writers: [user:Nyaan,2026-10-10], [user:maspy,2026-10-10] - Tester: [user:Nachia,2026-10-10] ### What Is the AAL Contest? AtCoder offers [AtCoder Algorithm Lectures](https://info.atcoder.jp/entry/algorithm_lectures/index), a series of courses explaining various theories and techniques used in competitive programming. Currently, the lectures are available only in Japanese, but we plan to offer an English version in the future. In addition to courses in the form of explanatory articles and videos...
participants to study specific topics in greater depth and gain practical experience. We hope that you will, topics in greater depth and gain practical experience. We hope that you will use these contests

Full text and comments »

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

91.
By MathModel, history, 7 months ago, In English
Invitation to Eolymp Weekend Practice #22 ### **Hello Codeforces!** ------------------ We're excited to invite you to [Weekend Practice round #22](https://basecamp.eolymp.com/contests/rast2dle4l13n0vnc70f076fao) , taking place on [**12th April, at 10:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20260412T1000&ah=2&am=0&msg=Weekend%20Practice%20%2322). This is a **rated** contest at Eolymp. ## Format and Difficulty Same as in previous rounds, the competition is primarily aimed at improving practical skills. **There will be $\LARGE \color{red}{\textbf{2}}$ hours for $5$ tasks** of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will be ranked higher...
and Difficulty Same as in previous rounds, the competition is primarily aimed at improvingpractical, improving practical skills. **There will be $\LARGE \color{red}{\textbf{2}}$ hours for $5$ tasks** of

Full text and comments »

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

92.
By MathModel, history, 11 hours ago, In English
Eolymp Weekend Practice #32 ### **Hello Codeforces!** ------------------ We're excited to invite you to [Weekend Practice round #32](https://eolymp.com/contests/wp32) , taking place on [**22nd November, at 07:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20261122T1200&ah=2&am=0&msg=Weekend%20Practice%20%2332). This is a **rated** contest at Eolymp. ## Format and Difficulty Same as in previous rounds, the competition is primarily aimed at improving practical skills. **There will be $\LARGE \color{red}{\textbf{2}}$ hours for $5$ tasks** of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will be ranked higher in the leaderboard. The sta...
improving practical skills. **There will be $\LARGE \color{red}{\textbf{2}}$ hours for $5$ tasks** of, previous rounds, the competition is primarily aimed at improving practical skills. **There will be

Full text and comments »

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

93.
By MathModel, history, 4 months ago, In English
Invitation to Eolymp Weekend Practice #25 ### **Hello Codeforces!** ------------------ We're excited to invite you to [Weekend Practice round #25](https://eolymp.com/en/contests/e9obuk4fih5jt0s551abcv3ls0) , taking place on [**9th August, at 11:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20260809T1100&ah=2&am=0&msg=Weekend%20Practice%20%2325). This is a **rated** contest at Eolymp. ## Format and Difficulty Same as in previous rounds, the competition is primarily aimed at improving practical skills. **There will be $\LARGE \color{red}{\textbf{2}}$ hours for $5$ tasks** of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will be ranked higher in th...
Difficulty Same as in previous rounds, the competition is primarily aimed at improvingpractical skills, improving practical skills. **There will be $\LARGE \color{red}{\textbf{2}}$ hours for $5$ tasks** of

Full text and comments »

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

94.
By MathModel, history, 14 months ago, In English
Invitation to Eolymp Blitz #2 ### Hello Codeforces ! I'm glad to invite you to the Second [**Eolymp Blitz Round #2**](https://basecamp.eolymp.com/en/contests/on8n7jfi3t72744m3dd83jrhlc) on [**20th September, at 10:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20250920T1000&ah=1&am=30&msg=Blitz%20Round%20%232) , a regular programming contest for beginners! This is rated competition for members with rating $\le 1600$. ## Format and Difficulty The competition is meant help you get started with competitive programming and improve your problem solving skills. You will be given **1.5 hours** to solve **5 problems** of easy difficulty. The scoring for each task being block-based, meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block. If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made *earlier* will be ranked higher in the leaderb...
York, Barcelona, and Pune, builds practical solutions rooted in strong values, curiosity, and a, practical solutions rooted in strong values, curiosity, and a culture that fosters innovation and

Full text and comments »

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

95.
By JuicyGrape, 22 months ago, In English
Eolymp Weekend Practice #4 ![ ](/predownloaded/da/f3/daf314d0dcdb835fcfcd817a35619436f4008852.svg) We are excited to announce a new [Weekend Practice round](https://basecamp.eolymp.com/uk/contests/3js2kvn1352ap3p2v8rvg5rduk). This is a ranking competition at Eolymp. #### Format and Difficulty Same as in previous rounds, the competition is primarily aimed at improving practical skills. There will be 2 hours for 5 tasks of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will be ranked higher in the leaderboard. The statements will be available in the following languages: English, Ukrainian, French, Spanish, Azerbaijani, Russian. #### Registration You can join ...
improving practical skills. There will be 2 hours for 5 tasks of varying difficulty, the easiest of which, rounds, the competition is primarily aimed at improving practical skills. There will be 2 hours for 5

Full text and comments »

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

96.
By MathModel, history, 20 months ago, In English
Eolymp Weekend Practice #5 ### **Hello Codeforces!** ------------------ _**MathModel Setting Tour Continues!**_ I'm glad to share my tour of problem-setting with you! Recently, I have been setting problems for multiple platforms such as **CodeForces Gym, CodeChef, KEP and RoboContest !**, and more is coming $!$ --- ![ ](https://codeforces.me/predownloaded/da/f3/daf314d0dcdb835fcfcd817a35619436f4008852.svg) We are excited to announce a new [Weekend Practice round #5](https://basecamp.eolymp.com/uk/contests/n2f9epa4510sbe8o3dujppfl44) on [March 16, at 16 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?day=16&month=3&year=2025&hour=19&min=00&sec=0&p1=166). This is a **rated** competition at Eolymp. #### **Format and Difficulty** Same as in previous rounds, the competition is primarily aimed at improving practical skills. There will be 2 hours for 5 tasks of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-base...
improving practical skills. There will be 2 hours for 5 tasks of varying difficulty, the easiest of, primarily aimed at improving practical skills. There will be 2 hours for 5 tasks of varying difficulty

Full text and comments »

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

97.
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...
backed with practical examples and helpful exercises. The chapter on network flow is highly praised by

Full text and comments »

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

98.
By Valiors, history, 8 years ago, In English
[Tutorial] Chinese Remainder Theorem **#IjustWantContribution** Hello Codeforces. In this post, I would like to introduce some of you to a very popular, yet maybe not fully understood technique called Chinese Remainder Theorem (CRT). I have seen many articles that present CRT in a way that lacks practical competitive programming approach (no info about how to handle overflows, how to implement it effectively, what to do when modulos are not coprime etc.) and derivation of the formulas seem like some sort of guesswork. The purpose of this article is to address this issue. **Problem and solution** You are given two pairs (main goal is to solve it for $t$ pairs) of integers $(a_1, n_1)$, $(a_2, n_2)$. **There is no assumption that $n_1$ and $n_2$ are coprime**. Find an integer $x$ that satisfies $$ \left\{ \begin{array}{c} x \equiv a_1 \pmod {n_1} \\ x \equiv a_2 \pmod {n_2} \end{array} \right. $$ This system of congruences implies that $$ \left\{ \begin{array}{c} x = a_1 + n_1k_1 \\ x = a_2 + n_2k_...
that present CRT in a way that lacks practical competitive programming approach (no info about how to, ). I have seen many articles that present CRT in a way that lacks practical competitive programming

Full text and comments »

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

99.
By mukel, 13 years ago, In English
C++11 for programming contests... Updated: 30 December 2013 3:27 CEST (Added a brief introduction to Lambda Functions). The [new C++ standard](http://en.wikipedia.org/wiki/C++11), also known as C++11 and also as C++0x is here, with some sugars for programming contest. I'll update this thread soon with new contents (and better structure). You can use C++11 on Topcoder, Codeforces, HackerRank ... This thread is based on my own experience, so you don't need to dig on the whole C++11 specification to find some useful feature you can use in programming contests. ### The "auto" keyword: Type inference is included in many modern programming languages, and C++ is not behind, the "auto" keyword works like "var" in C#, it only tells the compiler to infer the type for us: So, ~~~~~ map< string, pair< int, int > > somyLongTypeName = map< string, pair< int, int > >(); ~~~~~ Can be shortened to, with no impact on speed, since the type is inferred at compile time: ~~~~~ auto longTypeNamesAreHistory = map< strin...
so practical since we need to implement our own iterator and range classes, but if we have a pre, without any speed penalty. Note that this is not so practical since we need to implement our own

Full text and comments »

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

100.
By Manoonzzz, 5 months ago, In English
[Tutorial] Hexagonal Grids — a complete guide for Competitive Programming # [Tutorial] Hexagonal Grids — a complete guide for Competitive Programming Sooner or later a problem hands you a **hexagonal grid** instead of the friendly square grid, and the staggered rows make neighbors, distances and BFS feel awkward. This guide builds up the whole toolkit from scratch. The punchline you should keep in mind the entire time is this: **a hex grid is a 3D cube grid seen edge-on.** Once you adopt the right coordinates, every hex algorithm becomes a small variation on something you already know from square grids. **Contents** 1. Geometry — what a hexagon *is* 2. The three coordinate systems 3. Conversions between systems 4. Neighbors and diagonals 5. Distances 6. Movement range, intersections, and BFS 7. Line drawing 8. Rotation 9. Reflection 10. Rings and spirals 11. Field of view 12. Hex → pixel and pixel → hex 13. Rounding a fractional hex 14. Storing a hex map 15. Wraparound maps 16. Pathfinding 17. A reusable C++ template 18. Practice pr...
The practical advice: store coordinates as axial, and hide the storage behind a small getter/setter

Full text and comments »

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

101.
By IAmTiredAndSleepy, history, 9 months ago, In English
I store integers as their logarithms, what can go wrong [PART 2] The first part is: [\[PART1\]](https://codeforces.me/blog/entry/151683). Tl;DR; is we're trying to hack solutions which use doubles to store integer values. In this part we will not hack the solution from the Part 1, but hopefully will get closer to it. Instead hacking the initial solution to the original problem, let's try to formulate another, similar but simpler to hack problem. **Problem: "Very Annoying".** Given two sorted arrays `A, B` of sizes $n_1, n_2$ where each element is integer and the following condition holds: $1 \leq \min(A), \min(B)$ and $\max(A), \max(B) \leq n_1 + n_2$. **The task:** if $\prod_{a\in A} a \leq \prod_{b\in B} b$ print `<=`, otherwise print `>`. **Restriction:** $n_1, n_2 \leq 10^6$. Before going further, I invite you to try to solve this problem. If your solution is very short, please try [this test](https://pastebin.com/raw/EdWxrXCG) (it actually contains many tests, so the first line contains the overall tests number). The ...
(which is not too practical as the big-O term dominates here, but from this we can say that the, }{\log B}\right), $$ (which is not too practical as the big-O term dominates here, but from this

Full text and comments »

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

102.
By Michael, 16 years ago, translation, In English
Yandex.Algorithm <img src="http://assets.codeforces.com/images/yandex-algorithm-en-logo.png" style="float:left;padding:0.5em;" img=""> <p> We are glad to introduce <a href="http://company.yandex.com/general_info/yandex_today.xml">Yandex</a> open programming competition "Yandex.Algorithm" hosted by Codeforces. The competition starts on May 4th and will consist of two qualification rounds, two online rounds and a final onsite round. Some of the rounds are created by Yandex employees. The onsite round will be held at the <a href="http://it-edu.mipt.ru/en.html"> Yandex Summer School in Distributed Computing</a><a> in </a><a href="http://phystech.edu/">Moscow Institute of Physics and Technology</a>. </p> <p> Any registered member of Codeforces can participate. There will be 5 rounds, 2 hours each. 15 winners of the last online round will be invited to participate in the Summer School and in the final round of Yandex.Open. 70 best participants will get T-shirts. [cut]</p> <p> The school...
directions. We will also provide a set of practical problems and the infrastructure to solve them on, the next generation research directions. We will also provide a set of practical problems and the

Full text and comments »

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

103.
By Noam527, history, 8 years ago, In English
Tighter time complexity for GCD (prologue) Some time ago this crossed my mind, but I only recalled it now and I think it could be worth a small blog post. This is nothing big and rarely useful but nevertheless, I found it interesting so hopefully you will too (don't expect to find this enriching). It is widely known that the time complexity to compute the GCD (greatest common divisor) of two integers $a, b$, using the euclidean algorithm, is $\mathcal{O}(\log(\min(a,b)))$. <spoiler summary="Short proof"> First notice that for arbitrary integers $x, y$ such that $x \geq y$, we get $x \, \% \, y \leq \frac{x}{2}$. This is due to: - $x \, \% \, y < y$ - $x \, \% \, y \leq x - y$ During the process of the algorithm, suppose we have our current integers $a, b$, $a \geq b$. In the following 2 steps, both of them are being taken modulo a value not greater than them. Using the above observation, after these 2 steps we get 2 integers at most $\frac{a}{2}, \frac{b}{2}$ respectively. Once one of them becomes 0 the...
analysis actually gives a bound that is asymptotically better: $\mathcal{O}(n + \log M)$ (forpractical, )$ (for practical values of $M$, you can refer to this as $\mathcal{O}(n)$ ). Why is that so? again, we

Full text and comments »

Tags gcd
  • Vote: I like it
  • +85
  • Vote: I do not like it

104.
By kr25161, history, 2 months ago, In English
How to improve (Niche advice) prepare your curriculum (concepts, problems, contests etc) to be **high variance** to learn the most. do the vcs to evaluate your improvement. youll improve the fastest this way and is general for any X rated person. Ill explain my thought processes. You dont have to take me for true or false, evaluate possiblities and understand implications of it yourself. What is high variance in our context ? When the things you are trying to improve rating like solving tasks, contests, learning a concept, trying a strategy/trick, judge, reading/not reading editorial etc (many things) are far apart / newer than anything you did earlier. For a beginner doing anything would be strictly be high in variance. But it is not the same with non-beginners and gets worse if you are not aware of your actions. A person who is not a beginner has already tried decent to significant stuff, so theyll have to understand the redundancies in their curriculum, optimize it for more variance, things which you ha...
over time. But the more practical version is that you can generate many compositions of earlier, the more practical version is that you can generate many compositions of earlier ideas, ideas that

Full text and comments »

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

105.
By MikeMirzayanov, 8 years ago, In English
My Course at Harbour.Space University: Advanced Algorithms and Data Structures (January, 2019) <img src="/predownloaded/c0/52/c052c92fc998292e9705f9924413b581d13515ba.jpg" style="float:right; margin: 0 1em;"/> Hi, Codeforces! I am glad to announce and invite you to the second launch of my course on algorithms and data structures. On 7-25 of January, 2019, I will be giving the course <a href="https://goo.gl/u5nTmk">"Advanced Algorithms and Data Structures"</a> at <a href="https://goo.gl/zDSsaQ">Harbour.Space University (Barcelona, Spain)</a>. It will be in English, and is not limited to Harbour.Space students &mdash; anyone is welcome! Who wants to join? This course isn't just for Harbour.Space students, it is also open to Codeforces participants, who will be offered a special price, 1000 EUR. The cost does not include travel or accommodation. <br/> <center style="margin:20px;"> <a style="font-size: 24px; padding: 8px 14px; background-color: #673AB7; color: white;" href="https://goo.gl/u5nTmk">Register for the Course &rarr;</a> </center> The curriculum will i...
include a breakdown of algorithms and data structures, a lot of practical exercises, and emphasis, . The program includes daily lectures and practical exercises. It will not be boring for sure!, The curriculum will include a breakdown of algorithms and data structures, a lot ofpractical

Full text and comments »

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

106.
By Aksenov239, 13 years ago, translation, In English
RCC 2014 WarmUp Analysis I want to say thanks to whom can help me to make this round: for testing [user:pashka,2014-04-18] and [user:cerealguy,2014-04-18], for problems [user:chavit,2014-04-18] and [user:enot.1.10,2014-04-18] and [user:andrewzta,2014-04-18] for supervising. [problem:417A]. Author and realization [user:Aksenov239,2014-04-17]. The first thing, that you need to mention, is that if $k \leq n\cdot m$, then the answer is equal to 0. After that you need to take at least $n \cdot m - k$ people. There's three possibilities to do that: - To consider only main rounds: $c\lceil \frac{n \cdot m - k}{n} \rceil$. - To take additional rounds to the number, which is divisible by $n$: $d(n - (n \cdot m - k) \text{ mod } n) + c\lceil \frac{n \cdot m - k}{n} - 1 \rceil$. - To take only rounds of the second type: $d(n \cdot m - k)$. Also in this problem it is possible to write the solution, which check every possible combinations of the numbers of main and elimination rounds. Solution: [submission...
Let's move on to the practical part. In the first place we will compress coordinates, that any, practical part. In the first place we will compress coordinates, that any value will not exceed $2\cdot10

Full text and comments »

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

107.
By soullless, history, 17 months ago, translation, In English
How Working Out Before an Olympiad or Contest Can Tank Your Performance Hey everyone! Today, after another one of my runs, I started wondering: how do workouts before contests actually affect your thinking? When you hit the gym, go for a run, or play football — you're burning glycogen. That’s a form of stored energy your body makes from carbs. It’s stored in your muscles and liver. Muscle glycogen is used for movement. Liver glycogen keeps your blood sugar stable and literally feeds your brain. During physical activity, you burn both. Your muscles use their own fuel, and your liver starts dumping sugar into your blood to keep your brain from shutting down. So yeah — doing a CF round two hours after playing football is a terrible idea. If you burned all your glycogen yesterday, didn’t eat well, and didn’t sleep enough — your brain the next day runs on fumes. You’ll feel it hard if you played football right before the round: you sit down to code, and your head’s just fog. Easy problems feel heavy, and on the hard ones you’re just staring ...
bunch of practical advice — both for improvement and for getting real results., motivational/educational book where I shared my experience and dropped a bunch ofpractical advice — both

Full text and comments »

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

108.
By Timosh, 2 months 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...
that you can be the best. ### Some practical advice - Don't get stuck thinking about the same idea, ### Some practical advice - Don't get stuck thinking about the same idea. Either continue, or

Full text and comments »

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

109.
By SPyofgame, history, 6 years ago, In English
Knapsack the tutorial -------------------- -------------------- <a name="TOC"></a> > **Teleporter:** **[**[Previous](#status)**]** | | | **[**[Next](#statement)**]** ### <strong> <center style="color:red;"> Table of content </center> </strong> > This blog isnt the best but worth spending time to read it | Teleporter | Description | | :--------------------------------------------------------------- | :-------------------------------------------------------------------------------------------- | | [I. STATEMENT](#statement) | Taking about the problem | | [II. EXAMPLE](#example) | To understand the problem better | | [III. Solution for small number ...
it increases both theoretical and practical time and space complexity significantly

Full text and comments »

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

110.
By Nickolas, 15 years ago, translation, In English
Some thoughts about Surprise/Unknown Language Rounds I'm a huge fan of Surprise/Unknown Language Round competition format. Theoretically I enjoy participating in them, but in practice I mostly run them. What's so special about them that makes me like them so much? 1. They are unusual. At some point of time (which arrived pretty soon for me) traditional competitions pall and become a blur. If I give it a thought, I can clearly remember only a couple of the 80 SRMS and CF rounds I've done. The SRM which featured MooresLaw problem (great challenge phase and my only ever room win), TCO elimination round which I passed thanks to a last-minute submission on 500pt, a GCJ round from back when it was held on TopCoder platform, when I got stuck at input parsing and never got to the actual solution... and that's all. Marathon memory is a bit better, probably because I've participated in fewer of them, and each match took more time and effort. But unusual competitions leave the most lasting and vivid impression. 2. They fit my skills....
3. They have practical use. After the round (before if I'm the writer) the newly learned language

Full text and comments »

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

111.
By Nathan4, history, 2 years ago, In English
I tried different warm-ups before contests... **Hey Codeforces,** I wanted to share my experiences experimenting with different warm-up routines that can help improve focus during contests. I believe this topic is particularly relevant for those whose time zones make contests fall during early mornings or late nights. Getting into the right psychological state before a contest can significantly boost your performance! Personally, I usually participate in contests from 10:35 pm to 12:35 am due to my time zone, which makes it challenging to stay focused, especially in the second half since I’ve typically been awake since 7 am on school days. To address this, I decided to try out various warm-up strategies suggested by experienced members of the community. My goal was to find out which ones work best for me (though, of course, this is subjective!). This blog is divided into the following sections: - Tips on warming up from experienced participants. - My experiences and reflections on trying different warm-up combinati...
best for you! One final practical tip I’d recommend is to experiment with your own warm-up routine, Also, I encourage you to experiment and find what works best for you! One final practical tip I’d

Full text and comments »

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

112.
By Mohammed_Nasserr, history, 6 weeks ago, In English
Invitation to Eolymp Weekend Practice #29 ### Hello Codeforces! We're excited to invite you to the [**Weekend Practice #29**](https://eolymp.com/contests/wp29) on [**11th October 2026, at 11:00 UTC**](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20261011T1100&ah=2&msg=Weekend%2520Practice%2520%252329). This is a rated contest at Eolymp. ## Format and Difficulty Same as in previous rounds, the competition is primarily aimed at improving practical skills. You will be given **$ \color{red}{\textbf{2}}$ hours** to solve **5 problems** of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task is block-based, meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block. If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made *earlier* will be ranked higher in the leaderboard. The statements will be available in the fo...
primarily aimed at improving practical skills. You will be given **$ \color{red}{\textbf{2}}$ hours** to, Same as in previous rounds, the competition is primarily aimed at improving practical skills. You

Full text and comments »

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

113.
By monsoon, history, 7 years ago, In English
A slightly alternative approach for implementation of optimal LCA #### Standard approach One of standard ways to implement constant-time LCA queries on a tree is to preprocess it by doing an Eulerian tour which creates an array of pairs (depth, index) for subsequent vertices visited on the tour, and then reduce an LCA query to RMQ query on a certain fragment of this array: ``` const int N = 1<<LOGN; typedef pair<int,int> pii; int n, T; vector<int> adj[N]; // adjacency lists pii euler[2*N]; // Eulerian tour of pairs (depth, index) int tin[N]; // visit times for vertices void dfs(int v, int par, int depth) { tin[v] = T; euler[T++] = make_pair(depth, v); FORE(i,adj[v]) if (*i != par) { dfs(*i, v, depth+1); euler[T++] = make_pair(depth, v); } } dfs(0, -1, 0); int lca(int u, int v) { return query_rmq(min(tin[u], tin[v]), max(tin[u], tin[v]) + 1).second; } ``` The RMQ problem can be solved with a sparse table, which after $O(n \log n)$ preprocessing allows to answer RMQ queries in constant time: ```...
; } } ``` As we said before, taking $m = \log n$ will give us theoretical $O(n)$ complexity. But forpractical, practical approaches it could be useful to make some empirical tests which value would be the best. For

Full text and comments »

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

114.
By Una_Shem, 7 years ago, translation, In English
Greeting and an interview with the legendary Gennady Korotkevich _Hi, Codeforces!_ My name is Una and recently I became a part of the Codeforces team. Unfortunately, I’m not a programmer, but I’m happy to help with other things. For example, if you win a T-shirt, you'll receive a message asking you to update your personal information, and I do it. ;) As a new person in this area, I am interested in all the news. Recently I read an interesting interview with the legendary Gennady [user:tourist,2019-06-15] Korotkevich on the ITMO news portal. The interview is dedicated to the victory in the “Science and Life” category of the "TOP 50. The Most Famous People of St. Petersburg" award of the Sobaka.ru magazine. Codeforces team join others in congratulating! The editors of the portal allowed to share the article on the Codeforces pages (and we are very grateful for this). Original article published at [http://news.ifmo.ru/ru/university_live/achievements/news/8550/](http://news.ifmo.ru/ru/university_live/achievements/news/8550/). Gennady doesn'...
very practical field, but at some point, he encountered a problem and asked me how to approach it

Full text and comments »

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

115.
By kooal, history, 4 months ago, translation, In English
Last 3 Days: Recursion Finally Stopped Feeling Like Magic Hi everyone! Over the last few days, I focused almost entirely on **recursion**. Before that, I could sometimes write a recursive function by following a familiar pattern, but I did not always understand *why* it worked or how to discover the recursive idea in a new problem. Now I have started approaching these problems differently. Instead of writing code immediately or trying to imagine every function call, I first define the meaning of the state. ## What I now do before writing recursion Before coding, I try to answer four questions: * what exactly the function should do or return; * what the simplest possible case is; * how the answer can be expressed using a smaller problem; * why every recursive call moves closer to termination. For example, if a function solves a problem for $n$, the next call usually works with a smaller value such as $n-1$, $n/2$, or another simpler state. The most important thing is that recursion must not call itself forever. That is ...
## Practical advice for other beginners

Full text and comments »

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

116.
By Tareq_Ali, history, 4 weeks ago, In English
Organized C++ Ordered Set and Multiset Hello everyone! After a long break from competitive programming, I’m back with something I wanted to have ready in my template: an ordered set and multiset with a clean member-function interface. One of the main reasons I created this project was to support the competitive programming community at Latakia University (Previously Tishreen University). I wanted contestants to have a reusable ordered-set and multiset template they can keep in their own templates and adapt to their problems. The project is **Organized C++ Ordered Set**. You can write `ordered_set<int>` or `ordered_multiset<int>`, access sorted ranks with `s[i]`, and use normal-looking bounds and erasure functions. It uses GNU PBDS with a strict comparator, including when duplicates are present. [Code, examples, and complete API reference](https://github.com/Tareq-Ali-1998/Organized-CPP-Ordered-Set) [GitLab mirror](https://gitlab.com/tareqali591998/organized-cpp-ordered-set) ## Usage first ```c++ ordere...
-and-multiset-a-practical-guide-to-gnu-pbds-35aeb7df7efc)

Full text and comments »

  • Vote: I like it
  • -2
  • Vote: I do not like it

117.
By fedimser, 6 years ago, In English
Decomposing unitary matrix into Q# quantum gates *This post is part of the [Q# Advent Calendar 2020](https://devblogs.microsoft.com/qsharp/q-advent-calendar-2020/). Check it out for more great posts about quantum computing and Q#!* Hello Codeforces! In this post I am going to tell you about an algorithm which implements arbitrary unitary matrix as a sequence of elementary quantum gates in [Q# programming language](https://en.wikipedia.org/wiki/Q_Sharp). ## Introduction Algorithms for a quantum computer are usually described as a sequence of [quantum gates](https://en.wikipedia.org/wiki/Quantum_logic_gate) (such as Pauli X, Hadamard or CNOT) acting on register of qubits, followed by a sequence of measurements. Any quantum gate can be described as a [unitary matrix](https://en.wikipedia.org/wiki/Unitary_matrix) acting on a vector representing the current state of a quantum computer. Applying multiple gates multiplies state by a matrix which is matrix product of matrices for individual gates. Therefore, any sequence of quan...
go from proof of that theorem to a practical algorithm. What I needed is a practical algorithm, -qubit gates, and it's hard to go from proof of that theorem to a practical algorithm. What I needed

Full text and comments »

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

118.
By omtheprogrammer1, history, 6 weeks ago, In English
A Community-Driven Problem Solving Guide For Codeforces # A Community-Driven Problem Solving Guide For Codeforces ## Contribute First. Read This After. This blog is **not** a finished tutorial. This blog is an **invitation**. If you have ever opened a Codeforces problem, stared at it for 20 minutes, and thought: > **"I know some algorithms... so why can I still not start?"** then this repository is for you. # **[GitHub Repository](https://github.com/OmReddyEnduri/A-Community-Driven-Problem-Solving-Guide-For-Codeforces-Problems/tree/main)** Inside that repository there is a **`.txt` invitation file**. **Please open the repository, read that file first, and then contribute.** That file explains: - why this guide exists - how we want to build it - how you can add your ideas - why even a small contribution is enough > **Do not wait until you feel "good enough" to help.** > > **If you have struggled with Codeforces problems, you already have something worth sharing.** --- # Why This Exists Codefo...
- short - clear - practical - honest - reusable - beginner-readable

Full text and comments »

  • Vote: I like it
  • -1
  • Vote: I do not like it

119.
By Ahmad1, 9 years ago, In English
My graduation project: Badminton Playing Robot Hello everyone, I have been a permanent participant in competitive programming for many years now. I have been participating in ACM-ICPC for 3 years now, and managed to qualify for the world finals 2017. Now that I have graduated from the department of Computer and Automation Engineering in Damascus University, I want to share with you my graduation project: badminton playing robot. In this project I used many algorithms that I learned from competitive programming (such as BFS, LIS and of course a lot of geometry). We used LIS to filter noise data of shuttle detection and BFS,DFS to implement Indoor Location System for robot tracking and queries like sum of sub-rectangle in an array, and we didn't use any libraries for image processing. I’m so glad that I managed to use the techniques I learned from competitive programming in my project. I'm also delighted that I was able to prove wrong those who say that competitive programming isn’t applicable in practical life, since I w...
isn’t applicable in practical life, since I wouldn’t have been able to do all of this without my, prove wrong those who say that competitive programming isn’t applicable in practical life, since I

Full text and comments »

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

120.
By Murasame-chan, history, 6 months ago, In English
Announcement: Algo Beat Contest 008 & WWOI Round 3 Hello Codeforces! We are excited to invite you to participate in [Algo Beat Contest 008 & WWOI Round 3](https://www.luogu.com.cn/contest/324945), which is a Rated open contest hosted on [Luogu](https://www.luogu.com.cn). The contest will take place on [May 24, 2026 at 14:00 (UTC+8)](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Algo+Beat+Contest+008+%26%E3%80%8CWWOI%E3%80%8DRound+3&iso=20260524T14&p1=33&ah=4). Official English statements will not be provided, you may use AI for translation. > **Clarification:** Although our contest name is "Algo Beat Contest", this contest is completely independent and has no affiliation whatsoever with AtCoder Beginner Contests. ## Contest Details - **URL:** https://www.luogu.com.cn/contest/324945 - **Format:** IOI rules (partial scoring/subtasks are enabled) - **Duration:** 4 hours - **Problems:** 4 algorithmic tasks - **Difficulty:** Roughly ranges from Luogu Yellow (≈ CF \*1200) to Purple (≈ CF \*2400) - **Rules:** A...
] for testing the problems and providing practical feedback. ## Prizes We are offering a total, ], [user:joe_zxq,2026-05-22] for testing the problems and providing practical feedback.

Full text and comments »

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

121.
By TheSensei, history, 16 months ago, In English
Eolymp Weekend Practice #8 ### **Hello Codeforces!** ------------------ ![ ](https://codeforces.me/predownloaded/da/f3/daf314d0dcdb835fcfcd817a35619436f4008852.svg) I'm very super duper ultra excited to invite you to [Weekend Practice round #8](https://basecamp.eolymp.com/en/contests/8g2aerj14903raif9v7veir3m8) , taking place on [July 13, at 12:00 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?day=13&month=7&year=2025&hour=15&min=00&sec=0&p1=166). This is a **rated** contest at Eolymp. <h2>NOTICE THAT THE ROUND TIME SCHEDULE GOT EARLIER BY 1 HOUR</h2> #### **Format and Difficulty** Same as in previous rounds, the competition is primarily aimed at improving practical skills. There will be $2$ hours for $5$ tasks of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between...
York, Barcelona, and Pune, builds practical solutions rooted in strong values, curiosity, and a, as in previous rounds, the competition is primarily aimed at improving practical skills. There will, improving practical skills. There will be $2$ hours for $5$ tasks of varying difficulty, the easiest

Full text and comments »

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

122.
By Connectus, history, 13 months ago, In English
Eolymp Weekend Practice #11 ![ ](https://codeforces.me/predownloaded/ea/14/ea14e0bf3a613d1af2a23d5f99953b2fa30908af.png) On Oct 11, at 15:00 UTC the 11-th [competition](https://basecamp.eolymp.com/en/contests/ef86c6tdpp7urd2s606psc6o6k) of the Eolymp Weekend Practice series will take place. Learn more on the competition [website](https://basecamp.eolymp.com/en/contests/ef86c6tdpp7urd2s606psc6o6k). ### Format and Difficulty Same as the first round, the competition is primarily aimed at improving practical skills. There will be 5 tasks of varying difficulty, the easiest of which can even be solved by beginners. The scoring for each task being block-based (meaning points are awarded for each block of tests separately, and only if the solution passes all tests in the block). If there is a tie between two participants, the one whose last productive submission (i.e., a submission that added at least one point) was made earlier will be ranked higher in the leaderboard. This series has a standard duration...
Difficulty Same as the first round, the competition is primarily aimed at improvingpractical skills, York, Barcelona, and Pune, builds practical solutions rooted in strong values, curiosity, and a, Same as the first round, the competition is primarily aimed at improving practical skills. There

Full text and comments »

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

123.
By kobus, history, 8 years ago, In English
Using time complexity to estimate running time I was looking for a practical guide on how to actually apply time complexity to know what will TLE or not and found nothing. Mostly what's out there are charts on what time complexities are reasonable given the value of n, but that's a heavy oversimplification. In this guide I will try to explain how to estimate the running time of your code. First of all, let's understand what time complexity actually means. Formal definitions aside, we can say that if a code is O(f(n)), the time consumption of that code should be something like C*f(n)+S where C is a constant and S is something small compared to the rest. So let's say your code consists of reading n integers and then iterating through all pairs of them. Your time consumption should be something like n + n^2, for reading and going through the pairs, respectively. The notion that time complexity gives us is that if your code is too slow, it is probably because of the n^2 bit, not the n one. That's why we will mostly focus on the ...
I was looking for a practical guide on how to actually apply time complexity to know what will TLE

Full text and comments »

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

124.
By aakarsh-2004, history, 10 months ago, In English
Level up to Specialist. Some tips and tricks! Hey everyone! I finally hit Specialist in the last Div 3 round! However, this wasn't an overnight thing. It has been almost 1.5 years since I started my CP journey. To be honest, my growth was undeniably slow, mostly due to some specific mistakes I made along the way. I’m writing this for my fellow coders who are grinding every day but seeing no results. I’ve been there, and I want to help you break through that wall. I’ve tried to keep this practical and straight to the point. Here are the 5 lessons I learned the hard way: * **Rating is Just a Number (Seriously)** The first and most important step is to change your relationship with that number on your profile. For a long time, I was obsessed with my rating. Even when I was Grey or Green, I put immense pressure on myself to "rank up." This actually backfired; my brain couldn't perform at its fullest because it was too busy worrying about the results rather than solving the problem. Once I started giving less importanc...
there, and I want to help you break through that wall. I’ve tried to keep this practical and straight, you break through that wall. I’ve tried to keep this practical and straight to the point. Here are

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it

125.
By SannikovDmitry, 8 years ago, translation, In English
New competition Mail.Ru Cup. We invite you to participate! ![ ](/predownloaded/13/b3/13b34cb749c0c7afb06d55eceae891af075a93fd.png) Mail.Ru Group together with Codeforces invites everyone to take part in the new Mail.Ru Cup competitive programming championship. Rules ----- The championship is holding on the Codeforces platform in the format of four rounds: one practice round and three main rounds. Each round is open to all comers. There are no restrictions on participants in any of the rounds. The practice round is intended for familiarization with the championship platform, participation in it is optional, the results of performances in the practice round do not affect the results of participation in the championship. It is unrated, the duration is 72 hours. All three main rounds are independent, the results of participation in each of it do not affect the possibility of participation in next rounds. A competitor may take part in any number of main rounds. Each main round lasts 2.5 hours. All of them are open for everyone and r...
the same time acquire unique practical experience. To help talented programmers to get a decent, , ecology, and others), learn modern technologies and at the same time acquire uniquepractical

Full text and comments »

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

126.
By Millad, 11 months ago, In English
Repovive Roadmap(DP + Graph Theory) Hello everyone, We have prepared two roadmaps for learning Dynamic Programming and Graph Theory published them on Repovive: https://repovive.com/roadmaps/dynamic-programming We tried to go over topics from basic to advanced, starting from Recursion and DP Fundamentals up to Aliens Trick، Slope Trick, and Broken Profile DP. For each topic, we provide problem walkthroughs, and each section also includes a dedicated problemset where you can suggest additional problems too. https://repovive.com/roadmaps/graph-theory For Graph Theory, we follow a similar progression, starting from fundamental topics such as graph representations and traversals, and gradually moving toward more advanced techniques including shortest path algorithms, flow networks, and matching. Each section provides guided problem walkthroughs to help reinforce understanding and practical application. Each section also specifies a range of problem difficulties covered by the questions solved in that section...
provides guided problem walkthroughs to help reinforce understanding and practical application. Each, to help reinforce understanding and practical application.

Full text and comments »

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

127.
By DrunkMaster, 5 years ago, translation, In English
Editorial for Summer programming olympiad #1 [contest:329695] Editorial in PDF: https://drive.google.com/file/d/1KL723lzYE8tVlgIUveMt2lSWDbd4nccv/view?usp=sharing [problem:329695A] Task author: [user:Jugo,2021-06-09] Translate author: [user:MatesV13,2021-06-09] Solution author: [user:Jugo,2021-06-09] <spoiler summary="tutorial"> Let's just go through all the numbers on the segment $[l; r]$ and, by dividing the numbers by 2, 3, 5 while we can, check whether the resulting number is one (in other words, there are no dividers larger than 5). The asymptotics of this solution will be $n \cdot \sigma(n)$, where $\sigma(n)$ is the number of twos, triples and fives in the factorization of the number. Since this number is fairly small (around 3, so there will be no problem with time limit. </spoiler> <spoiler summary="code"> ~~~~~ #include <bits/stdc++.h> #define int int64_t using namespace std; bool f(int n){ while((n & 1) == 0) n >>= 1; while(n % 3 == 0) n /= 3; ...
practical uses can be considered equal to 4 or 5.

Full text and comments »

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

128.
By tarunya.programmer, 10 months ago, In English
100 Problems, Countless Lessons: My Competitive Programming Journey So Far ## 100 Problems: A Small Personal Checkpoint Hey everyone, This is not a milestone post. It is more like a diary note. A few days ago, I noticed that I had crossed 100 solved problems on Codeforces. On Codeforces, that number is not impressive at all. Many people solve that much very quickly. But for me, it felt worth pausing for a moment. ===================================== ### Why This Matters To Me When I joined Codeforces four months ago, I was completely lost. I had: - zero competitive programming experience - a Python IDE - a cup of chai - and a lot of confusion Even opening a Div2 contest felt intimidating. Not because the problems were impossible, but because I did not know how to think in that environment. So this post is not about achievement. It is about acknowledging a small personal win: consistency. ===================================== ### What Changed In the beginning, everything felt overwhelming. - What is Div2? - ...
contests, I use a small but practical Python template: ``` Author: tarunya.programmer import, To reduce friction during contests, I use a small but practical Python template:

Full text and comments »

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

129.
By AZATHOTH, history, 3 years ago, In English
Efficient Range Updates Using Delta Encoding ### **Efficient Range Updates Using Delta Encoding** In programming, we often encounter problems where we need to update a range of elements in an array multiple times and then retrieve the final state of the array efficiently. A straightforward approach would be to iterate through the range for each update, but this can be inefficient, especially for large arrays and numerous updates. Delta encoding provides an elegant solution to this problem. #### **What is Delta Encoding?** Delta encoding is a method of storing or transmitting data in the form of differences (deltas) between sequential data points rather than complete data points. This technique can significantly reduce the amount of data to be stored or transmitted, especially when the data points are similar or change incrementally. #### **Applying Delta Encoding to Range Updates** In the context of updating ranges in an array, delta encoding can be used to efficiently perform multiple range updates. The idea is to...
for range updates with a practical example. #### 1. **Initial Setup** Suppose we have an, Let's break down the process of using delta encoding for range updates with a practical example.

Full text and comments »

  • Vote: I like it
  • -9
  • Vote: I do not like it

130.
By EnumerativeCombinatorics, history, 10 years ago, In English
Youtube channel: Tips for programming contests Hello coders, Today I'll introduce my new YouTube channel: [Link](https://www.youtube.com/channel/UCwsapfci2p1oDVO4Q2sJOQw) In this channel, I'll introduce many little tips that is not on textbooks but useful for problem solving. I've solved 4000+ programming problems overall and I got a lot of practical knowledge from that, so I want to explain various kind of educational approaches from my experiences. I'm not explaining how typical ones (such as segment trees or flow algorithms) work because a lot of better videos are already on YouTube, and I'm focusing on tricky techniques (and I'm sure that many redcoders know about these techniques). I think that most of those can be applied for only specific several problems, but those tips are very important to get higher places. **However, I'd like you to know that I began this channel for improving my English, so I'm sorry for my (currently) very poor English. I hope that I'll be better soon.** Feel free to comment about my video...
of practical knowledge from that, so I want to explain various kind of educational approaches from, solving. I've solved 4000+ programming problems overall and I got a lot of practical knowledge from

Full text and comments »

131.
By vomanos, history, 2 years ago, In English
To catch an AI cheater ## Introduction As the use of AI becomes an issue that will increasingly spark debate within competitive programming communities, we aim to provide some general advice on catching cheaters using AI through examining a specific user and their submissions on yesterday's contest [Codeforces Round 972](https://codeforces.me/contest/2005). As stated by [user:MikeMirzayanov,2024-09-15], it is unacceptable to use AI during contests save for certain cases outlined by this [blog](https://codeforces.me/blog/entry/133941). We examine [user:hypeskynick,2024-09-15] and his submissions both prior to yesterday's contest as well as during the contest. We discuss four main categories with evidence in each category that illustrate suspicious behavior, and the likely misconduct of the user. We examine this user since he appears to be genuine on the surface, unlike blatant cheaters, yet when examined deeper his integrity disappears. As a means of comparison, we will refer to [user:AryanDLuffy,2024...
of correctness and formality that is required in more practical applications of programming (which is, will often exhibit some sort of correctness and formality that is required in morepractical

Full text and comments »

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

132.
By brownfox2k6, history, 4 years ago, In English
8 ways to be BAD at programming Hello, Codeforces! Currently, there are many blogs about how to be good at programming, their practice methods are super useful. Today I will write oppositely, I will show you ways to be bad at programming. I guarantee, if you follow what I will mention below, you will be bad forever, to the point of not being able to get better :) P/s: -[Original post](https://phambinh.net/bai-viet/cach-de-hoc-dot-lap-trinh/)- Don't downvote it :( I just write for fun #### 1. Spend as little time as possible "Dilligence in place of intelligence". If you spend half an hour improving your programming skill, you cannot be bad. Instead, you should spend time doing other stuff like surfing Facebook or playing games. In case you have nothing to do, you would better go to sleep. One more thing to keep in mind, don't enter the programming forums, don't subscribe YouTube channels or reading blogs about programmings, because if you do that, you will be easy to gain knowledge and cannot be bad. ##...
teachers, brothers, sisters or friends, ... are those who have had practical experience, they know, practical experience, they know how to learn programming well. If they give you advice, just do the opposite

Full text and comments »

  • Vote: I like it
  • -27
  • Vote: I do not like it

133.
By NonTourist, 5 months ago, In English
AlgoRadar: an explainable problem recommendation system for CP practice # AlgoRadar &mdash; an explainable recommender for CP practice Hello Codeforces! I built **AlgoRadar**, an open-source recommendation/analytics system for competitive programming practice. Repository: [Link](http://github.com/drawmebaaz/AlgoRadar) The goal is simple: > Given my public submission history, what should I practice next? The system uses Codeforces as the strongest source because it provides public submissions, verdicts, problem ratings, tags, rating history, and problemset metadata. It also has adapters for LeetCode and CodeChef, but Codeforces is the main difficulty anchor. --- ## 1. Main idea AlgoRadar converts public CP activity into explainable features and ranks unsolved problems by **learning value**, not just rating or popularity. Rough pipeline: ``` handle -> fetch public submissions/problem metadata -> build profile/tag/difficulty features -> classify focus areas -> estimate solve probability -> rank candidate problems -> buc...
It is not meant to be an oracle. It is meant to be a practical tool for deciding what to practice, practical tool for deciding what to practice next. I would appreciate suggestions, especially on

Full text and comments »

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

134.
By Karan2116, history, 11 years ago, In English
Everything About Dynamic Programming **I decided to gather some good material on the web related to DP and found some good explanation by svg on topcoder forums..Hence wrote this blog.Will format it when i get time.** ![ ](http://codeforces.me/predownloaded/2c/af/2caf058ab9cf6db0f875c573fb0d6e73de572122.png) **Problem:** About 25% of all SRM problems have the "Dynamic Programming" category tag. The DP problems are popular among problemsetters because each DP problem is original in some sense and you have to think hard to invent the solution for it. Since dynamic programming is so popular, it is perhaps the most important method to master in algorithm competitions. The easiest way to learn the DP principle is by examples. The current recipe contains a few DP examples, but unexperienced reader is advised to refer to other DP tutorials to make the understanding easier. You can find a lot of DP examples and explanations in an excellent tutorial Dynamic Programming: From novice to advanced by Dumitru. The purpose ...
with the numerical answer. In practical usage the answer without a solution is useless, though in

Full text and comments »

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

135.
By evergreen1124, history, 5 months ago, In English
Meritocracy, Intelligence, and the Uncomfortable Question at the Heart of Competitive Programming Competitive programming communities are built upon a deeply appealing idea: that performance is earned. The premise is straightforward. Those who study more, practice more, and persist longer will eventually rise. Ratings, in this view, are not merely measurements of skill but reflections of effort, discipline, and commitment. It is a narrative that resonates because it feels fair. Everyone enters the system under the same rules, and the number beside their name appears, at least on the surface, to reflect what they have achieved. Yet beneath this narrative lies a question that is rarely discussed directly, perhaps because it is uncomfortable to even phrase correctly. To what extent do ratings reflect improvement over time, and to what extent do they simply reveal what was already there in the first place? Anyone who has spent enough time in the community has witnessed a pattern that is difficult to ignore. Two participants may begin learning at roughly the same time, use similar...
philosophy of meritocracy, the thread will eventually converge on the same practical conclusion that, the same practical conclusion that nearly every competitive programming discussion reaches:

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it

136.
By Stealthinator, 6 months ago, In English
Despite everything, its still MEX [Click on this to see question](https://codeforces.me/contestInvitation/091418178d79bff203861899b62f6696a7c39c67) [problem:694600A] <spoiler summary="Hint 1"> What is the maximum possible $MEX$? find an upper bound for the final $MEX$. </spoiler> <spoiler summary = "Hint 2"> Since size of $c$ is $n$. The $MEX$ of $c$ can be at most $n$ (why?). Hence each index $i$ $(1 \le i \le n)$, can be categorized into one of three categories: - ($a_i \ge n$ and $b_i \ge n$): such indices can be ignored as the choice here doesn't matter, neither will contribute to the $MEX$ - ($a_i \ge n$ and $b_i \lt n$) or ($b_i \ge n$ and $a_i \lt n$): when exactly one of $a_i$ and $b_i$ is less than $n$, the choice is obvious, set $c_i$ to the element less than $n$ - ($a_i \lt n$ and $b_i \lt n$): this is the non-trivial case. Try working out the example test cases manually. What do you observe? </spoiler> <spoiler summary="Hint 3"> Work through the following example: $$a = [0, 2, ...
and for all practical purposes $\alpha (n) \le 4$, which reduces our final time complexity to, inverse ackermann function and for all practical purposes $\alpha (n) \le 4$, which reduces our final

Full text and comments »

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

137.
By TryOmar, history, 4 years ago, In English
C++ '&' Operator: Understanding the Difference Between Memory Addresses and Aliases (References) `&` operator function differently in the context of variable assignment and memory address ```cpp int y = 30; int &x = y; // What is x? cout << (&x); // What are we printing? ``` In the above example, the `&` operator is used for two distinct purposes and is important to note that the usage of `&` in `int &x = y;` is not the same as in `cout << (&x);` What is the difference between the two usage and how they work internally? The `&` operator in C++ has two main uses: as an alias (reference) and as a memory address. First, let's explain the following code: ```cpp int main(){ int y = 30; // Declare and initialize a variable y with the value 30 int &x = y; // Declare a reference variable x that references y cout << (&x); // Print the memory address of x (which is the same as the memory address of y) } ``` Here, `int &x = y` declares a reference variable `x` that refers to the existing variable `y`. This means that `x` and `y` are aliases for the sa...
while solving a problem I made a practical application for the reference function, it can be, I made a practical application for the reference function, it can be helpful (I'm no sure if

Full text and comments »

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

138.
By not_amir, 2 years ago, In English
Maintaining mst with online edge insertions — no LCT needed This blog is about maintaining mst with online edge insertions (or msf &mdash; minimum spanning forest to be exact) by using a data structure I came up with in $O(\log n)$ for edge insertion. although this problem can solved quite easily for anyone who knows LCT (link-cut tree), coding LCT is not really practical and has really bad constants. The data structure I present has very good constants because as you'll see all it does is manipulation on arrays. For obvious reasons that will be shown later I have called this data structure "weighted DSU". **Warmup problem** ================== The problem is stated as follows: you are given an undirected graph where each edge has a time $t_i$. you are asked to answer queries of the form "what is the smallest time t such that you can get between u and v with all edges in time $<= t$". This problem is analogous to calculating the msf of the graph where the weights are the times and being able to answer what is the maximum on the simple path ...
really practical and has really bad constants. The data structure I present has very good constants

Full text and comments »

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

139.
By MikeMirzayanov, 8 years ago, In English
Harbour.Space University and Remy Robotics: Master's in Robotics programme scholarship <img src="https://assets.codeforces.com/images/artboard-2_1.png" style="float:right; margin: 0 1em 1em 1em; width:450px;"/> My friends from Harbour.Space and Remy Robotics asked to publish the news. I am excited and glad to do it, because for our community this is a true exclusive offer. In short, they offer to study robotics in Barcelona, paying for your studies and even with a scholarship! It's so cool! Here is a direct speech from Harbour.Space. = Hi Codeforces! We are excited to announce our new Master’s in Robotics programme scholarship, which will be paired alongside an internship with our partner Remy Robotics! The programme will begin on January 7th, 2019, at our university in Barcelona, Spain. Harbour.Space’s Robotics programme is the bridge between a personal interest in the world of Robotics, Artificial Intelligence, and a top-level professional future in one of the most exciting and fastest growing fields of technology. Students who enter the programme w...
effective manner), or CV Engineers (industrial manufacturers of robots, based more onpractical, robots, based more on practical experience). Students will learn the Design and Control for Dexterous

Full text and comments »

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

140.
By Zlobober, 9 years ago, translation, In English
Yandex.Algorithm 2018 Round 3 Hi everybody! [Tomorrow at 12:00 UTC](https://clck.ru/CgTFb) there will be the third round of Yandex.Algorithm 2018. You can enter contest from the [Algorithm main page](https://contest.yandex.ru/algorithm2018/). This round is written by me with a great help of [user:GlebsHP,2018-04-07] and everybody who was testing the round. While solving the problems, you will be helping some of my colleagues here at Yandex to deal with some practical (or not) situations. Good luck to everybody! <center><h2><a href="https://contest.yandex.com/algorithm2018/contest/7989/enter/">Enter the contest</a></h2></center> **UPD**: Round is over! Congratulations to [user:Merkurev,2018-04-08], [user:j_______________________,2018-04-08] and [user:Um_nik,2018-04-08] who got first three places in the standings. The elimination stage is over and we can now find out who are the contestants that are going to compete in the Algorithm Finals in Saint Petersburg: [elimination scoreboard](https://contest.yan...
Yandex to deal with some practical (or not) situations. Good luck to everybody!, colleagues here at Yandex to deal with some practical (or not) situations. Good luck to everybody

Full text and comments »

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

141.
By alan-c, 11 months ago, In English
C++ Modular Integer Template Performance Analysis A _modular integer template_ implements basic integer operations that wrap around when they reach some modulus. There are many ways to do this, but some ways are slower. This article compares the performance of different methods. ## Summary For the best performance: - Addition of two modular integers should be done **without** modulo operations. - Any modulus operation (using %) should be done using **unsigned** integer types. Speed comparison, extensions, and other operations are discussed later. ## Basic template For simplicity, I'll use a fixed prime modulus $M$. If you need multiple moduli at the same time then you can extend this using a c++ template parameter. This is the simplest and easiest to implement, but it's slower. ~~~~~ using ll = long long; struct BasicMint { int n; BasicMint(ll m = 0) : n(m % M) {} BasicMint operator+(BasicMint m) { return BasicMint(n + m.n); } BasicMint operator*(BasicMint m) { return BasicMint((ll)n * m.n...
binary exponentiation by FLT: $\operatorname{inv}(b) \equiv b^{M-2}$. For practical usage, you would, For practical usage, you would name the struct something like Mint instead of FastMint. Below is a

Full text and comments »

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

142.
By BERNARB.01, 5 years ago, In English
Multiple segment trees vs. One big segment tree Sometimes you might need to use multiple segment trees over some set of elements, for example, you have to answer range queries on a single array from a lot of small arrays or to make a segment tree on a tree to answer path queries. I knew that in cases like these, it might be more efficient to use a single segment tree to represent everything, for example, instead of building a segment tree on each one of the small arrays, you represent each array as a continuous range in one big segment tree. I've used this whenever I needed an unknown/big number of segment trees, thinking that this is more efficient and uses less memory, but sometimes it wasn't the case as doing this has made my code slower, I once ended up doing a binary search on every query to find the actual borders of the queries, which I could've avoided by making a separate segment tree on each array. I've thought about the advantages of using this technique, but I really couldn't find any. I've found that, in bot...
So what I want to ask is, when does this technique give me real practical advantages to not use

Full text and comments »

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

143.
By SuprDewd, 13 years ago, In English
TCR trick: Line hashes Hey guys. I wanted to share a neat trick regarding the Team Contest Reference (TCR) that we're allowed to bring to ICPC contests, for example. I got the idea after spending many minutes debugging a Convex Hull implementation I wrote directly from my TCR in the middle of a regional contest. I knew the implementation in the TCR was correct, but I had probably made a typo somewhere in the code when I was inputting it, but it was impossible to find. The idea is to store hashes of the code in the TCR. For example, for each code snippet in the TCR we could store its MD5 sum. Then after typing up some snippet from the TCR, we can check that the MD5 sum of the file matches the MD5 sum in the TCR. This is however not very beneficial, since we can only check whether or not our code is identical. We don't get any information about where the error was made. Another idea is to store the MD5 sum of each line of each code snippet in the TCR. This can take up much space, but the first couple of ...
a long time, and is therefore not practical either., practical either. A much better idea is to do the following. After the $i$th line of the code we

Full text and comments »

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

144.
By A2SV_Group6, history, 18 months ago, In English
A2SV G6 — Round #14 (Editorial) [Here](https://codeforces.me/gym/608931) is the contest link. #### [A. Funny Game](https://codeforces.me/gym/608931/problem/A) <spoiler summary = "Hint"> 1 sounds like the minimum value we can get. Why? Is it always true? </spoiler> <spoiler summary = "Solution"> When n ≤ 2, we can do nothing. When n ≥ 3, since , n - 1 isn't a divisor of n, so we can choose it and get 1 as the result. </spoiler> <spoiler summary="Code"> ```python3 n = int(input()) if n == 2: print(2) else: print(1) ``` </spoiler> #### [B. Metshaf Exchange](https://codeforces.me/gym/608931/problem/B) <spoiler summary="Problem Summary"> You're given a permutation p of n elements. Each person i gives their item to p[i]. The process continues daily. For each person, compute the number of days it takes to get their own item back. This is equivalent to finding the length of the cycle each element is part of </spoiler> <spoiler summary="Hint 1"> Can u check the con...
inverse Ackermann function. For practical input sizes, α(n) is very small, often treated as a constant.

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it

145.
By Le_Gusto, history, 3 years ago, In English
Thoughts on Round 933 (Div. 3) + Pupil rank Hey, It's been a while since I last made a blog, mostly due to university really ramping up the intensity and having to move into a new place. I couldn't make it to a bunch of rounds due to mandatory practicals or had to be late and lost rating, but I have finally managed to break past gray rank. In general, this round went really smoothly for me. It felt like all the solutions to the questions from A-D came naturally, and I was able to implement them quickly after working through the problems for a few minutes. Although for A, I tried to come up with some efficient algorithm at first, but then I realized that it's the first problem of a div. 3 and just bruteforced it. I had around an hour and a half to solve any of the problems E-G, however, it didn't go too well. For E, I thought that it's most likely DP and sliding window for finding the correct rows, but I couldn't think of any way to implement it, as you would have to consider at most 2*10^5 cases for each recursive step, wh...

Full text and comments »

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

146.
By Michael, history, 10 years ago, translation, In English
Advanced Algorithms and Complexity Course I [wrote](http://codeforces.me/blog/entry/44924) in May about the launch of [Data Structures and Algorithms](https://goo.gl/jV5fbe) Specialization at Coursera. In September, the [Advanced Algorithms and Complexity](https://goo.gl/TalA42) Course of this Specialization was launched, and I'd like to tell you more about it. Course topics: 1. Network Flows (Ford-Fulkerson and Edmonds-Karp algorithms). 1. Linear Programming (the Simplex Method). 1. NP-completeness (theory, reductions, solving NP-complete problems using SAT-solvers). 1. Coping with NP-completeness (bruteforce optimizations, solvable cases, approximation algorithms). 1. Streaming Algorithms. The problems for this course were prepared by [user:ifsmirnov,2016-10-03], [user:Ilyakor,2016-10-03], [user:Michael,2016-10-03], [user:Perlik,2016-10-03], [user:romanandreev,2016-10-03], [user:Zlobober,2016-10-03] and Paul Melnichuk. Network flows and the algorithms covered in the Specialization can sound as not very advan...
with it could be seen as the most practical part of the course. You'd argue that this is all about, practical part of the course. You'd argue that this is all about Complexity, but in practice most of the

Full text and comments »

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

147.
By Nickolas, 10 years ago, In English
e-maxx translation news + Hacktoberfest = T-shirts! A quick update on the status of e-maxx translation project. First, I'm excited to announce that I've joined [e-maxx in English](https://github.com/e-maxx-eng/e-maxx-eng/) team as an admin! From practical point of view this means that I can review and accept pull requests and help with the issues arising during the contribution process. Feel free to contact me if you have questions. And if I encounter anything outside of my expertise, I can always ping [user:RodionGork,2016-10-02] directly :-) Second, October is a particularly good month for contributions to e-maxx translation, as well as for open source contributions in general. [Hacktoberfest](https://hacktoberfest.digitalocean.com/) is back this year, and they are giving away t-shirts to anyone who makes 4 pull requests to any GitHub-hosted projects between October 1st and 31st. We don't have an explicit list of issues to work on, but there are two basic kinds of contribution we're looking for: 1. Translations of articles...
-maxx-eng/) team as an admin! From practical point of view this means that I can review and accept, practical point of view this means that I can review and accept pull requests and help with the issues

Full text and comments »

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

148.
By LoboLobo, history, 2 years ago, In English
IOI Trade Offer [IOI 2024](https://www.ioi2024.eg/) is starting next week in Egypt and I will be participating again! It is a awesome opportunity to learn about other cultures and also to trade things with competitors from other countries! Here is what I have to offer: *OBI is the Brazilian Olympiad in Informatics, the one that classifies to team selection contests and IOI. *OBOI is the Brazilian Online Olympiad in Informatics, an alternative Olympiad that I created myself last year as distributed medals (I still have some left and want to maybe give/trade with some of youl <spoiler summary="Some OBI T-shirts, last year's IOI T-shirt, last year's Brazil IOI T-shirt and OBI caps."> ![ ](/predownloaded/3d/97/3d97a1e382705e8ab94f99c97fd20ba30fc22d76.jpg) </spoiler> <spoiler summary="OBI Backpacks"> ![ ](/predownloaded/d5/e3/d5e366a90e7bda2d7122265545e6909ae77459db.jpg) The left one is really good and even has space for a laptop. The right one is very practical (I had another one...
good and even has space for a laptop. The right one is very practical (I had another one just like that, one is really good and even has space for a laptop. The right one is very practical (I had another

Full text and comments »

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

149.
By singh_am, history, 11 months ago, In English
How to Determine If a Graph Is Bipartite Using DFS/BFS (Graph Coloring & Odd Cycle Detection) Graph theory is one of the most versatile tools in computer science. Many real-world systems from networks to data relationships naturally form graphs. Among the most fundamental graph structures is the **bipartite graph**. Understanding bipartite graphs helps in solving constraint-based problems, partitioning systems, matching tasks, and reasoning about conflicts in large networks. --- ## What Is a Bipartite Graph? ![ ](/predownloaded/26/15/2615fcb92c4e814059d9f08d2ed2f801a59b9278.png) A graph is **bipartite** if its vertices can be divided into **two disjoint sets** such that: * Every edge connects a vertex from one set to the other * No two vertices within the same set are directly connected ### Formal Definition A graph G = (V, E) is bipartite if the vertex set V can be partitioned into two disjoint sets U and W such that U ∩ W = ∅, and every edge in E connects a vertex in U to a vertex in W. --- ## The Core Property > **A graph is bipartite if and ...
## Practical Use Cases, **Practical tip:** Choose DFS for simplicity and BFS when recursion depth may be an issue. Both

Full text and comments »

  • Vote: I like it
  • -17
  • Vote: I do not like it

150.
By akcube, 3 years ago, In English
Codeforces Round #940 and CodeCraft-23 (Div. 2) Editorial [problem:1957A] ================== **Idea:** [user:keyurchd_11,2024-04-21] **Problem Setting:** [user:shakr,2024-04-21] [user:lezirtin,2024-04-21] **Editorial**: [user:shakr,2024-04-21] [user:TheRaja,2024-04-21] There were a few solutions which passes pre-tests with the assumption that $a_i \leq n$. We apologize for the pre-tests on A not including this case. <spoiler summary="Hint 1"> To create the most polygons, you should use as few sticks as possible per polygon. What polygon has the least number of sides? </spoiler> <spoiler summary="Solution"> [tutorial:1957A] </spoiler> <spoiler summary="Rate this problem"> - Great Problem - Ok Problem - Bad Problem - Didn't solve </spoiler> <spoiler summary="C++ Code"> ~~~~~ #include <bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; while(t--) { int n; cin >> n; vector<int> a(101, 0);...
is not a great bound theoretically speaking, but from a practical standpoint, it is a loose bound

Full text and comments »

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

151.
By adityabarodiya, history, 8 days ago, In English
Why Are Indian Programmers Underrepresented in Competitive Programming? Introduction India produces millions of engineering graduates every year. We have one of the world's largest pools of young developers, thousands of engineering colleges, and a rapidly growing IT industry ([TCS,](https://www.tcs.com/) [WIPRO](https://www.wipro.com/), [INFOSYS](https://www.infosys.com/), [TAXVIO](https://taxvio.in/)). Yet, when we look at the competitive programming ecosystem, particularly platforms like Codeforces, a question comes to mind: **Why doesn't India's enormous population translate into an equally enormous presence among the world's top competitive programmers?** India certainly has exceptional competitive programmers. We have produced internationally recognized talent, strong ICPC teams, and highly rated Codeforces users. However, there is a difference between having a large number of programmers and building an ecosystem that consistently produces world-class problem solvers. I believe this gap is influenced by several factors. Three importan...
- Study mathematics to score marks in examinations. - Learn programming syntax to passpractical, : - Study mathematics to score marks in examinations. - Learn programming syntax to passpractical, Here are some practical steps:, Students may spend years studying theoretical concepts without getting sufficientpractical, practical computer education compulsory. - Encourage students to participate in mathematics and

Full text and comments »

  • Vote: I like it
  • -24
  • Vote: I do not like it

152.
By ortsac, history, 3 years ago, In English
Expressing any program as a single number This is just something I've been testing around for a few hours and thought was pretty neat so I decided to share it here. Please don't take it too seriously :) What is able to express "any program" ------------------ Fortunately Alan Turing already solved this problem for us, and defined the term "Turing complete" to qualify anything that can express any possible Turing machine (thus, being able to express any algorithm/function/computable thing). One quite famous Turing-complete programming language is **Brainfuck**, an esoteric programming language that has no practical use (much like this own experiment) but was made to be challenge programmers and to be as simple as possible, having the smallest compiler. It only uses 8 symbols: `+`, `-`, `>`, `<`, `[`, `]`, `.`, and `,`. After reading a bit about this language I thought about a Veritasium video I saw not long ago about Gödel numbering, and how it could be applied to also turn any program written in Brainfuck into an integer!...
programming language is **Brainfuck**, an esoteric programming language that has nopractical use (much like, that has no practical use (much like this own experiment) but was made to be challenge programmers

Full text and comments »

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

153.
By trekhleb, 8 years ago, In English
Algorithms and Data Structures in JavaScript Hello Readers! I've recently launched [JavaScript Algorithms and Data Structures](https://github.com/trekhleb/javascript-algorithms) repository on GitHub with collection of classic algorithms and data-structures implemented in ES6 JavaScript with explanations and links to further readings and YouTube videos. There is also [Algorithms and Data Structures YouTube playlist](https://www.youtube.com/playlist?list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8) that contains all the videos mentioned in that repository so you may just go and take this hand-made online learning course :) So I guess you've already grasp main idea of the project - ** helping developers to learn and practice algorithms and do it in JavaScript** . [cut] To make this process even smoother I've tried to put some **graphical illustrations** for each algorithm and data structure where it was possible just to make the idea behind those algorithms to be easily grasped and memorized. You also may find some practical i...
idea behind those algorithms to be easily grasped and memorized. You also may find somepractical, You also may find some practical information just in the root README file that may be handy while

Full text and comments »

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

154.
By imshrey_0006, history, 7 months ago, In English
How to Increase Codeforces Rating (Practical Tips) Hello everyone, I wanted to share some practical tips that can help in improving Codeforces rating. These are simple things that worked for me and many others. 1. Focus on solving A and B problems quickly In most contests, your rating depends a lot on how fast and accurately you solve the first 2–3 problems. 2. Learn common patterns Many problems are based on patterns like two pointers, greedy, prefix sums, and basic math. Recognizing patterns saves time. 3. Practice regularly Consistency is more important than solving many problems at once. Even 2–3 problems daily can help. 4. Upsolve after contests After every contest, try to solve the problems you couldn’t solve. This is one of the fastest ways to improve. 5. Debug your mistakes Instead of immediately checking the solution, try to understand where your logic went wrong. 6. Don’t panic during contests Stay calm. Even if you get stuck, move to the next problem and come back later. 7. Improve i...
How to Increase Codeforces Rating (Practical Tips), Hello everyone, I wanted to share some practical tips that can help in improving Codeforces, I wanted to share some practical tips that can help in improving Codeforces rating. These are

Full text and comments »

  • Vote: I like it
  • -22
  • Vote: I do not like it

155.
By A00000, 12 years ago, In English
Number of integral solutions to a linear equation $$x_1+x_2+x_3+\dots+x_{n-1}+x_n= S$$ [cut] Given an equation like this: $$x_1+x_2+x_3= 5$$ The general solution to such an equation is ${5+3-1 \choose {3-1}}$. Where did that come from, basically to solve the previous equation we re-model it into another equivalent type of easily solvable combinatorics problem which is counting the number of possible arrangements for the following string "0011111" the answer for this is $\frac{7!}{{5!}.{2!}}$ which is equal ${7 \choose 2}$ which is equal to number of solutions to the equation, how did this happen, we say that the "1"s represent the answer of the equation and the "0"s represent the number of variables -1, let's clear that a bit, for a string like that "0011111" this means $x_1= 0, x_2= 0, x_3= 5$, another string like that "1101011" means $x_1= 2, x_2= 1, x_3= 2$, lastly a string "1111100" means $x_1= 5, x_2= 0, x_3= 0$. So you see that the answer of the number of arrangements of the string is actually the answer...
bit-masking will only allow us to work while $n\leq 20$. Moving to a practical problem that we, Moving to a practical problem that we can re-model it as a linear equation is this problem [problem

Full text and comments »

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

156.
By nauthnim, history, 3 months ago, In English
I Gave Up Codeforces to Build an Ecosystem # I Gave Up Codeforces to Build an Ecosystem Around two years ago, I wrote my first blog, **[“Motivated Coder.”](https://codeforces.me/blog/entry/138526)** Back then, Codeforces was a big part of my daily routine. I loved solving problems, learning new ideas, and pushing myself further. In that post, I also shared a small achievement from 2022: **A HEART STREAK.** ![ ](/predownloaded/d2/22/d22292685374f20621c4c054d9ef009c653c1ef6.png) That **HEART STREAK** is probably the best proof that I really loved coding. It was never just something I did for work. Solving problems and improving myself became part of my life. But life is not always as smooth as it looks. A lot has changed since then. ## So, What Happened? Over the past few years, I ran into a lot of obstacles while trying to build my own things. At one point, I even lost my motivation. I wrote about some of that journey in my [dev blog](https://promtgames.win/forum/dev_blog_001). There was also a pra...
There was also a practical problem., practical problem. I couldn't always afford to spend hours on a Codeforces problem before starting

Full text and comments »

  • Vote: I like it
  • -17
  • Vote: I do not like it

157.
By albeXL, history, 2 years ago, In English
Mathematical Induction Applied to Graph Theory I've just penned a post on Mathematical Induction, focusing on its practical application in graph theory to prove theorems and propositions, making it more than just a theoretical concept. In this post, I'll introduce a fundamental proposition of graph theory and guide you through its proof. Rest assured, the content is designed to be easily understood by all, regardless of your experience in proving theorems in mathematics. Whether you are a math connoisseur or a total newb to the field, I think you will benefit tremendously from today’s discussion. This example shows why people like me invest a considerable part of their lives diving deeper and deeper into science, specifically looking at the intersection of math and computer science and how these principles can be applied in real-world scenarios. If you're interested in delving deeper, you can find the full post [here](https://albexl.substack.com/p/mathematical-induction-graphs). I'm eager to hear your thoughts on this topi...
I've just penned a post on Mathematical Induction, focusing on its practical application in graph

Full text and comments »

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

158.
By vlecomte, 9 years ago, In English
Writing a book on geometry, need some feedback Hello! I'm writing a book on geometry with a competitive programming approach. I've just started, so I haven't written much at all yet but I'd like to have some early feedback. My goal is to be easy to understand and practical (quite code-oriented), but also to explain important concepts in depth and try to build intuitions / interesting interpretations, because I think I can bring some things on that front. In what I've written I feel like the "in depth" part is okay but I'm afraid the "easy to understand" part is a bit lacking. So far I've covered complex numbers, point representation, dot product, cross products and their applications, as the first part of a "Basics" chapter. There will eventually be other chapters, covering things like sweep algorithms, algorithms on convex polygons/hulls, and especially 3D geometry, which I like a lot. I'd like to have feedback mostly on writing style and on ways in which I can make the explanations more accessible (e.g. adding example...
easy to understand and practical (quite code-oriented), but also to explain important concepts in, My goal is to be easy to understand and practical (quite code-oriented), but also to explain

Full text and comments »

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

159.
By Mohab_Yaser, history, 3 years ago, In English
Don't open that blog post ### What does the project do? It takes input from the user: - Rating Boundaries (min, max) - Some tags (Optional, if no tags selected, all tags will be included) - Number of problems (N) - Some codeforces handles (Optional, can be added one by one or comma separated) - All the above preferences can be saved/erased locally, so you can close your browser and come in any time and find your preferences ready for you The app gives (N) codeforces rated problems (problems with not rating/tags are not included) their ratings are between min and max (inclusive), all of them do not have any tags out of the tags selected above: if the user selected `number theory`, `math`, and `dp`, then all these combinations are valid and can be seen in the outputted problems: - `number theory` - `math` - `dp` - `dp`, `math` - `dp`, `number theory` - `math`, `number theory` - `math`, `number theory`, `dp` but you will not see none of these: - `binary search`, `m...
features that are not practical or no one will use (I tried to put myself in the shoes of the user, that are not practical or no one will use (I tried to put myself in the shoes of the user)*

Full text and comments »

  • Vote: I like it
  • -28
  • Vote: I do not like it

160.
By nuredinbederu10k, history, 17 months ago, In English
A2SV Contest #20 Editorial [Here](https://codeforces.me/contestInvitation/40450eb6dda5acc9b374600fbe77b33c684d1abe) is the link to the contest. All problems are from Codeforces' problem set. [A. Coins](https://codeforces.me/gym/618729/problem/A) <spoiler summary="Solution"> To check if an amount $n$ can be formed using coins of denominations $2$ and $k$ (with $k \ne 2$), we can simplify the problem using a key observation: two $k$-coins can be replaced by $k$ coins of $2$, since $2k = k \cdot 2$. This means any solution using two or more $k$-coins can be transformed into one with at most one $k$-coin. So, we only need to check two cases: Use only $2$-coins: possible if $n$ is even. Use one $k$-coin and the rest $2$-coins: possible if $n \ge k$ and $n - k$ is even. If either condition holds, the answer is "YES"; otherwise, it's "NO". This allows each test case to be solved in constant time. </spoiler> <spoiler summary="Code"> ```python t = int(input()) for _ in range(t): n, ...
at most once, which is practical given the problem constraints.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

161.
By _QuantumBifrost_, 20 months ago, In English
Faster Square Root Computation Using an Optimized Binary Search Hello there, welcome to my first Codeforces blog post! Today I’d like to share an educational — and frankly a fun observation — on optimizing the process of finding the square root of large integers using binary search. This may not be something you’d use in your everyday code (after all the built-in `sqrtll()` is hard to beat in speed), but it’s a neat mathematical trick that can literally save you seconds when processing many numbers. Before we dive in, a huge thanks to [user:chromate00,2025-03-13]. An answer of mine getting hacked in one of his contests sparked this discovery. --- ## Aim In a typical binary search algorithm for computing the integer square root of a number `S`, we initialize the search range with: - `low = 0` - `high = S` This approach finds the square root in **O(log(S))** iterations. But if we have to compute square roots for too many numbers (like $10^8$), it can become laggy. However, if we can choose `low` and `high` more intelligently based ...
and bitwise operations can lead to practical performance improvements. If you’re interested in

Full text and comments »

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

162.
By hari862, 13 years ago, In English
Effective Usage of C++ STL for quick and concise code writing in competitive programming I am not any expert in competitive programming, so this post is not about teaching you fellow coders any new things that you already don't know. Rather I am asking you high rated Div. 1 people to share your experience, problem solving approach of using STL(vector, pair, queue, priority queue, stack, set, map, algorithm) for good understanding of when and where to use STL. I have already read the various STL tutorials on Topcoder(by [DmitryKorolev](http://community.topcoder.com/tc?module=MemberProfile&cr=21749340&tab=alg)): [STL Tutorial 1](http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=standardTemplateLibrary) [STL Tutorial 2](http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=standardTemplateLibrary2) Codeforces: [DFS using STL](http://codeforces.me/blog/entry/6318) by [user:evandrix,2014-03-22] But after reading these I found out that they are just meant for giving you some basic understanding of "What is STL and its importance". These were ve...
contest programming as they didn't gave any practical idea or insight of in which cases a programmer, very informative, but not so much helpful for contest programming as they didn't gave anypractical

Full text and comments »

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

163.
By Endagorion, 13 years ago, translation, In English
Chromatic number / k-colorability Hello everyone. Recently I encountered a problem which included checking whether given graph is [colorable](http://en.wikipedia.org/wiki/Graph_coloring) using $k$ colours. More specifically: - graphs given are quite large (up to several thousands of vertices) but not very dense (average degree is about 10-20, max degree may be about 50). - $k$ is not too big (something up to 10). - it is important to get a reliable answer (even one-sided error is not tolerated). I stumbled upon a [lib](http://keithbriggs.info/very_nauty.html) that is able to count the chromatic number of a graph (notable that it does quite well on average for that scale, still some instances take very long to treat). $k$-colorability checking sure is simpler than counting the chromatic number, so specialized solution for it is expected to do somewhat better; sadly I couldn't find any code or description of practical solution for this problem. Do you have any experience with this particular problem or ...
code or description of practical solution for this problem., of practical solution for this problem. Do you have any experience with this particular problem or

Full text and comments »

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

164.
By Ashraf_A11, history, 3 years ago, In English
The power of STL Functions # Exploring Powerful STL Functions for Competitive Programming ## Introduction: In the realm of competitive programming, efficiency is paramount. Writing optimized, clean, and concise code can make all the difference in tackling complex algorithmic problems. One invaluable tool in a coder's arsenal is the Standard Template Library (STL) in C++. In this blog post, I'll walk with you through a series of powerful STL functions that can significantly enhance your coding experience and efficiency on platforms like Codeforces. before anything, this repo link has the functions and the code examples and implementations for them. [Repo](https://github.com/AshrafAbdelkhalek10/Practical-Programming/tree/main/STL%20Functions) ## Batch Operations: The ability to perform batch operations on containers is a game-changer. Functions like `for_each` and `for_each_n` allow you to apply a specific operation to multiple elements in a container, streamlining your code and making it more readab...
examples and implementations for them. [Repo](https://github.com/AshrafAbdelkhalek10/Practical, them. [Repo](https://github.com/AshrafAbdelkhalek10/Practical -Programming/tree/main/STL%20Functions)

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

165.
By nuredinbederu10k, history, 15 months ago, In English
A2SV Contest #26 Editorial [Here](https://codeforces.me/contestInvitation/aa6037d6b47fcf6618fbb56b120dca0f7bc735b8) is the link to the contest. All problems are from Codeforces' problem set [A.Maxim vs. Yogurt: The Great Discount Battle](https://codeforces.me/gym/629689/problem/A) <spoiler summary="Solution"> We want the **minimum cost** to buy exactly $n$ yogurts when: - A single yogurt costs $a$ burles. - A promotion lets you buy **two yogurts for $b$** burles. You may mix buying single yogurts and buying pairs. Let's reason through the options, compare costs, and derive a compact formula. --- #### **_Key Observations_** 1. **Always-available baseline:** - You can always buy all yogurts one-by-one. That gives the cost. - `Cost = n.a` 2. **When is the promotion useful?** - Buying two yogurts with the promotion costs $b$. Compare this to buying those two separately:$2a$. - If $b \geq 2a$, the promotion **is not beneficial** (or is equal). Then buying every ...
character** → $O(26 \cdot n)$ - Total complexity → $O(26 \cdot n) \sim O(n)$ forpractical purposes.

Full text and comments »

  • Vote: I like it
  • -3
  • Vote: I do not like it

166.
By -Pho3nix-, history, 9 months ago, In English
Finally: Sublime Text + Companion FIXED! Most Sublime Text users use the "FastOlympicCodingHook" tool to facilitate transferring tests from the browser to the program. It's a good tool, but not very practical, as you have to click the "Listen to Competitive Companion" button every time to force the program to accept tests from the browser. I also encountered the problem that there isn't a tool that creates a separate file for each test, and sometimes the tool's response to the browser is unreliable. This piqued my curiosity, and I started looking for ways to fix these problems. It took me more than three days of searching and trying, but I couldn't find any articles that actually addressed these issues. I even resorted to using AI and asked it to fix these problems. It took a few hours because I didn't get the best result the first time, but finally, I can say I did it. ```python import sublime import sublime_plugin from http.server import BaseHTTPRequestHandler, HTTPServer import json import threading import os ...
the browser to the program. It's a good tool, but not very practical, as you have to click the, It's a good tool, but not very practical, as you have to click the "Listen to Competitive Companion

Full text and comments »

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

167.
By BigBadBully, history, 3 years ago, In English
Generalization of Kadane's algorithm I'm pretty sure a large amount of people have at the very least heard of Kadane's algorithm. It is a way to find the maximum subarray sum (of an array). But why does it work? Besides the normal proof/explanation, is there another way to explain why it is correct? Let's fix the right boundary of the subarray. From now on, it is called $r$. Now we want to find the optimal left boundary, $l$, for every $r$. For the answer we can just find the maximum of all fixed $r$. How could we do this? Well for a given $r$ let's assume we already found the $l$. How does the answer change for $r+1$? For $r+1$, all we did was just add $a_{r+1}$ to every subarray we had so far. For every integer value $a,b,c$ it holds true that $$a \ge b \implies a + c \ge b + c$$ This means that the greatest subarray sum will still be greater than every subarray whose left boundary was contained in the $a_{l..r}$ subarray, so we only need to check if the subarray sum $a_{{r+1}..{r+1}}$ (the element $a_{r+1}$) is...
practical functions have this property, but I don't know of much problems that can be solved by

Full text and comments »

  • Vote: I like it
  • -36
  • Vote: I do not like it

168.
By actual_truthseeker, history, 4 years ago, In English
Help me understand why Linux isn't feasible for desktop even in 2022 I will start out by saying that this isn't a post about bashing Linux or DEs; if anything, it's a cry for help because I want to be able to use Linux daily on my workstation. I've been using Linux on my servers for the past decade without any issues &mdash; ever, regardless of the distribution. It has always been rock solid and stable, exactly as it should be. Linux on servers has made a name and image for itself by just working and by being stable, reliable and rather maintenance-free. I cannot however say the same about desktop, BUT Linux itself isn't the issue. Every few months I get the itch of wanting to try to make it work. It always comes back, "what if it's good now?", "what if something revolutionary got released that fixes all the shortcomings?", but while it is getting slightly better every time, it's still unusable. I've concluded that the culprit comes down to the Desktop Environments. Linux itself, be it Debian, Arch or anything else, isn't the issue. It's t...
stuff like that with no practical next-step or something practical I can do or go off of, , does not work) and just obscure stuff like that with no practical next-step or somethingpractical I

Full text and comments »

169.
By dolphinigle, 13 years ago, In English
MemSQL start[c]up Round 2 -- Editorial This is the Editorial for [contest:326] and [contest:335]. Congratulations [user:RAD,2013-08-05] for online round winner and [user:Petr,2013-08-05] for onsite and overall score winner! This editorial is written jointly by the contest's coordinators (i.e., MemSQL engineers). [problem:335A] -- [user:SkidanovAlex,2013-08-05] Reference solution: [user:nwin,2013-08-05]'s [submission:4222182] Instead of calculating the smallest possible number of sheets given a fixed $n$, let us instead try to compute the smallest possible value of $n$ given a fixed number of sheets. Let $k$ denote the number of sheets. If a particular letter appears $p$ times in $s$, then it must appear at least $ceil(p/k)$ times in the sheet. Thus we can compute the smallest possible value of $n$ by summing $ceil(p/k)$ over all letters. Now the original problem can be solved using binary search on $k$ (or brute force, since the constraints were small enough). [problem:335B] -- [user:SkidanovAlex,2013-08-...
constant time. Skiplist is different from any tree structures because it has a practical thread safe

Full text and comments »

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

170.
By sharique02, history, 4 months ago, In English
How to Recognize Which Algorithm to Use? — A Pattern-Based Guide for Competitive Programming "Knowing algorithms is important. Knowing when to use them is what separates beginners from strong problem solvers." Hello everyone! One of the most common questions beginners ask is: "I know Binary Search, DFS, BFS, Sliding Window, DP... but how do I know which one to use?" The answer is simple—but it takes practice. Competitive programming is less about memorizing algorithms and more about recognizing patterns. Every problem leaves clues in its statement. Your job is to spot them. In this blog, I'll share a practical framework that has helped me organize my thinking while solving problems. Step 1: Read the Constraints First Before thinking about the algorithm, check the input size. Input Size Typical Complexity n ≤ 20 Brute Force / Bitmask / Backtracking n ≤ 1,000 O(n²) n ≤ 100,000 O(n log n) or O(n) n ≤ 1,000,000 O(n) If n = 2 × 10⁵, an O(n²) solution is almost certainly too slow. Constraints eliminate many wrong ideas before you write a single l...
In this blog, I'll share a practical framework that has helped me organize my thinking while

Full text and comments »

  • Vote: I like it
  • -2
  • Vote: I do not like it

171.
By harrypotter0, history, 10 years ago, In English
How to prepare for ACM ICPC? Well I would suggest you to check out Programming Competition,Programming Contest,Online Computer Programming. Here is the details about as the codechef team promote the students for ACM-ICPC or you can also check out the actual university site which conduct ICPC The ACM-ICPC International Collegiate Programming Contest And to practice problems you can you can refer following sites 1. http://codechef.com 2. http://spoj.com 3. http://hackerrank.com 4. http://codecademy.com 5. http://topcoder.com 6. http://codeforces.com Good Luck... for the details about ACM-ICPC 2015 you can read the details ACM ICPC 2015 | CodeChef. I hope you'll find most of the things... Here are some steps to get started and be good at it. Get comfortable writing code in either of one of these languages C, C++ or Java. Why only C, C++ or Java? Because these are the standard languages allowed in any programming competition. If you are already good at C, it is suggested to learn C++. It...
Programming is a very practical and hands on skill. You have to continuously do it to be good at it

Full text and comments »

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

172.
By toberu, history, 14 months ago, In English
An unforgettable moment I was doing problem C in the last Div 1 with my life literally on the line. I was having a practical tantrum, and my parents were threatening to beat me up. Finally, when I got AC'ed, I was crying tears of joy. I ran 3 laps in my living room, crying and laughing, while me parents congratulated me. And then I opened Carrot extension. -30 rating. So what is the moral of the story? In all honesty, I don't know, but I want to share with you all a moment where people can hardly tell me and a clown a part. This undesirable moment will come down in my memories forever.
practical tantrum, and my parents were threatening to beat me up.

Full text and comments »

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

173.
By Altostratus, history, 4 years ago, In English
[Altostratus's Daily Blog #01] Ackermann and DSU Let's talk about the Inverse Ackermann function! It's like watching paint dry or reading this blog post, but with only numbers. But fear not! With enough determination, practice, and perhaps a little bit of luck, you too can triumph over the inverse Ackermann function. Just remember: I probably don't know what I am talking about either :D Disjoint Set Union (DSU), also known as Union-Find, is a popular algorithm used in competitive programming to efficiently perform operations on disjoint sets of elements. One important aspect of the algorithm is its time complexity, which has been analyzed to be O(alpha(n)) on the average and worst-case scenario, where alpha(n) is the inverse Ackermann function. But what is the inverse Ackermann function, and why is it relevant to the time complexity of DSU? In this blog post, we will explore these questions and provide a detailed explanation of how the time complexity of DSU is related to the inverse Ackermann function. The Ackermann functio...
than 5 for all practical values of n, making it effectively a constant for all practical purposes, (n) is less than 5 for all practical values of n, making it effectively a constant for allpractical, But why is alpha(n) a constant for all practical purposes? The reason lies in the properties of the

Full text and comments »

  • Vote: I like it
  • -13
  • Vote: I do not like it

174.
By vkgainz, history, 20 months ago, In English
Massive Time Complexity Improvement to Bellman Ford Algorithm Hey everyone! UC Berkeley's Satish Rao just published a paper improving the Bellman Ford algorithm. The bound that all of us know is $O(mn)$ but he published an $\tilde{O}(m\sqrt n)$ expected time algorithm (the ~ just means that there's some hidden logs in the complexity). This is a massive improvement over previous attempts to improve the $O(mn)$ algorithm, the last one being $\tilde{O}(mn^{\frac{4}{5}})$. The paper is linked here: https://arxiv.org/pdf/2503.22613. Although the bound looks very appealing I don't think it's practical for competitive algorithm as the ~ probably kills it. Regardless I think it's pretty cool since probably half the community here has heard of Bellman Ford.
bound looks very appealing I don't think it's practical for competitive algorithm as the ~ probably, Although the bound looks very appealing I don't think it's practical for competitive algorithm as

Full text and comments »

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

175.
By mostafa.saad.fci, 5 years ago, In English
@Udemy: Mastering critical SKILLS in Data Structures using C++ Dears, I recently started a new series of courses at Udemy [**[Mastering critical SKILLS](https://bit.ly/3lJ2SiL)**] series. The core value of this series is focusing on **gaining skills** through extensive practice NOT just knowledge like most of the free materials. So far I have finished C++17 and Python courses. The new course is a _C++ Data Structures_ course covering basic to advanced topics. [[**Coupons**](https://bit.ly/3lJ2SiL)]. About Udemy: - Don't get cheated by the default $150+ price. Udemy is usually on sale on weekly basis for $10-15. My coupons are active anyway - Within 30 days you can ask for refund for whatever reason (read policy). Feel free to try. Why paying if there are a lot of free materials? - My explanations are short and to the point in a practical way - Extensive practice from easy to hard. You can find hundreds of (redundant) problems on the internet. The course again saves your time by being very selective. - After the course, one sho...
- My explanations are short and to the point in a practical way - Extensive practice from easy to, practical way - Extensive practice from easy to hard. You can find hundreds of (redundant) problems on

Full text and comments »

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

176.
By tee_01, history, 9 months ago, In English
Invitation to AMS Round 1: Bridging CP and Quant Finance (Math & Expected Value) At the **Algorithms & Mathematics Society (AMS)**, we explore the space where deep algorithmic thinking meets quantitative finance. To gear up for our upcoming **AMS Official Round 1 (1st of March, 2026)**, we’ve just dropped a practice teaser problem: the Option Payoff Calculator. **The Teaser Challenge** (A &mdash; level): If you're interested in the math behind the markets, this one is for you. You're tasked with evaluating a simple call option on a stock. Given a strike price, current price, and a set of possible future price levels with their respective probabilities, can you calculate the expected payoff of the option? It's a perfect blend of expected value mathematics and implementation logic. It might sound straightforward, but structuring your logic to handle the inputs efficiently and computing the exact floating-point output is key. **Why This Matters** This problem is a classic example of applying probability to derivative pricing—a basic fundamental concept for ...
exactly the kind of practical, market-driven logic we love to test. Ready to Code? **Write your, high-frequency trading. It's exactly the kind of practical, market-driven logic we love to test.

Full text and comments »

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

177.
By abhinavawasthi, history, 5 years ago, In English
unordered_map gives TLE? UMAP vs MAP Yesterday, I have participated in codeforces round 773. Was able to solve the first three questions during the contest, but my B and C submission got TLE on System Cases, do you know why? Just because I have used unordered_map instead of map. I think, this is practical example to examine the diff btw unordered_map and map. The same code with the same logic gives TLE, when using UMAP but got accepted, when using MAP. ![ ](/predownloaded/71/7e/717ea37d03dda9ada2e0dc38a98c7b654365dd9e.png) [problem:1642B] Submission with UMAP: [submission:147440230] (TLE) [problem:1642C] Submission with UMAP: [submission:147426920] (TLE) [problem:1642B] Submission with MAP: [submission:147497381] (Accepted) [problem:1642C] Submission with MAP: [submission:147497320] (Accepted) One of my codeforces friends also told me about this, with a very good resource attached, you can check it. ![ ](/predownloaded/68/72/687285e21f39c759759230d7a59eb6c1f0374818.png) ![ ](/predownloade...
because I have used unordered_map instead of map. I think, this is practical example to examine the, I think, this is practical example to examine the diff btw unordered_map and map.

Full text and comments »

  • Vote: I like it
  • -1
  • Vote: I do not like it

178.
By AppleZ, 14 years ago, In English
IX International Zhautykov Olympiad The 8-th annual International Zhautykov Olympiad in Mathematics, Physics and Computer Science that is a collaborative project of The Republican Scientific-Practical Centre “Daryn” and The Republican Specialized Physics-Mathematics Secondary Boarding School named after O.Zhautykov for gifted students has successfully been brought to a conclusion. ![ ](http://f12.ifotki.info/org/7ccb85218f275a207443e7183a3be2a7028601141501176.jpg) 54 teams (343 participants) of specialized schools from 18 countries such as Kazakhstan, Russia, Ukraine, Belorussia, Moldova, Azerbaijan, Armenia, Georgia, Kyrgyzstan, Tajikistan, Turkmenistan, Romania, Bulgaria, Indonesia, India, Mongolia and Afghanistan participated in VIII IZhO. 29 participants of the Olympiad were awarded with golden medals (Kazakhstan-9, among them RSPhMSBS-4/Alibek Sailanbayev, Saken Dushayev, Iliya Vilkoviskiy, Temirlan Zharkynbek), 58 participants got silver medals (Kazakhstan-19, among them RSPhMSBS-6/Temirlan Seilov, Yerzhan...
is a collaborative project of The Republican Scientific-Practical Centre “Daryn” and The Republican

Full text and comments »

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

179.
By MikeMirzayanov, 12 years ago, translation, In English
ACM-ICPC World Finals 2014: Before Opening Ceremony Oh yes! Only a few days left before the Championship finals! The teams have already gathered in Yekaterinburg, most of them have registered and are watching a game between Russia and Belgium. I want to start from some history and remember that the tradition to publish travel notes about Saratov State University's trips to finals started back in 2005. The regular pattern is that almost every year when we made notes, our team won a medal. I won't try my luck, so here are some of the first impressions of this year. [cut] The Codeforces community knows this year's team very well, its members are: * [user:Gerald,2014-06-23] &mdash; Gerald Agapov, a person who coordinates Codeforces problems. He has been the key person collaborating with problem authors for Codeforces rounds since 2012. Oh yes, if something goes wrong with problems, he is the one I beaker at, but the guy is great and we hardly ever hae any problems :-) Gerald isn't only into programming. He loves maths, magnifi...
, he teaches programming metрods in Saratov State University with theoretical andpractical lessons, practical lessons. All in all, he has

Full text and comments »

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

180.
By JetBrains, history, 5 months ago, In English
CSAI: Fully Funded BSc Scholarship for Top Coders – Apply by June 9! Hello Codeforces, Are you a high school senior with strong coding skills looking for an intense Computer Science bachelor’s program with fully-funded scholarships available? Applications are about to close for the JetBrains Foundation-backed CSAI BSc Program (Computer Science and Artificial Intelligence) at Neapolis University Pafos (Cyprus). - Application deadline: June 9, 2026 - The scholarship package: Experienced coders can secure a fully-funded JetBrains Foundation scholarship, which includes: - 100% of tuition fees covered. - Free accommodation for the duration of the course. - A EUR 300 per month cash stipend for living expenses. - Medical insurance and visa fees paid in full. Why this program? - The JetBrains connection: Direct access to internship opportunities and hands-on experience within the JetBrains ecosystem. - Hardcore tech curriculum: Deep, practical focus on AI, mathematics, data science, and software engineering – taught by world-class pro...
within the JetBrains ecosystem. - Hardcore tech curriculum: Deep, practical focus on AI, mathematics, , practical focus on AI, mathematics, data science, and software engineering – taught by world-class

Full text and comments »

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

181.
By Cristofor, history, 3 years ago, In English
[JOI] JOI English Problem Editorials Hello, CodeForces! I am Cristofor Zaharescu, a teacher from Alunis, Romania. Very few of my more advanced students have started to solve JOI open, final round and summer camp contests. After not that much time of solving these sort of tasks, they have observed one thing &mdash; the fact that JOI editorials are pretty hard to find. They tried looking on announcement CodeForces blogs, but not all problems have a really detailed user-made comments, which can sometimes be useless if the problems is really hard and some key details are being left out. Plus, translating JOI slide-shows by hand is also a non practical thing to do, as translations are commonly inaccurate, and text selection in JOI editorials does not allow you to select numbers in the slide-show's text. I have decided to make this blog an organized place where anybody can find JOI explanations easily, but I need your help. If you have the time to do this, please make a separate comment for every JOI problem you ar...
are being left out. Plus, translating JOI slide-shows by hand is also a non practical thing to do, hand is also a non practical thing to do, as translations are commonly inaccurate, and text selection

Full text and comments »

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

182.
By egor_bb, history, 5 years ago, In English
Finding number of certain strings in the group of 2N-bit strings Hi! There is a practical problem that reduces to the following: You are given some 2N-bit strings that generate a group with XOR operation (subgroup of all 2N-bit strings). The goal is to find the number of elements in the group satisfying the following property in any reasonable time: * Split the 2N-bit string into N pairs of adjacent bits, for example $01111011 > (01)(11)(10)(11)$ * The number of $(11)$ pairs should be odd (in the example there are two such pairs, so we don’t count it) The faster the better, but ideas on speeding up the brute force are also welcome. I’m stuck at the moment and don’t even understand how to Google it properly :(
Hi! There is a practical problem that reduces to the following:

Full text and comments »

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

183.
By MohamedHamada_, 6 years ago, In English
Kindly share your Experience — last regional ACM contest — what's next ? Hello CF community... 2 days ago, It was my last regional contest (ECPC). for the last 5 years, I was training for the ACM while studying (like most of us) and help the other newcomers in the problem-solving community. In the last ECPC, one of the students who I was training had really bad luck in the contest and spent too much time on one easy problem and didn't solve it! I think most of us have experienced this. anyway, After the contest, she said I have no reason to continue the training! I did my best last year and didn't get any good results! and I even don't know what's the benefits of problem-solving in a practical job after leaving competitive programming! (we all will leave these competitions one day, whatever the reason) she was really disappointed. I know that feeling and I reach a mental breakdown 2 years ago (still trying to recover). competitions -like anything in life- have advantages and disadvantages, you may work very hard and things go wrong! you got WA instead...
of problem-solving in a practical job after leaving competitive programming! (we all will leave, practical job after leaving competitive programming! (we all will leave these competitions one day

Full text and comments »

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

184.
By akim239, history, 3 years ago, In English
Using codeforces platform for classes Hello, I am a teacher/coach for middle and high school students in California. The classes are structured so that they start with intro stuff like "given A and B find A+B" and gradually go up to more advanced competitive programming problems. I want to use codeforces as a platform for practical classes so that the students seamlessly "graduate" to traditional codeforce-style problems and all the practical lessons are in one place. Is it ok to use codeforces for this? My plan so far is to - Add problems I have into polygon - Create a series of contests out of them "Intro lesson", "dynamic programming lesson" etc - Add existing codeforces problems to the contests where appropriate. Is this an appropriate way to use codeforces? And/or should i be using mashups (or other existing codeforces functionality) instead? Thanks, Akim.
I want to use codeforces as a platform for practical classes so that the students seamlessly, practical classes so that the students seamlessly "graduate" to traditional codeforce-style problems and

Full text and comments »

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

185.
By testUser44, history, 10 months ago, In English
**Smart Practice Guide for Competitive Programming** **Salam everyone,** This blog is a **simple and practical guide** on how to practice competitive programming, how to learn new algorithms, when to read others’ code, and how to prepare for **NOI / OI-style contests**. Everything here is based on **practice ideas**, written in **easy English**, with **no extra theory**. --- ## 1. How to Learn a New Algorithm **Do NOT learn algorithms first. Learn them when you need them.** ### Correct way to learn an algorithm: 1. Pick a problem. 2. Think seriously for about **15 minutes**. 3. If you are stuck, read the **editorial**. 4. If the editorial uses a new algorithm or idea you don’t know: * Read **one article** about it (USACO Guide, CP-Algorithms, or CF blog). * Understand the idea, not memorise it. * Implement it **in that same problem**. 5. Move on to the next problem. ### Why this works: * You learn the algorithm **in context**. * You remember **when to use it**, not just what it is. * Important...
**Salam everyone,** This blog is a **simple and practical guide** on how to practice competitive, This blog is a **simple and practical guide** on how to practice competitive programming, how to

Full text and comments »

  • Vote: I like it
  • -30
  • Vote: I do not like it

186.
By cybersecessential, history, 15 months ago, In English
Getting Started with Learning Cybersecurity As a beginner in this field, I hope to use this blog to learn as much as I can, practice as much as possible and help anyone interested in learning cybersecurity. The first basics that I have to get out of the way on the first learning day is having a Personal Knowledge Management folder(PKM). Why is this important? A Personal Knowledge Management (PKM) system is a structured approach that will help me to capture, organize, retrieve, and utilize information I interact with throughout this learning process. It can help me gather and store information from various sources, such as articles, websites, peer discussions, feedback, lecture discussions, case studies and personal experiences, in a systematic manner. Lets focus on the core journey that we are going to use to master the essentials Cybersecurity is often seen as a mysterious field filled with hackers, advanced tools, and complex exploits. In reality, every expert starts with the same foundation: understanding how comp...
Practical First Steps (Hands-On) Set up a virtual lab with VirtualBox or VMware. Install Linux

Full text and comments »

  • Vote: I like it
  • -12
  • Vote: I do not like it

187.
By ManGeo, history, 5 years ago, In English
Beginner's effort... Hello everyone, Welcome to the era of new generation coding. (Note: This particular blog is exclusively for freshers. The purpose of this blog is to provide a simple introductory picture of coding). Before going into world of coding, let us familiarise with some basic terminology. Syntax &mdash; Any coding language has a dictionary like every other verbal human languages. Syntax defines the statements of a computer language. Syntax in itself is a study of how words, phrases need to be arranged to form meaningful statements. In computer language syntax provides us a pre-defined structured way to code our programmes Let us understand the meaning of an input first. Many of you might be already aware of it. Input basically is a language aided command usually provided by users, system programmers for running programmes. Without an input there would not be an inpuyt in practical sense. However some advanced programmes and softwares are in development which require virtually no ...
programmes. Without an input there would not be an inpuyt in practical sense. However some advanced, , system programmers for running programmes. Without an input there would not be an inpuyt inpractical

Full text and comments »

  • Vote: I like it
  • -28
  • Vote: I do not like it

188.
By ViciousCoder, history, 9 years ago, In English
No Sympathy? This is regarding codeforces round #444 where in a blog regarding the contest was hugely down voted owing to the content of the questions and mistakes in explanation of the question. Yes, some mistakes occurred on their part but what we need to realize here is that question making is not an easy art. It takes weeks, sometimes even months to think about a nice question and twisting it to make it practical. I can assure that Dennison and their team worked their asses off to make this contest and the codeforces community ripping them off in sometimes the most distasteful way is really heart-wrenching. Dennison is now LAST on the list of contributors and this is such a sorry sight. These guys have made the contest just for you guys. I hope from now on, the codeforces community would be a little more kind towards the people contributing to this site. Also I feel that the codeforces community is like a small world of its own. So when one falls, there should be many to help him du...
practical. I can assure that Dennison and their team worked their asses off to make this contest and

Full text and comments »

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

189.
By albeXL, history, 2 years ago, In English
The Simplest Change to Improve the Performance of Your C++ Code I have teamed up with [Jesús Manuel López Ponce](https://substack.com/@jmlopez), a former competitive programmer, for a series of posts about the intricacies of C++. In this first edition, we discuss the simplest change that you can make to your code to improve its performance significantly. [Give it a read](https://albexl.substack.com/p/practical-tips-for-cpp-programming) and share to help someone learn something today. If you want to share your experiences with competitive programming, software engineering, or anything similar to an audience of 2300+ subscribers, please reach out. I'll be more than happy to collaborate with you.
[Give it a read](https://albexl.substack.com/p/practical -tips-for-cpp-programming) and share to

Full text and comments »

  • Vote: I like it
  • -9
  • Vote: I do not like it

190.
By Ahmed_Hussein_Karam, history, 6 years ago, In English
pow() is bad ! One lesson I have learned on last Div #3 contest is "avoid using pow() function in C++, it is can lead to Wrong Answer". **I am sharing this with a practical example:** This [submission](https://codeforces.me/contest/1490/submission/107616999) works only if you replace `long long p = pow(n1, 3) + pow(mid, 3);` with `long long p = n1 * n1 * n1 + mid * mid * mid;` I feel like it is useful to sare it !
**I am sharing this with a practical example:**

Full text and comments »

191.
By Perhaptation, history, 4 months ago, In English
Perhaptation's thoughs on AI and competitive programming (Excerpted from Perhaptation's Stargazers (https://perstar.neocities.org/blog) &mdash; my personal website) As an ICPC contestant, I am preparing for my first regional contest to be held on September. Those days, I have seen someone said that competitive programming is slowly dying because of AI. I think this should be separated into two parts: (a) The ability of AI is overwhelming high, (b) The phenomenon of AI-assisted cheating. To be honest, as an ICPC contestant, I think the (b) is a secondary factor of the decay of competitive programming, because you can't use AI or even the Internet search in the ICPC-series contests. However, perhaps, the (a) is a key factor. The online competitive programming is declining because of (b) caused by (a), that is inevitable and undeniable as it is a certain result of the rising of AI (especially when OpenAI's ChatGPT can AK ICPC WF 2025 and CCPC Final 2025). Now, I would like to discuss this in detail. Firstly, I must say that I have too ...
applies to competitive programming because in my opinion it is more like a sport than apractical skills, competitive programming because in my opinion it is more like a sport than a practical skills, learning method, and a practical practice. Also, however, perhaps, for you, CP is a game, a puzzle

Full text and comments »

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

192.
By AlephZero01, history, 2 years ago, In English
AI division at Hacker Cup Hi, not sure if this topic has already been discussed, I might have lost something lately, sorry in this case. On the home page of the Hacker Cup there is the following announcement, since at least a couple of weeks: "In the 2024 Hacker Cup season, we'll allow you to compete in the human division as usual, or in the AI division in which all of your solutions must be written by a computer." That sounds like a significant move, I would say also exciting, and a lot of question arise, from practical ones like: "same problems?", "same duration?", "human and AI division at the same time?", "how is it checked that humans do not write the code?" to other ones like "how will CP evolve in the future?". Maybe [user:SecondThread,2024-06-26] as first of course, or anyone else would like to comment
, from practical ones like: "same problems?", "same duration?", "human and AI division at the same time, practical ones like: "same problems?", "same duration?", "human and AI division at the same time

Full text and comments »

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

193.
By Nickolas, 12 years ago, In English
A couple of articles about competitive programming Two papers by [user:kit1980,2015-05-08] and me: - **Declaratively solving tricky Google Code Jam problems with Prolog-based ECLiPSe CLP system**, The 30th ACM/SIGAPP Symposium On Applied Computing (preprint: http://arxiv.org/abs/1412.2304) - **Declaratively solving Google Code Jam problems with Picat**, Practical Aspects of Declarative Languages 2015 (preprint: http://arxiv.org/abs/1504.00977) And for a lighter reading, [Cognitive Biases in Competitive Programming](http://tcnickolas.blogspot.com/2015/03/cognitive-biases-in-competitive.html) :-)
Picat**, Practical Aspects of Declarative Languages 2015 (preprint: http://arxiv.org/abs/1504.00977, ) - **Declaratively solving Google Code Jam problems with Picat**, Practical Aspects of Declarative

Full text and comments »

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

194.
By trainsust, 12 years ago, In English
how to solve a practical programming task I want to write a program that can help me do these: 1.Automatically capture the newest Codeforces tasks,say, DIV2 C problem on the website. 2.Automatically send the problem into my e-mail. 3.The user can set the time when to send the e-mail. Is there any practical and simple method that I can do this task? (I can only do some input-output programming task,for example ,given an array and give back the sorted array.But I wonder how to solve a practical programming task like this :) . Is it a much different concept of programming?)
how to solve a practical programming task, user can set the time when to send the e-mail. Is there any practical and simple method that I can

Full text and comments »

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

195.
By MikeMirzayanov, 15 years ago, translation, In English
ACM-ICPC 2011 World Finals: Let's go! <p>Today Saratov delegation will go to the championship's finals. As you remember, we've been planning to go to Sharm El-Sheikh since January, watching their great February revolution anxiously. As a result, the finals were moved to Orlando (Florida, USA). Our delegation got a little smaller too, as May is a hot month and it's a long way from Russia to the USA.</p><p>Our team is famous on Codeforces. And that's not surprising! Just look at them:</p><img src="http://assets.codeforces.com/images/saratov-su2-1.jpg" style="width:440px;float:right;margin:1em 4em 1em 1em;"> <ul> <li>Maxim Ivanov (<span class="Apple-style-span" style="border-collapse: collapse; font-family: verdana, arial, sans-serif; font-size: 13px; "><a href="http://codeforces.me/profile/e-maxx" title="Полковник e-maxx" class="rated-user user-red" style="font-family: arial; text-decoration: none !important; font-weight: bold; color: rgb(0, 0, 204); ">e-maxx</a></span>) spends considerable time among the top rated users...
Methods. By the way, Kolya, let me remind you that you haven't yet got the pass for thepractical work, for the practical work!

Full text and comments »

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

196.
By death_bringer, history, 4 years ago, In English
How to learn Segment Tree? To get straight to the point. I know the basics and implementation of segment tree but I can't solve problems using it. Because I don't know its applications and advantages (Practical ones). So can anyone have a list of problems going from easy to a medium level so that I can try to get my basics straight? I kinda have the same problem for DSU. So, If anyone has list for that, please share it will be very helpful.
solve problems using it. Because I don't know its applications and advantages ( Practical ones).

Full text and comments »

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

197.
By deltixlab, 5 years ago, In English
Deltix Educational Resource We are excited to announce a new educational resource that is coming soon under the **Deltix** umbrella. Here is a list of paid part-time positions for teachers who want to join our rock star team: - Math & statistics - Algorithms & data structures - Data science - Advanced programming languages - Systems architecture - Networks and clouds - Practical time-series analysis - Machine learning - Security - Real-time backend (architecture) - Operating systems - Product strategy, vision, marketing and innovation Each discipline will include lectures and practical exercises. Some of them will also offer mentorship for the final project. Our resource will not be publicly available. Excited about the opportunity? Complete the form at https://forms.gle/spXr3DaSYmRYePER9 and we will get back to you with further information. Fill free to drop us a line at [email protected] if you have any questions.
languages - Systems architecture - Networks and clouds - Practical time-series analysis - Machine, Each discipline will include lectures and practical exercises. Some of them will also offer

Full text and comments »

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

198.
By mahesh_hacker, history, 3 weeks ago, In English
(Free for full version) Vim for VS Code Developers I created an ebook to help developers edit code faster — without leaving VS Code. Have you ever tried learning Vim? You probably discovered that it can make editing code feel incredibly efficient. Then came the modes, motions, operators, text objects, registers, and dozens of commands to remember. I wanted a simpler way to learn these concepts while continuing to use the editor I already knew. So I created **Vim for VS Code Developers: Master Fast Code Editing Without Leaving Your Favorite Editor.** Inside the ebook, you'll learn how to: - Navigate code using Vim motions - Combine operators, motions, and text objects - Apply Vim commands to real React and TypeScript examples - Improve your workflow with search, registers, and macros - Customize your VS Code Vim shortcuts - Follow a practical 14-day learning plan The goal isn't to memorize hundreds of commands. It's to build small habits that make everyday coding feel more natural and effici...
Code Vim shortcuts - Follow a practical 14-day learning plan The goal isn't to memorize, , and macros - Customize your VS Code Vim shortcuts - Follow a practical 14-day learning plan

Full text and comments »

  • Vote: I like it
  • -16
  • Vote: I do not like it

199.
By Moody_Nabil, history, 5 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,2021-10-21] and [uset:djq_cpp] for developing this technique. Thank [user:Miracle03,2021-10-21] for reviewing this article. [Chain Reaction](https://uoj.ac/problem/50) in UOJ Round 3 By [user:vfleaking,2021-10-21] **Statement** ​ You are given a set A, you need to compute gi=12∑j,k(i−1j)(i−1−jk)gjgk where i−1−j−k∈A. **Solution** ​ Let the EGF of g be x(t) and EGF of A be a(t). Thus x′(t)=12a(t)x2(t)+1. We can solve this equation by D&C and FFT in O(nlog2n). But there is a slower solution in O(nlogn). ​ For a polynomial equation f(x(t))=0, we can use the Newton's method to solve it. If we find a polynomial xn that x≡xn(modtn). We can derive the ...
. But I don't know whether it's practical. The most popular algorithm is O(n2+n1.5logn). You can

Full text and comments »

  • Vote: I like it
  • -95
  • Vote: I do not like it

200.
By degreeless, history, 14 months ago, In English
Choose wisely: Business programming or Competitive programming or both... If you have people depending on you parents getting older, a family to support this isn’t theoretical. You need to earn. In our field that means mastering business programming: writing readable code, designing reliable systems, understanding tradeoffs, and collaborating. Pure CP is great for sharpening the mind, but it’s a luxury if you’re under financial pressure. CP-only focus makes sense when you don’t have responsibilities and can afford to chase ranks. For the rest of us, CP plus real-world engineering is the winning combo. I’m a backend developer and newbie CP who is back after a year to get some dopamine here, so let me be brutally honest: business-programming skills matter most if you want to get and keep a real job. Being a great competitive programmer or having a high rank doesn’t automatically translate to being able to deliver in a company. Ranks look nice on a profile, but hiring and surviving in industry come down to practical skills and experience. If you’re wor...
come down to practical skills and experience., , but hiring and surviving in industry come down to practical skills and experience. If you’re

Full text and comments »

  • Vote: I like it
  • -21
  • Vote: I do not like it

201.
By Michael, 15 years ago, translation, In English
Yandex.Algorithm Finals <img src="http://img-fotki.yandex.ru/get/5111/14594669.1/0_7da5c_affb50ad_L.jpg" style="float:right;width:250px;margin:0.5em;"> <p>Hi everybody!</p> <p>Yandex.Algorithm finalists were gathering in Dolgoprudny... Everybody in their own unique way :)</p> <p> <a class="rated-user user-red" href="http://codeforces.me/profile/dzhulgakov" title="General dzhulgakov">dzhulgakov</a>, <a class="rated-user user-red" href="http://codeforces.me/profile/pieguy" title="Lieutenant colonel pieguy">pieguy</a>, <a class="rated-user user-red" href="http://codeforces.me/profile/levlam" title="Lieutenant colonel levlam">levlam</a>&nbsp;and&nbsp;<a class="rated-user user-red" href="http://codeforces.me/profile/Progger" title="Colonel Progger">Progger</a> turned out to be the most organized and arrived at the start of the <a href="it-edu.fizteh.ru/en">Summer School</a>. They've already socialized with other participants and began solving and competing in the practical bioinformatics problem using ...
with other participants and began solving and competing in the practical bioinformatics problem using, practical bioinformatics problem using a distributed Hadoop <http://hadoop.apache.org/> cluster

Full text and comments »

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

202.
By pani.natalia, 5 years ago, In English
Is it true that getting red can be easier in certain periods? The current color scheme was introduced in [October 2015](https://codeforces.me/blog/entry/20638) and updated in [May 2018](https://codeforces.me/blog/entry/59228). One of the reasons was that getting red had become “much easier”. Is it true that at some period it could be easier? Certainly it is not my practical concern, but I still wonder ) So how can we measure this ease to get red? It looks like it will be several iterations but for base line I would like to know what percent of CF users are red. I ran [the script](https://github.com/NataIss/CFUserRating) and found number of active users of every colors and every title for the end of 2018, 2019, 2020 and 2021. I mean number of users who were active in the corresponding period. Feel free to download .csv files and play with them, but it is really convenient to do it in Tableau – this is the [dashboard](https://public.tableau.com/app/profile/natalia5014/viz/CFUsersbyColors/Dashboard?publish=yes) with selective options. Its left...
not my practical concern, but I still wonder ) So how can we measure this ease to get red? It

Full text and comments »

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

203.
By beatoriche, history, 9 years ago, In English
Idea for myopia prevention Human eye chromatism is remarkably constant, our eyes focus blue about 1.5 diopter stronger than red. So if a computer alternates color of text against black (important) background, you can have some exercise for eyes at the same time while you're shitposting. (You also might want to add something non-readable of opposite color (to text) so total light flux remains the same; I think boxes around letters, or text underline would be good. I also tried a method where one color channel is blurred and the other is sharp, but the result looks very bad) I implement a sample in a QtWebkit, but many sites don't work well in that minimal browser. Probably more practical would be to extend **Reader** plugin for web browsers. Thoughts?
many sites don't work well in that minimal browser. Probably more practical would be to extend, . Probably more practical would be to extend **Reader** plugin for web browsers.

Full text and comments »

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

204.
By determinism, 12 years ago, In English
Second Shortest Path I've come across to [this](http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=1283) problem on UVa. It basically asks for second shortest path. I've looked it up on the internet, but I couldn't find any practical implementation of it. Are there any good tutorial on this topic? Note: I'm asking about both SSP and APSP. Also, is second shortest path simpler than more general kth shortest path algorithms in terms of complexity? UPD: Thank you really much for your help, I've solved the problem! But the thing is nobody has mentioned any algorithm for All-Pair Second Shortest Path problem yet. Can someone who is knowledgeable about this problem explain it?
. I've looked it up on the internet, but I couldn't find any practical implementation of it. Are

Full text and comments »

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

205.
By HolaSoyLamp, history, 5 years ago, In English
The feasibility of a local judge program? Hello Codeforces community! I've been thinking on the possibility of a judge that runs in the user's machine. This would have many practical advantages like configuring the judge to support any programming language or adding custom compilation commands. Would be possible to develop a program like that? I hope someone with experience in the development of online judges could illuminate me with their knowledge. Thanks in advance
user's machine. This would have many practical advantages like configuring the judge to support any

Full text and comments »

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

206.
By grhkm, history, 3 years ago, In English
Power Series Composition in Near-Linear Time Rejoice. https://arxiv.org/pdf/2404.05177.pdf From what I heard, this seems practical, so maybe there will be uses in OI?
From what I heard, this seems practical, so maybe there will be uses in OI?, Rejoice. https://arxiv.org/pdf/2404.05177.pdf From what I heard, this seems practical, so

Full text and comments »

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

207.
By inwatchsale, 14 years ago, In English
Very Happy With the amazing Breitling Rolex Replica <p>Duplicate Breitling view is just one the best-selling fake view due to the internationally interest in real Breitling timepieces. The Swiss-built Breitling timepieces are highly accurate chronographs ideal for specialists for example aviators. But not for-experts would like to try possessing a really view due to the fact these kinds of timepieces generate them trendy and chic <a href="http://www.inwatchsale.com/replica-a-lange-sohne-watches-for-sale-cb15.html">replica a langge sohne watches</a> .<br><br> <br><br> Thought to be as the the best choice and trendy view, Breitling timepieces are thus costly. Many people with standard salary would discover them expensive for these kinds of a wrist watch though they like it a great deal. Frequently, a genuine Breitling view may be valued at of Bucks5,000 or more. The charge is different from pattern to create. Some unique Breitling timepieces are simply just readily available in less than 150 products, leading them to pretty much tough ...
. Outstanding and value of their total timepieces unique tremendously. It's practical to

Full text and comments »

  • Vote: I like it
  • -26
  • Vote: I do not like it

208.
By muskan_017, history, 4 years ago, In English
What is Intelligence?By Muskan Tarannum Intelligence is a logic its shown by the actions how a person perfoms and takes everything in a way. Intelligence can be defined in many different ways, but in general, it refers to the ability to learn, understand, and apply knowledge and skills to solve problems and achieve goals. Intelligence can be measured in various ways, such as through IQ tests, academic achievement, and practical problem-solving abilities. However, it's important to note that intelligence is not just about raw cognitive ability or academic achievement. Other factors, such as creativity, emotional intelligence, social skills, and practical experience, can also play a significant role in determining a person's overall intelligence and success. As for Muskan Tarannum's belief in the universe, this may reflect her spirituality or worldview, but it does not necessarily relate directly to her intelligence. Intelligence is a complex and multifaceted concept that can manifest in many different ways, and it's im...
can be measured in various ways, such as through IQ tests, academic achievement, andpractical, practical experience, can also play a significant role in determining a person's overall intelligence and

Full text and comments »

  • Vote: I like it
  • -38
  • Vote: I do not like it

209.
By naved, 12 years ago, In English
Can you help me Solve this problem ? I have a problem for which I am not getting optimal answer from last 3 days Problem is as Below **Given a graph G find the shortest distance between Source to Destination node but you MUST PASS THROUGH ALL THE NODES before going to destination BECAUSE THEY ALL are MUST_PASS nodes.** **Additional info:** - -you can pass any node more than once if required to get optimal answer - -max number of nodes is 22 including source & destination **What I tried so far** - brute-force : simple permutation will give you the answer for small n , but since upper bound is 20, it is not practical 20! duhh :( - TSP with DP: problem with this is I Start from Source visit all nodes except destination & comes back to start, now if I go back to last node which I visited and from their if I go to destination one might think that this will give me optimal result, but the result is sub-optimal and not optimal ...:( - suppose each must_pass node is named as C, Start as S, destination as D, t...
, but since upper bound is 20, it is not practical 20! duhh :(

Full text and comments »

  • Vote: I like it
  • -6
  • Vote: I do not like it

210.
By ManGeo, history, 5 years ago, In English
Reflections in Problem Solving We live in a steadily upgrading society. Problem solving and algorithmic thinking is an art which has steadily defined human progress over quite some time. Although this art has defined progress over centuries, the computer age has significantly highlighted it as a progressive entity rather than a passive one. Many people believe that this is the era of rapid technological advancement. Day after day each sector of industry is undergoing automation advancement, thanks to the surplus of computer science engineers and software professionals. While monitoring closely we find changes, we may find rapid development, but the reality is quite different. It is definitely a hidden fact far from our reach, now. Problem solving is an art humans have developed over millenniums. We are millennials in our thought evolution. Today every country's education system is competitive. Every job prospect competitive. Humans have become competitive to achieve short term goals of name and fame, with their only...
where automation had no practical sense.

Full text and comments »

  • Vote: I like it
  • -11
  • Vote: I do not like it

211.
By I_AM_MOSOL, history, 2 years ago, In English
what is the benefit of struct Solver? I see some very good coders such as snuke, Petr do this. struct Solver and writing their actual solution in the Solver's method void solve(). Is there any practical benefit of doing this?
solution in the Solver's method void solve(). Is there any practical benefit of doing this?

Full text and comments »

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

212.
By albeXL, history, 2 years ago, In English
Practical Software Development Skills from Competitive Programming Throughout my competitive programming years, I developed valuable skills that I still use in my daily work as a software engineer. [Here](https://albexl.substack.com/p/the-useful-software-development-skills) are some of the most useful. Please share yours in the comments.
Practical Software Development Skills from Competitive Programming

Full text and comments »

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

213.
By Gaurav_Dawra, history, 4 years ago, In English
CKer classes Introducing **CKer classes** for competitive programming ! This is a 4 month course designed to help beginners in competitive programming take it to the next level! With assorted topics from different backgrounds, this course course provides **detailed theory, practical implementations, practice questions, contests** and much more.... This course will be helpful for people rated below and around 1300! Here is the course structure: [bit.ly/3TQNsdW](https://bit.ly/3TQNsdW) and link for the telegram group: [t.me/+q2_O8fJkRK05YjE1](https://t.me/+q2_O8fJkRK05YjE1) Regular doubt resolution sessions will be held and **handpicked questions and contests** will help you firmly grasp every concept! ![ ](/predownloaded/1c/54/1c546dfc06247e613880ea997dafae6b984ababf.png) The only pre-requisite for the course is being comfortable in at least one programming language! Start your journey in competitive programming with us today!!! For any queries, feel free to ask in DM
different backgrounds, this course course provides **detailed theory, practical implementations, practice, theory, practical implementations, practice questions, contests** and much more....

Full text and comments »

  • Vote: I like it
  • -33
  • Vote: I do not like it

214.
By duckladydinh, history, 7 years ago, In English
Why not support popular packages for algorithms? Okay, I know CP is all about ACM and IOI where only self-generated code is permitted, but does Codeforces, Hackerrank and the likes really have to stick to someone else's rules? I mean, does allowing package not promote the correlation between CP and practical programming? Does using package not promote thinking over (but not underrating) implementation? Does it not provide more room for slow languages such as Python? Does it not promote the development of new packages in algorithms and data structures and consequently promoting the popularity of CP among the world of developers (a simple search on Google for algorithm library would throw a bunch of stuff for pytorch and tensorflow)? Maybe supporting all is no good, but I think there are many advantages to support a few popular options such as numpy, igraph, boost, apache-commons... and the likes. What do you think? Just a suggestion :) Happy Coding!
package not promote the correlation between CP and practical programming? Does using package not

Full text and comments »

  • Vote: I like it
  • -30
  • Vote: I do not like it

215.
By MhxCN, 3 years ago, In English
My Youth's Path to Learning Programming Hello codeforces! Hello everyone, I am Ma Haoxuan, a middle school student from the Tianhuan Campus of Chengdu No.7 Middle School, Chengdu, China. My current mood is excitement and joy. Just eight hours ago, I finished my first CF competition in life. But I didn't complete the competition, I only worked for 3 hours, and because I was too tired, I didn't have the level to complete the remaining questions. I didn't do it very well, in fact, I would like to know how the top few bosses completed the A question in just one minute. Today, I am want to introduce my path to learning programming to you. It's my pleasure. I have studied programming for seven years and now I have a good foundation. I also understand the three languages of Chinese, English, and Russian (Russian is not very good). Of course, I apologize for any errors in the following articles. My Journey of Learning Programming My interest in programming began when I was 7. At that time, I was fascinated by the idea...
great way to apply my skills in a practical setting and to learn from others who had more, to practice more problem. It was a great way to apply my skills in a practical setting and to learn

Full text and comments »

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

216.
By bdfhjk, 15 years ago, In English
Ubuntu Algorithm Classes Hello, On Friday, April 13 17:00 UTC[1], at channel #ubuntu-classroom (freenode.net server) the first workshop Ubuntu Algorithm Classes are held, which are dedicated to the practical application of the algorithms in programming. I invite everyone, especially beginners, to participate. Workshops have their own online judge system, which now includes the tasks. I encourage you to exercise, the workshops are simple and focused on learning specific methods / algorithms. Online judge: http://onlinejudge.xn.pl Notes can be found at: https://docs.google.com/document/d/1CHU5TgXegp6IkRQhx7ok9HFNMPVONiWojbkIgfdFJrQ/edit For more information, visit: http://bdfhjk.blog.pl [1]http://www.timeanddate.com/worldclock/fixedtime.html?msg=Algorithm+Classes&iso=20120413T19&p1=262&ah=1 Marek Bardoński
first workshop Ubuntu Algorithm Classes are held, which are dedicated to the practical application, workshop Ubuntu Algorithm Classes are held, which are dedicated to the practical application of the

Full text and comments »

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

217.
By spakk9, history, 6 years ago, In English
New Education System Introduced In India (after 34 years) *Very important decision by Indian Government* New Education Policy 2020 is announced 1. 10+2 board structure is dropped 2. New school structure will be 5+3+3+4 3. Upto 5 pre school, 6 to 8 Mid School, 9 to 11 High School , 12 onwards Graduation 4. Any Degree will be 4 years 5. 6th std onwards vocational courses available ( **also coding will be introduced at such young age** ) . 6. From 8th to 11 students can choose subjects 7. All graduation course will have major and minor Example &mdash; science student can have Physics as Major and Music as minor also. Any combination he can choose 8. All higher education will be governed by only one authority. 9. UGC AICTE will be merged. 10. All University government, private, Open, Deemed, Vocational etc will have same grading and other rules. 11. New Teacher Training board will be setup for all kinds of teachers in country, no state can change 12. Same level of Accreditation to any collage , based on its rating collage w...
knowledge of any subject only 18. More focus on student practical and application knowledge 19. For, of any subject only 18. More focus on student practical and application knowledge 19. For any

Full text and comments »

  • Vote: I like it
  • -47
  • Vote: I do not like it

218.
By DKarev, 12 years ago, In English
Persistent Data Structures Hi! I need information about some persistent data structures. I need them for a project. So up to now I have learnt persistent index trees (RMQ) and persistent segment trees (some kind of lazy propagation). And now i can't find anywhere information about other persistent structures. Please, help me if you can. I need all sort of information about these structure. Maybe some problems, analyzes, explanations or even some practical uses. I will be very grateful if you explain me structures like **Persistent Union-Find**, **Persistent Heap** or another one. P.S. If it is not too much, I also need some explanations about **Retro Active Data Structures**.
, explanations or even some practical uses. I will be very grateful if you explain me structures like

Full text and comments »

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

219.
By shaniommusifs, 14 years ago, In English
Quick Fat Burning Procedure - Soften Excess fat of Obstinate Unwanted fat At a distance Every single 2 Weeks On This Simple Diet Regime! There is no time burying your mind and just hoping issues have been unique, even if cleaning up, was over that weeks time. See where you excel and the place you don't, this will help get a superior idea of what excess fat you want to, and may, attain by way of this lifestyle altering eating plan you want. You will be wanting to know, what exactly is excessive weight undertaking during my valuable lifestyle. This morbid obesity may be impacted for your a person and possesses no pub. It might be get shortened to kids, adolescents or maybe adults. Many of the odds that you can get diagnosed to overweight dilemma are classified as the kid's and young adults. The majority consult several expert and medical doctors by what is unhealthy weight. <a href=http://buyphen375.terapad.com>clicking here</a> Weight training exercise is an ideal work out for your fat loss diet, because it can grow your body metabolic processes amount for as much as 40 hrs --- even after you have executed the work...
individuals through the weight loss diet, not only is it pleasurable, but will it bepractical for you

Full text and comments »

  • Vote: I like it
  • -30
  • Vote: I do not like it

220.
By Mr_Tree_HLD_LCA_Master, history, 6 years ago, In English
Partner to help me make a simple "Find all valid Coupons" program with reward. Good morning everyone. I wanted to do something other than cp these days since IOI selection is coming soon.So i decided to make something like an checker to find coupons. To be more detailed there is a popular site in my country where you order food online.However there is a coupon place were you put a coupon number/string an you get some money off. So the guy who made the site is not good and he made it such that the coupons are always of the form foodlove and some number after. Like a coupon might be foodlove133 ,foodlove4556 .So its foodlove and a number with at most 10 digits. But not all coupons are valid. So i want to find someone with experience before to help me make a program that automatically checks every coupon and finds all that are valid. You will be rewarded good to help me to this. Also this has nothing to do with cp, its more on the practical side rather than the algorithms side. Dm me to know more and to help me. Thank you!
Also this has nothing to do with cp, its more on the practical side rather than the algorithms side.

Full text and comments »

221.
By WA_and_Chill, history, 10 months ago, In English
How Can I Download All My Codeforces Accepted Submissions? I want to download all of my accepted Codeforces submissions and upload them to GitHub. Since the number of submissions is quite large, doing this manually one by one is not practical. Is there any official or reliable way to download all of my submissions at once, or an alternative method that works within Codeforces’ current security restrictions?
number of submissions is quite large, doing this manually one by one is not practical.

Full text and comments »

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

222.
By Alex7, 11 years ago, In English
Training? Would it be practical to make a suggested list of problems for training based on rating ranges?
Would it be practical to make a suggested list of problems for training based on rating ranges?

Full text and comments »

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

223.
By revenge5, 13 years ago, In English
the original village party divided, removal of the original village party branch secretary, sent under the town served as the first secretary of the village cadres, The village party organizations effectively solve the heavy tasks, work force issues is weak.Centralized party<a href="http://www.maxsalesupras.com/nike-air-max-90-c-16.html">nike air max 90 womens</a> organization to carry out rectification work are weak and lax village, Shanshan not "willing" to spend effort and "willing" real thing. By hiring pie, etc., from the counties as units under the township authorities to send eight section-level cadres, 27 reserve cadres to the village Party branch secretary and branch members; organizations are weak and lax on illegal religious activities and can not control, reluctance tube, 21 tubes of the village Party branch secretary and 205 will not work no responsibility incompetent village cadres to be adjusted. Adjust staff accounted for 47%, respectively, 31.8% and village cadres, the village Party branch se...
nationalities to solve practical problems. "Golden Waterway" to "Yangtze

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it

224.
By ciples89, 13 years ago, In English
because the calculation error e case should be taken in writing a combination of trial conduct, subsequently reiterated on many occasions for some significant impact and high social concern commutation, parole case should be hearing requirements.Central Political and Law Commission early introduction of the "strict norms regarding commutation, parole, temporary probation practical guidance on preventing corruption in the judiciary" and demanded within the framework of Criminal Law, Criminal Procedure Law, and for commutation, parole, temporary probation (mainly medical parole) fully embodies the spirit of strict, severely prosecuted illegal c<a href="http://www.airmaxssalomon.es/nike-air-max-90-c-10.html">nike air max 90 venta online</a> onduct commutation, parole, temporary legal, disciplinary responsibility of probation. Drawing / Sand NanCaseFormer Vice Minister of the United Front Departmen t of Guangdong Provincial Party Committee intends to be returned commutationSupreme said yesterday, the Guangdong High Co...
regarding commutation, parole, temporary probation practical guidance on preventing corruption in the

Full text and comments »

  • Vote: I like it
  • -16
  • Vote: I do not like it