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

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

Results

1.
By lotusblume, 15 months ago, In English
Worst-Case Graphs for Maximum Flow Algorithms Maximum flow algorithms are known to perform significantly better in practice than their worst-case time complexities would suggest. So in this blog, I will present graphs on which the following maximum flow algorithms actually achieve their worst-case running time: | Algorithm | Time Complexity | | ----------------------- | ------------------------------ | | Ford-Fulkerson with DFS | $\mathcal{O}\big(m^2 \cdot U)$ | | Edmonds-Karp | $\mathcal{O}\big(n \cdot m^2\big)$ | | Dinic | $\mathcal{O}\big(n^2 \cdot m\big)$ | | DFS with Scaling | $\mathcal{O}\big(m^2 \cdot \log(U)\big)$ | | Dinic with Scaling | $\mathcal{O}\big(n \cdot m \cdot \log(U)\big)$ | | Most Improving Augmenting Paths | $\mathcal{O}\big(m \cdot \log(U) \cdot (m + n \cdot \log(n))\big)$ | | FIFO Preflow Push | $\mathcal{O}\big(n^3\big)$ | | Highest-Label Preflow Push | $\mathcal{O}\big(n^2 \cdot \sqrt{m}\big)$ | Here and in the rest of this blog: - $n =$ number of vertices, ...
= \Omega(n^2 \cdot \sqrt{m})$ pushes. ![ ](/predownloaded/4d/15, ![ ](/predownloaded/4d/15/4d15ded7c8e4902e8f2a0e4170d2d64da936d2ca.svg)

Full text and comments »

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

2.
By awoo, history, 6 years ago, translation, In English
Educational Codeforces Round 100 [Rated for Div. 2] Hello Codeforces! On [contest_time:1463] [contest:1463] 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-12-16] Glazov, Adilbek [user:adedalic,2020-12-16] Dalabaev, Vladimir [user:vovuh,2020-12-16] Petrov, Ivan [us...

Full text and comments »

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

3.
By BitByBit123, 3 months ago, In English
Suspicious Master yql0991666 Update on 8/18/2026: [user:yql0991666,2026-08-18] have cheated to become a Master. How can he still not be banned? Update: Congratulations to [user:yql0991666,2026-08-18], the CHEATER is disabled! Good job, Mike! I, [user:BitByBit123,2026-08-10], suspect that [user:yql0991666,2026-08-18] is a cheater. I would like to report some suspicious behaviors and request an investigation. # Update on 8/18/2026 [user:yql0991666,2026-08-18], could you explain [387437964](/contest/2257/submission/387437964 "Submission 387437964 by yql0991666") [387437988](/contest/2257/submission/387437988 "Submission 387437988 by yql0991666") how can you write 1.6KB code in 3 seconds? Looking at the code for Problem E, what kind of person would write such a long definition on a single line (the fourth line)? If you interpret this as a way to make the code more compact (by consolidating lines), then why are the assignment statements on lines 19 through 24 separated? The only explanation is that...
![ ](/predownloaded/56/4d/564d86704f97c51f141266795f627638b1c84e65.png), . ![ ](/predownloaded/5a/40/5a4080b0834ef65eb06f16209598891f853350c9.png) ![ ](/predownloaded/56/4d

Full text and comments »

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

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

Full text and comments »

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

5.
By Errichto, 10 years ago, In English
Good Bye 2016 — hints and codes You can download my codes to all problems [here](http://www.filedropper.com/codes_1). I will write a full editorial in the next few days. Now you can read hints and short solutions. [problem:750B] <spoiler summary="hint"> Create a variable that will denote your current distance from the North Pole. What are allowed values of this variable? When can't we go West or East? </spoiler> [problem:750C] <spoiler summary="hint1"> Let $x$ denote the initial rating (or his final rating, whatever is easier for you to think about). The information that Limak is in some division in the $i$-th contest gives us some inequality for $x$. Can you see it? </spoiler> <spoiler summary="hint2"> For every contest we know that the current rating is $x$ increased by some prefix sum of c_i (changes of rating). If Limak is in the division 1, we have inequality x+prefSum >= 1900 so we have x >= 1900-prefSum. If Limak is in the division 2, we have inequality x_prefSum <= 1899 so it is ...
we know the distance from $A$ to the root of the tree? ![ ](/predownloaded/86/ 4d, ![ ](/predownloaded/86/4d/864d64c8a69ce6967536cb5a8feb672972e2af98.png)

Full text and comments »

Tutorial of Good Bye 2016
  • Vote: I like it
  • +168
  • Vote: I do not like it

6.
By gojira, 5 years ago, In English
A look at Competitive Programming post-hibernation Hello friends! As I've recollected in a previous [post](https://codeforces.me/blog/entry/97566), I am an old competitor who hadn't really participated since ~2014, and recently got a bout of nostalgia to return to Competitive Programming. So, I did a couple Topcoder SRMs, suffered through some SNWS rounds, participated in [three regional 5hr competitions](https://contest.yandex.ru/3QF2021) on three consecutive days, and dozed off at every Codeforces contest I tried to wake up for. A lot of things are still the same as 8 years ago: [user:tourist,2022-01-26] is still at the top, grey coders still ask for how many minutes to solve a problem before reading the editorial, Russian university teams [continue winning](https://icpc.global/worldfinals/results) ACM ICPC, and Snarknews never gives up on his alternate competition formats. But in this post, I want to focus on the new patterns that emerged since my last time around. #### #1: Codeforces rounds timing Did you know that t...
![ ](/predownloaded/0f/4d/0f4d857b6f18c4799f10736c842fd0579f83ae79.jpeg)

Full text and comments »

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

7.
By Wxssim, 23 months ago, In English
From 0 to ICPC in 1 Year **Welcome to my first blog!!** <br> &nbsp;&nbsp;&nbsp;&nbsp; I'll be sharing my journey in the cp world and how I managed to qualify to ICPC 1 year and 3 months (sorry for the clickbait) into my cp career. If you're curious what it took to achieve this, or if you're looking for some motivation or inspiration, this blog is for you :) <br> A special thank you to [user:alnq417,2024-12-12] for helping me cook this blog <3 <br><br> ### _Starting My CP Career:_ _LCPC 2023 Fail_ &nbsp;&nbsp;&nbsp;&nbsp; One month before LCPC 2023 (Lebanese Collegiate Programming Contest), my university informed me about the competition. I was a second year student at that time so I quickly formed a team and registered, not knowing anything about the competition at all. I had high hopes, thinking it would be something similar to what I was studying at university and I assumed I'd do well. <br><br> &nbsp;&nbsp;&nbsp;&nbsp; Fast forward a month, I solved the easiest 4 problems in the competition and r...

Full text and comments »

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

8.
By TheScrasse, 3 years ago, In English
Editorial of Codeforces Round 889 (Div. 1 + Div. 2) The official implementations of all the problems are [here](https://drive.google.com/file/d/1stkidhN_ftTOzK4qcMYxkUAlwWWb3AqF/view?usp=sharing). [problem:1855A] Author: [user:Kaey,2023-07-23]<br> Preparation: [user:akifpatel,2023-07-23] <spoiler summary="Hint 1"> What's the most efficient way to make the sad students happy? </spoiler> <spoiler summary="Hint 2"> In most cases, you can make $2$ sad students happy in $1$ move. </spoiler> <spoiler summary="Solution"> Let $s$ be the number of sad students at the beginning. The answer is $\lceil \frac{s}{2} \rceil$. In one move, you can make at most $2$ sad students happy (because you can change the position of at most two students), so you need at least $\lceil \frac{s}{2} \rceil$ moves. In fact, you can make everyone happy in exactly $\lceil \frac{s}{2} \rceil$ moves: - while there are at least $2$ sad students, you can swap them and both of them will be happy; - if there is exactly $1$ sad student left, you ...
The 4d version is not too different from the 2d one.

Full text and comments »

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

9.
By alexlikemath007, 4 years ago, In English
A proper tutorial for one of the craziest 3D-geometry problems Warning: This problem is like the warden of competitive programming. It is a force of nature &mdash; like a hurricane, and when you see a hurricane you don't fight it, you run. It is a big bad boss with a bunch of hitpoints, and deals big damage to your sanity. But when you kill it, it doesn't drop much loot, experience, or educational value compared to other problems. It would be wiser to go and solve some problems and learn how to use binary search. The problem: https://codeforces.me/gym/102452/problem/F It's tutorial says: Since n is small, $O(n^2)$ simulation is OK. Advanced 3-D geometry methods are highly required. The tutorial doesn't describe what the advanced 3-D geometry methods are. So, I have written this blog to remedy that gap. <spoiler summary="Chapter 1. Prologue"> You should create a `point` struct this makes things a bit easier. It has an `double x`, `double y`, `double z` coordinate. This point will be immensely useful, as we can define a line segment...
, 0, \frac{1.5}{\sqrt{6}})$ (https://www.qfbox.info/4d/tetrahedron) It has 6 edges and it has 4, }}), (0, 0, \frac{1.5}{\sqrt{6}})$ (https://www.qfbox.info/4d/tetrahedron)

Full text and comments »

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

10.
By awang11, history, 8 months ago, In English
Codeforces Round 1085 (Div. 1 + Div. 2) <center> <table class="tex-tabular bordertable" style="border-left: none; border-right: none; border-top: 1px solid; border-bottom: 1px solid; border-collapse: collapse;"> <tbody> <tr> <td class="tex-tabular-text-align-center" style="border-left: none; border-right: none; border-top: none; border-bottom: none;"> <span class="tex-font-size-small"> <span class="tex-font-style-it"> <a href="https://www.youtube.com/watch?v=1bvDHAUv2ak">Gusty Garden Galaxy — Mahito Yokota, Super Mario Galaxy</a> </span> </span> </td> </tr> </tbody> </table> </center> <p style="text-align:center"> <img width="50%" src="/predownloaded/9f/72/9f722a2e91e0a8a38ca368e42ef6469712b196bc.png"> </p> Hello, Codeforces! [user:IceSerpent,2026-03-04] and I are pleased to invite you to [contest:2207] on [contest_time:2207]! While some of us will be turning our clocks an hour forward for daylight savings, our...
.png">$\quad\ \ \ \ \ \,$

Full text and comments »

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

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

Full text and comments »

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

12.
By MikeMirzayanov, 9 years ago, translation, In English
ACM-ICPC World Finals 2017 <center> <img src="/predownloaded/4d/47/4d475972ef3e14948e881152064cc208a4f83540.png"/> </center> ACM-ICPC World Finals 2017 will begin on <a href="https://www.timeanddate.com/worldclock/fixedtime.html?msg=ACM+ICPC+2017+World+Finals&iso=20170524T09&p1=1920&ah=5">May 24, 2017 at 15:00 (UTC)</a>. This event is the main event of the year in the world of sports programming! This year ICPC Regional participation included 46,381 of the finest students and faculty in computing disciplines from 2,948 universities in 103 countries on six continents. A record 50,145 students and 5,073 coaches competed in ICPC and ICPC-assisted competitions this year, setting new records in participation. Codeforces wishes the teams to show a vivid and interesting contest contest. We wish to find beautiful solutions, write without bugs and enjoy many accepted problems! Links: * <a style="font-weight: bold;" href="http://static.kattis.com/icpc/wf2017/">Current results</a> * <a href="https:/...

Full text and comments »

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

13.
By kiwii, history, 3 years ago, In English
[Tuωutoωoial] Convex Polygon Counting Hi everyone, today I'm back with another blog that sadly, [user:nor,2023-10-19] won't have to spend 45 minutes GPT-ing my anime and kaomoji propaganda to read it. &#2798;&#8333; &#707; &#10521; &#706; &#8334;&#4304; &#x1f445; --- Not sure whether there is another blog explaining this technique in a "so many visualizations" manner. There are so many paper about these problems in particular. So please put your opinions and any other similar techniques you know in the comment section &#x1f4c3;&#x1f4c3;&#x1f4dc;. I think this is a "very known technique" for <span class="rated-user user-red">GM</span>s, so you guys might want to skip reading this blog. I also do expect this is a "very common geometry problem" in China or something but, here is my attempt on explaining it. Here is a cute quote by me oωo > When it comes to polygon problems, sometimes you have to see &#128038; &#127872; &#120008;&#119890;&#119892;&#120002;&#119890;&#120003;&#120009; &#127872; &#128038; in...
![image-20231019183044685](/predownloaded/ad/4d /ad4dac22e84dae5dd065ad2c4b2c82d47fcbfe6b.png), ](/predownloaded/ad/4d/ad4dac22e84dae5dd065ad2c4b2c82d47fcbfe6b.png) In short, our upper hull (black

Full text and comments »

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

14.
By tch1cherin, history, 9 months ago, In English
[Tutorial] On Applications of CDQ Divide & Conquer _This tutorial is nominated for the [blog posts competition](https://codeforces.me/blog/entry/149422) from [user:cadmiumky,2026-02-07]. Thanks to him for this initiative!_ _Also thanks to [user:Ghos007,2026-02-08], [user:dima210121012101,2026-02-08], [user:dmitryAdams,2026-02-08] and ChatGPT for proofreading this post and giving useful feedback._ --- CDQ Divide & Conquer is an interesting algorithmic technique that nobody talks about (at least in Russian CP community). However, it is quite powerful, as it often provides unexpectedly clean solutions to seemingly tedious problems. In this tutorial, I will discuss different contexts where this method is useful. I also want to collect what I have seen about this technique on the Internet in one place and add my own insights. Credit to [robert1003's blog](https://robert1003.github.io/2020/01/31/cdq-divide-and-conquer.html) where I first learned this method. The main idea of this technique is to calculate the **influence/contr...
; } }; ~~~~~ ##### Tasks for practice You can try to apply 4D CDQ in [IZhO 2020 Nasty Donchick, You can try to apply 4D CDQ in [IZhO 2020 Nasty Donchick](https://qoj.ac/contest/2120/problem/12109

Full text and comments »

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

15.
By taha06, history, 3 years ago, In English
SD Segment Tree Variation, A Shorter And More Efficient Segment Tree Segment Tree is a powerful data structure in programming, that is why it can still be optimized way more. In this blog I will explain one optimization that can make a basic segment tree slightly faster and easier to write. (idea and the code by me) This does not work on range update range query segment trees. Introduction: ================== Let's consider a point update range query segment tree, while querying we visit many of useless Nodes along the way in order to answer the query moving from the root downwards. ![ ](/predownloaded/ef/4d/ef4d1dcb34f2560f3ddad1fa2f1dd9947e13ebce.png) As you can see, there are nodes (marked in red) that are not needed during the recursion, and we only need to visit the important nodes (marked in green). This is only true when querying in a point update segment tree or updating in a point query segment tree. Main Idea: ================== We can solve a query range $[l, r]$ by noticing we can make it a smaller range $[l + X , r]$, ...
moving from the root downwards. ![ ](/predownloaded/ef/4d, ![ ](/predownloaded/ef/4d/ef4d1dcb34f2560f3ddad1fa2f1dd9947e13ebce.png)

Full text and comments »

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

16.
By siplusplus, 3 years ago, In English
ICPC WF 2023 Luxor -- Trade for Indomie Hi, and let me get straight to the point. **Do you want to trade your local instant noodles for the Indonesian Indomie?** [cut] ![Indomie Mi Goreng](/predownloaded/27/38/273832cde35d7bfa898998030b791f442dc78685.jpg) Image courtesy of Indomie &mdash; PT Indofood Sukses Makmur Tbk. ICPC WF 2023 Luxor is coming soon. I am planning to bring some packs of Indomies there. Probably the original Mi Goreng (Fried Noodles). I'm from Bina Nusantara University (Indonesia), and I will be staying at Jolie Ville Resort during the ICPC WF 2023 with my team. Perhaps we could trade instant noodles during the Arrival/Departure dates? ICPC WF Schedule: https://docs.icpc.global/wf-schedule/ I don't know if this is a good/bad idea. wdyt? **Update (5 Apr 2024)**: I have bought 80 packs of Indomie. **Update (11 Apr 2024)**: Me with the team! left to right: me, [user:rfpermen,2024-04-11], [user:Zanite,2024-04-11], and [user:vioalbert,2024-04-11] ![okePeko Team](/predownloa...
![okePeko Team](/predownloaded/4d /a6/4da6a64f5633692c1a6ae00f1319d855427d9532.jpg), ](/predownloaded/4d/a6/4da6a64f5633692c1a6ae00f1319d855427d9532.jpg) On the arrival day, I'm planning to use

Full text and comments »

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

17.
By JaySharma1048576, 5 years ago, In English
Codeforces Round #730 (Div. 2) Editorial #### [A: Exciting Bets](https://codeforces.me/contest/1543/problem/A) <spoiler summary="Hint 1"> $GCD(a,b)=GCD(a-b,b)$ if $a>b$ </spoiler> <spoiler summary="Hint 2"> $a-b$ does not change by applying any operation. However, $b$ can be changed arbitrarily. </spoiler> <spoiler summary="Tutorial"> If $a=b$, the fans can get an infinite amount of excitement, and we can achieve this by applying the first operation infinite times. Otherwise, the maximum excitement the fans can get is $g=\lvert a-b\rvert$ and the minimum number of moves required to achieve it is $min(a\bmod g,g-a\bmod g)$. <spoiler summary="Proof"> Without loss of generality, assume $a>b$ otherwise we can swap $a$ and $b$. We know that $GCD(a,b) = GCD(a-b,b)$. Notice that no matter how many times we apply any operation, the value of $a-b$ does not change. We can arbitrarily change the value of $b$ to a multiple of $a-b$ by applying the operations. In this way, we can achieve a $GCD$ equal to $a-b$. Now, ...
who like visualising things, here is a 4-D Hypercube and its colouring - ![4D Cube

Full text and comments »

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

18.
By DanTheMan., history, 3 years ago, In English
Montgomery Blair Informatics Tournament 2024 ![ ](/predownloaded/4d/28/4d28d2d2cebc46b6060738c26075f1ed712b9b1d.png) The [Montgomery Blair HS computer team](https://compteam.mbhs.edu/) is excited to present the sixth edition of the **Montgomery Blair Informatics Tournament (mBIT)**! The contest will be held both in-person at Montgomery Blair High School and online right here on Codeforces! For space reasons, in-person is only available for pre-college participants. The contest will take place from [11:00 am &mdash; 3:00 pm EDT](https://www.timeanddate.com/worldclock/fixedtime.html?msg=mBIT+2024&iso=20240608T11&p1=263&ah=4) on Saturday June 8th. The competition is for **teams of up to 4 competitors.** Anybody may compete &mdash; in the past, mBIT has drawn both complete beginners and world class participants. The competition is split into two divisions: Standard (recommended for rating <= 1900) and Advanced (recommended for rating > 1900) to support all levels. All problems were written by the Montgomery Blair Compute...
![ ](/predownloaded/4d/28/4d28d2d2cebc46b6060738c26075f1ed712b9b1d.png)

Full text and comments »

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

19.
By asdasdqwer, 2 years ago, In English
[Tutorial] Rotating calipers technique and its applications, Part 2 Hello Codeforces, This is the second blog on the series about the applications of the rotating calipers technique. If you haven't read the [first part](https://codeforces.me/blog/entry/133763) yet, make sure to check it out, as much of the terminology that was introduced throughout the first part is going to be used here without further explanation. In this blog, a few more advanced applications will be presented. ### Short recap of the main terminology - Line of support: a line $l$ that intersects the boundary of the polygon such that the entire polygon lays on one side of $l$ - Anti-podal pair: a pair of vertices which have two parallel lines of support intersecting them - Rotating calipers: an algorithm where parallel lines of support get rotated around the polygon while being kept on the boundary of the polygon at all times ### Minimum-area enclosing rectangle of a convex polygon The first application that is going to be discussed is the minimum area enclosing r...

Full text and comments »

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

20.
By Igorjan94, 7 years ago, translation, In English
Registrations count [statistics] Today (March 19, 2020) first time count of registrations per round became greater than fantastic 18000. To be presice it was 18180 (just one more and it would be palindrome). But only one (!) year ago it became more than 10000, so, it increased almost twice. <s>Yes, we are sick of sports programming and it's contagious.</s> Less words, more pictures: ![ ](/predownloaded/02/85/0285caf38c24d3aa437ab8c2018a05ebfe995e99.png) ![ ](/predownloaded/0c/fa/0cfad5c7fd7358a91264c2eeb0618db3bf0b622a.png) Three notable things: * March, 2014: [Black day](https://codeforces.me/blog/entry/10683). I've already forgot about it. Now with even with more than 10k participants codeforces has almost no queue in the beginning of contests; * September, 2015: [The Second Revolution of Colors and Titles](https://codeforces.me/blog/entry/20638); * Upper envelope of this graph is combined contest, such as Hello/Goodbye/Global rounds. [cut] Some detailed graphs (count of rounds in brackets):...
![ ](/predownloaded/c5/4d

Full text and comments »

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

21.
By bedirhan, 5 years ago, In English
The Relationship between CF Rating and WPM [Results] Hello again, Codeforces. I'm back with the results. First, I want to say thank you to all 267 people who sent their reports. I was busy thinking about this for a while(smh), and finally, I think I finally concluded. The results may or may not surprise you, but for me. It was more surprising. So, I'll start with the general chart then move on to each chart of ranks one by one. By the way, colors represent the rank of the person. For the charts with no-trendlines, I prepared an interactive graph, so you can see the WPM, rating & accuracy of that person. Check the last line for the link. Also, you can find all of the charts in this blog as grouped through the links. This is the plot of WPM vs. rating for all the respondents. Again, thank you for your participation. ![ ](/predownloaded/25/fb/25fb9b774ae5c55edca15f37ee4078f6be72af40.png) Now with the trendlines. ![ ](/predownloaded/4b/07/4b076a541dcc1e5355e4deceab6d1fd0adbe2be2.png) From this chart, we can conclude that th...
![ ](/predownloaded/3d/7a/3d7acc555d8b0e183f251efa77a253a3d8b60158.png) ![ ](/predownloaded/5d/4d

Full text and comments »

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

22.
By cerealguy, 9 years ago, In English
MemSQL Start[c]UP 3.0 Round 2 Hello everyone! The second round of MemSQL Start[c]UP 3.0 will take place this Saturday, September 30, at [10:05am US/Pacific](https://www.timeanddate.com/worldclock/fixedtime.html?msg=MemSQL+Start%5Bc%5DUP+Round+2&iso=20170930T1005&p1=224&ah=3). There will be an onsite round at [MemSQL HQ](https://www.google.com/maps/place/MemSQL/@37.7787481,-122.3998668,17z/data=!4m13!1m7!3m6!1s0x808f7fd5882a8259:0x403893ed6e8a2456!2s534+4th+St,+San+Francisco,+CA+94107!3b1!8m2!3d37.7787439!4d-122.3976728!3m4!1s0x808580795c705e15:0xf0ede2d3d47374b8!8m2!3d37.7789555!4d-122.3976042) and parallel online rounds that will be open for div1 and div2 participants. The online finalists (placed in top 500 in Round 1) will be given 100 MemSQL Start[c]UP T-shirts. The onsite contestants will be participating from MemSQL HQ using their personal laptops. Breakfast will be served starting at 8:30 am, contest starts at 10:05 am and lunch will be served after the contest. The three winners of the onsite round...
!1s0x808f7fd5882a8259:0x403893ed6e8a2456!2s534+4th+St,+San+Francisco,+CA+94107!3b1!8m2!3d37.7787439! 4d, +Francisco,+CA+94107!3b1!8m2!3d37.7787439!4d -122.3976728!3m4!1s0x808580795c705e15:0xf0ede2d3d47374b8!8m2

Full text and comments »

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

23.
By MikeMirzayanov, 9 years ago, In English
Announcement: 2nd Hello Barcelona programming bootcamp in collaboration with Moscow Workshops ACM ICPC Hello, Codeforces! I am pleased to announce [the 2nd Hello Barcelona Programming Bootcamp in collaboration with Moscow Workshops ACM ICPC](http://in.harbour.space/icpc/acm-icpc-hello-barcelona-bootcamp-autumn-2017/), which will be hosted by our partner [Harbour.Space University](https://harbour.space/) together with [Moscow Workshops ACM ICPC](https://it-edu.mipt.ru/en/), [ITMO University](http://en.ifmo.ru/en/), [Moscow Physics and Technology University](https://mipt.ru/en/), [Saint Petersburg State University](http://english.spbu.ru/) and Codeforces! <br/> <center> <a href="http://in.harbour.space/icpc/acm-icpc-hello-barcelona-bootcamp-autumn-2017/"><img src="http://d9hhrg4mnvzow.cloudfront.net/in.harbour.space/icpc/acm-icpc-hello-barcelona-bootcamp-autumn-2017/5a56f9db-logo-acm-icpc-12_0d70280d701x000005.png"/></a> </center> <br/> The boot camp will be held from September 27th to October 5th in Barcelona. This time it will be at the beautiful and technologically mind-be...

Full text and comments »

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

24.
By piyush_pransukhka, 3 years ago, In English
Invitation to CodeChef Starters 128 (Rated till 6-Stars) — 3rd April We invite you to participate in CodeChef’s [Starters128](https://www.codechef.com/START128), aka **CODE-MAT'24**, in collaboration with Mathematics and Computing Society (MACS), IIT BHU, this Wednesday, 3rd April, rated for till 6-Stars(ie. for users with rating < 2500). . Time: [8:00 PM — 10:00 PM IST](https://www.timeanddate.com/worldclock/fixedtime.html?msg=CodeChef+Starters+128&iso=20240403T20&p1=44&ah=2) Joining us on the problem setting panel are: - Setters: Rohan [user:Rohan217,2024-04-02] Jha, Kartik [user:Gokussjz,2024-04-02] Malik, Pranav [user:pd_codes,2024-04-02] Dev, Nakshatra [user:nakshatraexe,2024-04-02] Shivhare, Harshit [user:harshit.30,2024-04-02] Inani, Piyush [user:piyush_pransukhka,2024-04-02] Pransukhka, Nitish [user:_helloLad,2024-04-02] Kumar. - Tester: Viraj [user:wasd2401,2024-04-02] Agrawal. - Text Editorialists:Nishank [user:iceknight1093,2024-04-02] Suresh. - Statement Verifier: Kanhaiya [user:notsoloud,2024-04-02] Mohan. - Conte...

Full text and comments »

25.
By bfsof123, history, 2 years ago, In English
1 In this blog we prove a Ramanujan-type identity: $S(n_1, n_2, n_3) := \sum\limits_{n_1 \in \mathbb{Z}}(-1)^{n_1}\sum\limits_{(n_2, n_3) \in \mathbb{Z}^2}\frac{1}{\sqrt{n_1^2 + (n_2+0.5)^2+(n_3+0.5)^2}\sinh{(\pi\sqrt{n_1^2 + (n_2+0.5)^2+(n_3+0.5)^2})}} = 1$. (1) <spoiler summary="Magic code"> ~~~~~ from math import * ans = 0 for n1 in range(-100, 101): ans1 = 0 for n2 in range(-100, 101): for n3 in range(-100, 101): p = n1**2 + (n2+0.5)**2 + (n3+0.5)**2 q = sqrt(p) r = sinh(pi*q) ans1 += 1/(q*r) print(ans1, n1) ans += (1 if n1%2==0 else -1) * ans1 print(ans) ~~~~~ </spoiler> First, we consider a 4D [lattice sum](https://mathworld.wolfram.com/LatticeSum.html): $U(n_1, n_2, n_3, n_4) := \sum\limits_{(n_1, n_2, n_3, n_4) \in \mathbb{Z}^4} \frac{(-1)^{n_1+n_4}}{n_1^2 + (n_2+0.5)^2 + (n_3+0.5)^2 + n_4^2}$. We will show later that $U(n_1, n_2, n_3, n_4)$ equals to $\pi$ (code shown belo...
consider a 4D [lattice sum](https://mathworld.wolfram.com/LatticeSum.html): $U(n_1, n_2, n_3, n_4, First, we consider a 4D [lattice sum](https://mathworld.wolfram.com/LatticeSum.html):

Full text and comments »

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

26.
By Orn0, 2 years ago, In English
Alternative editorial for 973D This is my version of the editorial for problem D of [contest:2013]. It was motivated by [user:GrishinD,2024-09-24]'s great blog about his solution and presents a slower yet interesting alternative. I wanted to try this exercise to improve my thinking process and maybe become a div1 codeforcer along with [user:GrishinD,2024-09-24] ! I first had a dynamic programming approach and got TL. Then I tried to work with binary search. I used a constructive algorithm inside the search to check for the validity of the current value. My solution got AC but I wasn't convinced by the correction and I wanted to understand in depth.<br> This blog explains my solution and brings a comprehensive proof. I'll first describe my algorithm and intuition, and then go through the proof. # Statement Your are given an array $a_1,a_2,…,a_n$ of the length n You can perform any number (possibly, zero) of operations on the array. In one operation, we choose a position $i (1 \leq i \leq n-1)$ and per...
propagation goes backwards : ![ ](/predownloaded/4d /d2/4dd2b5b6f33954755bfb9bf9b5274dd76aca2302, ![ ](/predownloaded/4d/d2/4dd2b5b6f33954755bfb9bf9b5274dd76aca2302.png)

Full text and comments »

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

27.
By MikeMirzayanov, 10 years ago, translation, In English
Финал ACM-ICPC 2016: первые дни Финал ACM-ICPC 2016 в самом разгаре! Команды и организаторы собрались в Таиланде. Погода отличная &mdash; ночью ливни, днем жара. Сезон дождей в действии. По-местному сейчас около двух ночи, но так как мне категорически не спится, я решил поделится впечатлениями и фотографиями с первых двух основных дней мероприятия. В этом году расселение команд доставляет определенное неудобство &mdash; участники и тренеры живут в одном отеле, а все остальные члены делегаций живут в другом. Первый отель (Le Meridien), видимо, чуток получше &mdash; свой выход к океану и круглосуточный бассейн заставляют завидовать тех, кто живет в Mövenpick (да, как мороженое). <center> <br> <img src="http://codeforces.me/predownloaded/4d/50/4d503038c81de38f936a57b20f9eda034fa58734.jpg"><br><small>Le Meridien, фото с официального сайта отеля</small> </center> Между отелями курсируют маршрутки, ехать примерно полчаса. Немного неудобно, что маршрутки ходят не все дни или как минимум не всегда, а по рас...

Full text and comments »

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

28.
By lucifer1004, history, 6 years ago, In English
Unofficial Editorial for Codeforces Round 666 (except Div.1D) There is also a [Chinese version](https://cp-wiki.vercel.app/tutorial/codeforces/1396). ## [problem:1397A] Just count the number of every letter, and check whether every number can be divided by $N$. <spoiler summary="Code (Python 3)"> ~~~~~ from sys import stdin, stdout def read_int(): return int(stdin.readline().strip()) t = read_int() for case_num in range(t): n = read_int() counter = [0 for _ in range(26)] for i in range(n): s = stdin.readline().strip() for c in s: counter[ord(c) - ord('a')] += 1 ok = True for count in counter: if count % n != 0: ok = False break stdout.write('YES\n' if ok else 'NO\n') ~~~~~ </spoiler> ## [problem:1397B] First sort the array in ascending order, then enumerate $c$. We can constrain the range of $c$ by $c^{n-1}<=2\sum a_i$, otherwise, we can simply change all $a_i$ to $1$ and that will cost less. <spoiler summa...
strategies, we will have $$ L[i]=\min(L[i-1]+d+p[i],L[i-2]+4d +\min(p[i-1],q[i-1])+\min(p[i],q[i, $$ L[i]=\min(L[i-1]+d+p[i],L[i-2]+4d+\min(p[i-1],q[i-1])+\min(p[i],q[i])) $$

Full text and comments »

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

29.
By skhan_org, 3 years ago, In English
Invitation to Advitiya'24 Coding Events — IIT Ropar Hello Codeforces! Greetings from [Coding Club, IIT Ropar!](https://www.linkedin.com/company/coding-club-iit-ropar/) With utmost zest, we want to announce that our club is organizing some exciting programming-driven events under our Annual Technical Fest &mdash; [Advitiya](https://www.advitiya.tech/). The details of the events are as follows: - **CODCOM**: _An ICPC-styled Team Coding contest._ ![ ](/predownloaded/5a/2a/5a2a8ceec2421fc12cc802b7e12b58f33c07b9d3.png) **Participation**: Team of 2-3 Members (Can be from different colleges) - It consists of two rounds. The top teams from the first round will be invited for round 2, which will be held offline in IIT Ropar Campus - Round 1 is scheduled on [11th Feb'24 from 20:05 to 22:05 IST](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Cod-Com+Round+1&iso=20240211T2005&p1=1729&ah=2). The contest link will shared directly over E-mail to the registered teams - Round 2 is scheduled on [...
![ ](/predownloaded/b3/4d/b34d082afac245b5fbf1b6cba14b00129835ce9c.png), /4d/b34d082afac245b5fbf1b6cba14b00129835ce9c.png) **Participation**: Individual - It

Full text and comments »

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

30.
By gKseni, 9 years ago, In English
Barcelona Bootcamp — Teams and Sponsorship update <img src="/predownloaded/a6/1b/a61be4b7ba01cf0feb68d6e5e00eb9d467fe8519.png" style="float:right;"> For the last 6 years the world titles have been won only by St Petersburg teams – ITMO and St. Petersburg State University – both universities will bring their top teams to [2nd Hello Barcelona Programming Bootcamp in collaboration with Moscow Workshops ACM ICPC](http://in.harbour.space/icpc/acm-icpc-hello-barcelona-bootcamp-autumn-2017/?utm_source=Codeforces) The event runs from Sept 27 to Oct 5 – but how to get the most out of the camp? "I think there is no universal solution for "get the most out of a camp" – everyone should find their own path, but the general guideline will be: communicate with other participants as much as you can, make sure you do upsolving (at least some), keep track of how much you sleep," said [Gleb Evstropov](https://goo.gl/srpKTu), coach and coordinator of the programming committee. Sleeping could be somewhat challenging with all the famous Russian ...

Full text and comments »

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

31.
By NercNews, 23 months ago, In Russian
NEF и ВКОШП 2024 <img src="/predownloaded/10/da/10dad66389e75f7fbf9ffa4611849806e14c8aa2.jpg" align="right" style="height: 230px; margin: 10px;" alt="NEF 2022"> Привет, Codeforces! Мы традиционно подводим в декабре итоги региональных командных соревнований по программированию среди школьников и студентов. В ближайшие выходные с **13 по 15 декабря** пройдут заключительный этап ICPC Northern Eurasia Regional Contests **Финал Северной Евразии 2024** и **Двадцать пятая открытая Всероссийская командная олимпиада школьников по программированию 2024**. Открытие обоих чемпионатов пройдет уже в пятницу **13 декабря в 15:00** по московскому времени. Приглашаем на [трансляцию](https://www.youtube.com/live/NJ_vzqKJRI8?feature=shared). Как и всегда, мы не оставим вас без полного списка всех полезных ссылок, которые помогут вам наблюдать за ходом соревнований, а также будем рассказывать об участниках и результатах в наших аккаунтах. Ссылки будут добавляться в пост по мере их появления. Что ж, начнем. ...
<https://news.icpc.global/galleryNERC>

Full text and comments »

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

32.
By 0ne8, 10 months ago, In English
Invitation to IIT Hyderabad Code Clash 2026 Hello Everyone! Infero, the competitive programming club of IIT Hyderabad is glad to invite you to Code Clash, our programming contest conducted as part of our annual techno-cultural fest, Elan & ηVision. The scoring will be based on the ICPC format. It is an individual event, no teams will be allowed.The contest is open for all to participate. **Contest details:** - The contest will be held online on Codeforces. - Start Time: [14:00 IST on 11th January, 2026](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Contest&iso=20260111T14&p1=505&ah=2) - Duration: 2 hours. - All the problems were created by [user:nimish.agarwal.2006,2025-12-29], [user:atigdng,2025-12-29], [user:HyperBoolean,2025-12-29], [user:Adamant18,2025-12-29], [user:FranXenoz,2025-12-29], [user:COdERBRO513,2025-12-29] and me. - Special thanks to [user:Ceilings,2025-12-29], [user:Siddarth_MSR,2025-12-29] and [user:Titan493ASST,2026-01-08] for testing the problem set and coordinating the event. **...
thanks for participating everyone! ![ ](/predownloaded/4d/a3, ![ ](/predownloaded/4d/a3/4da3cfa94e2ceb93abda298bcf2e1961350fea35.png)

Full text and comments »

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

33.
By DEGwer, 13 years ago, In English
Codeforces Round #219 editorial Sorry for late. This is the editorial of Codeforces Round #219. Div2 A, Div2 B, Div1 C are made by [user:m.kagamiz,2013-12-15], and other problems are made by me. [problem:373A] /\\_/\ First, you need to count the occurence of each number (1 through 9). If none of them are greater than 2 * k, Cucumber boy is able to press the panels in perfect timing. Complexity is O(1). My solution : http://ideone.com/CwQtBv [problem:373B] /\\_/\ Naive simulation (subtracting S(i) * k from w while w >= 0) won't finish in 2 seconds. At first, these two facts will make it easier to solve the problem : 1. k doesn't matter for solving this problem, so you can simply divide w with k at the first point. 2. S(10^x) + S(10^x + 1) + ... + S(10^(x+1) &mdash; 1) = 9 * x * 10^x . There are many ways to solve this problem, and I'll show you 2 ways. 1. Binary Search Let's define f(n) as \sum_{k=1}^{n} S(n). This problem can be solved by finding largest x that satisfies f(x) &md...
all rectangles, in O(N^2M^2) with using consecutive sums for 2D. And then we use4D consecutive sums, use 4D consecutive sums, we can answer the queries. The time conplexity is O(N^2M^2+Q).

Full text and comments »

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

34.
By peltorator, 6 years ago, translation, In English
Video about prefix sums, difference array and the power of half-closed intervals Hi! I continue to make videos on algorithms. This time the topic is more basic. In this video, I talk about prefix sums and how they can help you to find sum on segments. You can also learn from this video how to easily generalize prefix sums for 2D, 3D, 4D, etc. cases. In addition, we'll also talk about a simple concept named difference array, which can easily help in some sorts of situations where it seems like you need some complex data structures. And in the end, we'll learn how to add constants, arithmetic progressions, and even quadratic functions to a segment of an array. [Link to the video](https://youtu.be/5iW84xlL0j0) The video is in Russian but English subtitles are available. I'd be glad if you watch the video and leave a comment below with your impressions, thoughts, and ideas for future videos. You may also want to text me on [telegram](https://t.me/peltorator) if you didn't understand something or you have any questions. I'll be glad to answer! I'm sorry you ...
this video how to easily generalize prefix sums for 2D, 3D, 4D, etc. cases. In addition, we'll also, video how to easily generalize prefix sums for 2D, 3D, 4D, etc. cases. In addition, we'll also talk

Full text and comments »

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

35.
By Noob-ita-coder, history, 7 years ago, In English
Detailed Explanation for Problem E of Edu Round 67 Problem Link: https://codeforces.me/contest/1187/problem/E I am writing this blog partly because i wanna rethink what the solution is and partly it may help someone. So we are given a graph and we need maximum points by choosing white vertices. Obvious greedy approach to this would be to take the root add points gained by it, then take the children (as this would give the maximum points greedily) and add their points to the contribution and so on. Now the problem is we can't tell which root will be giving us an optimal answer. Also according to the input size given we cant run dfs separately for each vertex. So thus we need an observation to reduce the time complexity so that we can get Accepted. Observation: Re rooting the vertex of the graph to any of its children only changes few things and this is the main observation needed to solve this problem. Below i choose a graph : ![ ](/predownloaded/6c/63/6c6339d369c4dd03cc2f09fef67aa75c142d1217.jpeg) here i will st...
children and the answer becomes dp[2] = sz[2] + dp[1] + dp[6] (sz[2] = 9) ![ ](/predownloaded/4d/1b, ![ ](/predownloaded/4d/1b/4d1bc426cbd77ebfc0fd43fdf88506a45e4fb58d.jpeg)

Full text and comments »

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

36.
By misis, 10 years ago, In Russian
О стальных нервах и дурацких каламбурах, или олимпиадное программирование в НИТУ “МИСиС” Вдохновившись [постом Михаила Рубинчика](http://codeforces.me/blog/entry/48384), мы хотели описать, как устроена [секция олимпиадного программирования у нас в НИТУ “МИСиС”](http://acm.misis.ru), но потом осознали, что, в отличие от УрФу, про нас даже не все слышали, и вполне можно получить в ответ: “[Какой МИСиС?](http://misis.ru) Нет там ничего”. Так что, в итоге, получился текст не только об устройстве секции, но и о том, сколько сил и желания в нее вкладывается. ![ ](/predownloaded/d6/7a/d67a791217f0bdcca3a1c74bfa7fac4a2507249e.jpg) <p style="margin: 0 auto 10px; text-align: center;"> _команда МИСиС на сборах в Ижевске, 2016 год_ </p> [cut] <p>Итак, спортивное программирование в НИТУ “МИСиС” зародилось в 2009 году при поддержке Д.В. Ливанова, бывшего тогда ректором университета, и компании Cognitive Technologies. В этом же году был осуществлен первый набор в секцию. Перед тренерским составом на тот момент ставилась непростая цель &mdash; добиться результатов на международ...
Workshops ACM ICPC, в рамках второго дня в обоих дивизионах. ![ ](/predownloaded/4d/87, ![ ](/predownloaded/4d/87/4d874cde451043cbdaa2c410bbc1d1e437a443f2.jpg)

Full text and comments »

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

37.
By map, 16 years ago, translation, In English
Analysis Codeforces Beta Round #63 (Div. 2) <div><div><div><p class="MsoNormal"></p><p class="MsoNormal"></p><p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language:EN-US">Problem A.<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language:EN-US">In this task all you had to do was to make sure that the sum of all </span>Σ<span lang="EN-US" style="mso-ansi-language:EN-US">x<sub>i</sub> is 0, the sum of all </span>Σ<span lang="EN-US" style="mso-ansi-language:EN-US">y<span class="Apple-style-span" style="font-size: 13px; "><sub>i</sub></span>&nbsp;is 0 and that the sum of all </span>Σ<span lang="EN-US" style="mso-ansi-language:EN-US">z<sub>i</sub> - 0 . </span><br> <span lang="X-NONE" style="mso-ansi-language:X-NONE">We have not written that condition evidently in order that participants will have a chance to break a solution.</span><span lang="EN-US" style="mso-ansi-language:EN-US"><o:p></o:p></span></p><p></p> <p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language:EN-US">...
number of states is obtained by S <= 4D^2 (pairs of coordinates) * 4 (Boolean variables)., obtained by S <= 4D^2 (pairs of coordinates) * 4 (Boolean variables).

Full text and comments »

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

38.
By arthur_9548, history, 22 months ago, In English
Multidimensional Range Query Data Structures Hello, Codeforces! I'm Arthur Botelho ([user:arthur_9548,2025-01-19]), and this is my first blog. After reading [this blog](https://codeforces.me/blog/entry/64914) by [user:mouse_wireless,2025-01-19] and solving [this problem](https://codeforces.me/contest/372/problem/B), my perspective of multidimensionality changed. I decided to implement other multidimensional data structures and solve problems using them. Now, I wish to explain my understanding of this subject and my implementations of these structures. I hope it will be useful or, at least, interesting. Summary ------------------ In this blog, we will discuss the general idea of Range Query Data Structures in one dimension and extrapolate the concepts to higher dimensions. We will also study implementations of multidimensional versions of these four structures: - Prefix/Partial/Cumulative Sum (Psum) - Disjoint Sparse Table (DiST) - Binary Indexed/Fenwick Tree (BIT) - Segment Tree (SegTree) The idea of the...
to solve something $4D$, $5D$ or any $D$, it won't be any more difficult to solve or implement than a, , and if anytime you want to solve something $4D$, $5D$ or any $D$, it won't be any more difficult to

Full text and comments »

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

39.
By KEPuzOfficial, 22 months ago, translation, In English
KEP Contest #12 ![ ](/predownloaded/4d/f9/4df9fdecea71f4e44c5a030ab07f8cb7310c4581.png) I invite everyone to the [contest](https://kep.uz/competitions/contests/contest/419), which will take place on **January 11, 2025 at 14:35UTC**. Interesting problems await you in the contest. Thanks to [user:MathModel,2025-01-09] for ideas for several problems and [user:Timosh,2025-01-09] for inspiring ideas. **Contest info:** - Number of problems: **13** - Difficulty of problems: **< 2400** - Duration: **3 hours** - Contest type: **ACM20M** - Languages: **C++, Python, C, Kotlin, Haskell, R, Nodejs, PHP, C#, Java, Rust, Go** **Prizes:** - First place – **25$ (USDT)** - Second place – **20$** - Third place – **15$** - Fouth place – **12$** - Fifth place – **10$** Link to the platform: https://kep.uz/competitions/contests/ P.S. Registration on the platform only via Gmail/Github. **UPD** Thank you for participating. I hope you enjoyed the contest. **Results** ...
![ ](/predownloaded/4d/f9/4df9fdecea71f4e44c5a030ab07f8cb7310c4581.png)

Full text and comments »

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

40.
By femboy_routine, history, 3 years ago, In English
Comments Statistics Hello, Codeforces! ------------------ Today i gathered some statistics about comments, and I'm going to present them to you. Midway through writing this post, I discovered that there is a website called [codeforces.comment.statistic](https://igorjan94.konekon.ru/). The author, [user:Igorjan94,2024-04-04], has done much more than i did and you can [check out theirs blog](https://codeforces.me/blog/entry/63498), its absolutely epic. They also created a [type-script SDK for CF](https://codeforces.me/blog/entry/111793), which is even more _epic_. The data pool consisted only of comments from all the blogs on **the main page**. That means that only a small portion of all blogs were used. I didn't find a good method to get all blogs from all users. #### Data pool - Blogs amount: $2059$ - Comments amount: $297853$ - *Root comments: $117293$ *Root comments are comments that are not a reply to another comment #### The most up-voted comments <spoiler summary=""> $1....
](/predownloaded/ad/4d/ad4df5e096d02a3c7e10929cbbaa941cf227cd7f.png)

Full text and comments »

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

41.
By nhant, history, 6 years ago, In English
1354C2 The smallest side of the square containing 2*n regular polygon, n odd Note: This is **NOT** an official proof of the derived solution, as it is incoherent. It's rather a personal note for my illogical brain. It contains a derivation to the solution and the solution of [Educational Codeforces Round 87](https://codeforces.me/contest/1354) [C2](https://codeforces.me/contest/1354/problem/C2) at the bottom. ![ ](/predownloaded/e8/fb/e8fb1504a3d34d4b24bf2facb52b0876a3d0bec5.png) Source: https://math.stackexchange.com/a/458593/496530 From the above observation, 4 points of the polygon must be on the 4 sides of the minimal square. Each of 2 pairs, whose 2 points are on the opposite sides of the square, has the center of the polygon as its midpoint. Below figures illustrate the minimal square when $n=5$. Half square on the left, full square on the right. ![ ](/predownloaded/d0/f3/d0f3cbaeeef6af09d930e48f6741d52f5b886ebe.png) ![ ](/predownloaded/20/71/2071ed6da1fec265488ac3125cb99b409526514d.png) Consider the point of interest to be $P$. Let's...
bounding square. End of reasoning. ### Begin of derivation: ![ ](/predownloaded/4d/bf, ![ ](/predownloaded/4d/bf/4dbff1d73ca38e52549851214829e01bde200134.png)

Full text and comments »

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

42.
By gen, 11 years ago, In English
ACM ICPC 2015-2016, Baltic Selection Contest (Online Mirror) Hello, Codeforces! I'm glad to invite you to participate in the **online mirror** of the Baltic Selection Contest for ACM ICPC 2015–2016 that will take place in Gym on [the 22nd of October, 13:00 UTC](http://www.timeanddate.com/worldclock/fixedtime.html?msg=ACM+ICPC+2015%E2%80%932016%2C+Baltic+Selection+Contest+%28translation%29&iso=20151022T13&p1=1440&ah=5). This competition determines the best teams throughout the universities of Latvia, Lithuania and Estonia that will participate in ACM ICPC NEERC Western subregional contest in Minsk, Belarus. The onsite contest was held on the 12th of October. The participating universities were University of Latvia, Vilnius University, Kaunas University of Technology, Vilnius Gediminas Technical University, Estonian Information Technology College and others. As a bonus, I'm posting some photos of the onsite action at University of Latvia. :) [![ ](http://codeforces.me/predownloaded/c0/eb/c0eb577ff8a24d2ee252b36245308d163f9071ca.jpg)](...
://codeforces.com/predownloaded/32/4d /324d035c7f62c2187ff1141a834a88f3d6f49ede.jpg)](http

Full text and comments »

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

43.
By NercNews, 2 years ago, In Russian
Командные олимпиады 2024: отборы на NEF и ВКОШП <img src="/predownloaded/74/39/74395f0a59b321dba24163d7c163412f9e00a9f4.jpg" align="right" style="height: 250px; margin: 10px 35px 20px;" alt="text"/> Привет, Codeforces! Не успели утихнуть эмоции после грандиозного сентябрьского [ICPC WF Astana](https://codeforces.me/blog/entry/134044), как начался очередной сезон командных соревнований по программированию в Северной Евразии. В ближайшие выходные пройдет максимальное количество региональных чемпионатов как у студентов, так и у школьников, за которыми приглашаем следить вместе с нами. В оба дня присоединяйтесь к трансляциям на каналах NERCNews на [YouTube](https://www.youtube.com/nercnews) и в [VK](https://vk.com/nercnews). #### Northern Eurasia Regional Contests Одними из первых четвертьфинал провели Азербайджан, Юг и Поволжье, Центральная Россия, и Кыргызстан. **16 и 17 ноября** чемпионаты пройдут в следующих регионах: Armenia, Belarus, East Siberian, Georgia, Kazakhstan, Moscow, Northwestern Russia, Taurida, Ural, Uzbeki...
<https://news.icpc.global/galleryNERC>

Full text and comments »

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

44.
By RAD, 14 years ago, translation, In English
Разбор Codeforces Round #166 [problem:271A] В задаче нужно написать то, что просят по условию: пока в номере года есть совпадающие цифры, прибавляем к номеру 1. [problem:271B] Предпосчитаем для каждого числа от $1$ до $10^5$ следующее простое. Это можно сделать абсолютно любым способом. Главное &mdash; не забыть при проверке числа на простоту перебирать делители до корня из числа. Теперь для каждого элемента матрицы легко понять, сколько к нему нужно прибавить, чтобы получить простое число. После этого остается просто найти строку или столбец с наименьшей суммой. [problem:271C] Если $3k > n$, решения нет (потому что каждое множество должно содержать хотя бы 3 элемента). Иначе подходит, например, любое разбиение, в котором первые $3k$ чисел розданы следующим образом: `1 1 2 2 3 3 ... k k 1 2 3 ... k` Для каждого из $k$ множеств, разность между вторым и первым элементами будет $1$. При этом ясно, что разность между третьим и вторым элементами будет не $1$ (более точно: $2k-i-1$ для $i$-го мно...
have have $d$ as their maximal odd divisor: these are cards with $y-x$ equal to $d$, or $2d$, or $4d, максимальным нечетным делителем разности — это все пары с разностью ровно $d$, $2d$, $4d$, $8d, : these are cards with $y-x$ equal to $d$, or $2d$, or $4d$, $8d$, $16d$, ... Don't forget that the

Full text and comments »

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

45.
By lucid_dreamer, history, 5 years ago, In English
Invitation to Solutions'21 Namaste codeforces!! The Sunday which started on 22nd March 2020 has been continuing since then(xD), and we have been trapped in this endless cycle. (Reminds me of Doctor Strange's infinite loop.) No worries, a very effective tranquillizer &mdash; Solutions'21 is here at your rescue in these desolate times. We at Army Institute of Technology, Pune would like to invite you to participate in Pune's biggest TechFest. ![ ](https://i.ibb.co/yQkhqG4/123.png) What's in our 4d pocket: <spoiler summary="Code Red"> ~~~~~ Date : Round 1: 24 May Round 2: 26 May ~~~~~ ~~~~~ Time : Round 1 : 9:45 am - 10:30 am Round 2: 10:00 am - 12:00 am ~~~~~ ~~~~~ Prize Worth : 6000/- (TE/BE LEVEL) 5000/-(FE/SE LEVEL) Team Size: 1 ~~~~~ [For more information](https://solutions21.in/events/eventRegister/index.html?eventID=0) </spoiler> <spoiler summary="Bug Off"> ~~~~~ Date : Round 1: 24 May Round 2: 25 May ~~~~~ ~~~~~ Time : Round 1 : 8:00pm ...
in Pune's biggest TechFest. ![ ](https://i.ibb.co/yQkhqG4/123.png) What's in our4d, What's in our 4d pocket:

Full text and comments »

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

46.
By misis, history, 5 years ago, In Russian
Летняя Школа Программирования NlogN 2022 Мы рады анонсировать Летнюю Школу Программирования NlogN 2022! С 1 по 13 июля пройдет Летняя Школа Программирования NlogN. Это школа по спортивному программированию для учащихся 5-10 классов. Как и в прошлом году, наших участников ждут интересные лекции, увлекательные контесты и, конечно же, активный отдых на базе “Алые Паруса” в Костроме. А специально для желающих присоединиться к нам, не уезжая при этом далеко от дома, у нас предусмотрена возможность дистанционного участия. В рамках школы планируется несколько учебных параллелей для разных уровней подготовки: от новичков, которые только знакомятся со спортивным программированием, до профессионалов. Распределение по группам (дивизионам) пройдет на основании результата отборочного тура. Обращаем внимание, что мы ожидаем участников, которые уже имеют базовые навыки программирования &mdash; прохождение отборочного тура обязательно! Чтобы попасть в ЛШП NlogN, вам необходимо зарегистрироваться по ссылке: https://forms.gle/SH2aw...
![ ](/predownloaded/4d/86/4d860a16ecacf85dfd56a0b8e24952c1ad33ee3d.jpg)

Full text and comments »

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

47.
By mouse_wireless, history, 8 years ago, In English
Nifty implementation of multi-dimensional Binary Indexed Trees using templates. _Prelude: this post assumes the reader already know the concepts behind Binary Indexed Trees, as I will not be explaining them here._ Let's talk about 2-dimensional Binary Indexed Trees. The implementation of 2D BIT usually goes as follows: 1. Implement a standard, 1D BIT, with update and query functions; 2. Implement 2D update and query; these look exactly the same as the 1D case, except basic operations are replaced by calls to the 1D versions of these operations. This is OK and works well for most cases. However, there are some issues with this implementation: 1. 2D methods are usually implemented (for coding speed reasons), by copy-pasting the 1D code and changing the operations. Copy-pasting is always risky, since it's so easy to miss a change you're supposed to make. 2. It doesn't feel "clean". There's duplicate code in there that makes the source harder to read (and maybe debug). Also, if you've messed up something in one of the dimensions (for example, you wrote `...
motivated me to write this post, but it's not unreasonable to imagine problems with4D or even 5D BITs, 4D or even 5D BITs.

Full text and comments »

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

48.
By misis, 5 years ago, In Russian
Volga Winter Camp 2022 — регистрация уже открыта! Дорогие друзья! Мы рады сообщить, что **c 26 января по 6 февраля** пройдут открытые зимние сборы по спортивному программированию **Volga Winter Camp 2022**, организованные НИТУ «МИСиС» совместно с Ярославским государственным университетом им. Демидова. Сборы пройдут в двух форматах: **очном** и **дистанционном**. **Очный формат** будет организован для студентов в Ярославле на базе ЯрГУ им. Демидова. Вам доступно два варианта участия: - С проживанием в отеле &mdash; в стоимость входят проживание в отеле, учебная программа и обеды. **Оргвзнос &mdash; 35000 рублей**; - Без проживания в отеле &mdash; в стоимость входят учебная программа и обеды. **Оргвзнос &mdash; 13000 рублей**. В случае выбора очного формата участия настоятельно рекомендуем **пройти вакцинацию от COVID-19**. Возможно, во время сборов дополнительно потребуются результаты ПЦР-теста. **Дистанционный формат** представляет из себя занятия в онлайн-режиме в Zoom. К участию приглашаются как студенты, так и ...
![ ](/predownloaded/4d/8b/4d8b29544bb8afbd396a5e67e1e94b26d6995398.jpg)

Full text and comments »

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

49.
By yevhenii_kanivets, history, 6 years ago, In English
Codeforces Watcher 1.7.0 (Asimov): User Profile UI and few more updates It has been a long since the last update, but now we are back on track and ready to ship more exciting new features. ![ ](/predownloaded/4d/52/4d52dd732f29ad2c8bd06f67645db3b166b44297.png) First of all we've decided to dedicate each of the following releases to great writers starting from Isaac **A**simov, which is the most known for its science-fiction "Foundation" series. Great read indeed, and we recommend everyone to give it a try. [Here](https://en.wikipedia.org/wiki/Isaac_Asimov) is what Wikipedia has to say about him. Now we need to find the great writer for the milestone B, which you can suggest in the comments to this post (last name + link to Wikipedia). The most upvoted comment will win. Current candidates are: Bradbury (Fahrenheit 451), Burgess (A clockwork orange), Brooks (World War Z). Now to updates, which you can see in Asimov: - New User Profile UI - User Avatars are now bordered with rank colors - Confirmation dialog for User's removal - Improved "Ne...
exciting new features. ![ ](/predownloaded/4d /52/4d52dd732f29ad2c8bd06f67645db3b166b44297.png, ![ ](/predownloaded/4d/52/4d52dd732f29ad2c8bd06f67645db3b166b44297.png)

Full text and comments »

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

50.
By NercNews, 11 months ago, translation, In English
ICPC NEF и ВКОШП 2025 <img src="/predownloaded/19/27/19278d91460396a7175730146d64a7a18467b1a3.jpg" align="right" style="height: 230px; margin: 10px;" alt="NEF 2024"> Hi, Codeforces! December is the perfect time to wrap up the year, and we’re happy to invite you to follow the final stages of the most important school and student team competitions in competitive programming. Mark your calendars: from December 15 to 17, the 26th Russian Team Olympiad in High School Programming Contest and the ICPC Northern Eurasia Finals 2025 will take place. The official opening of the championships will be on Monday, December 15. The detailed schedule is available on the [website](https://nerc.itmo.ru/regional/nef-2025.html). On our accounts, we’ll be sharing updates about the participants and their results. As usual, we’ve put together a list of useful materials in a single post; it will be updated gradually so you can conveniently follow the progress of the competitions and cheer for your favorites. By the wa...
">, ="/predownloaded/ca/4d/ca4d644d393ed70cddff317744ae1ce3e720bd6a.png" style="height: 30.0px;max-width

Full text and comments »

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

51.
By JMK100, 6 months ago, In English
Montgomery Blair Informatics Tournament 2026 ![ ](/predownloaded/71/54/7154857da7b14d7cede8935035d22304645fc502.png) The [Montgomery Blair High School Computer Team](https://compteam.mbhs.edu/) is excited to announce the eigth addition of **Montgomery Blair Informatics Tournament (mBIT)** &mdash; medieval edition! The contest will be held simultaneously in-person at [Montgomery Blair High School](https://www.google.com/maps/place/Montgomery+Blair+High+School/@39.0185897,-77.0146384,17z/data=!3m2!4b1!5s0x89b7cf5867d3c613:0xb0a054071514d050!4m6!3m5!1s0x89b7cf586f9b73d5:0xc227c473fffb50c7!8m2!3d39.0185856!4d-77.0120635!16zL20vMDFxbjVn?coh=245189&entry=tts&g_ep=EgoyMDI1MDQxNi4xIPu8ASoJLDEwMjExNDU1SAFQAw%3D%3D&skid=0e266aea-3892-4cdb-a8da-917244f6756a) and online here on Codeforces. Like previous years, in-person participation is limited to pre-college participants in the beginner and intermediate divisions, with the online mirror is open to everyone. **Details** - Saturday, June 6, 2026 - In-Person Event: 10AM &mdash; ...
!5s0x89b7cf5867d3c613:0xb0a054071514d050!4m6!3m5!1s0x89b7cf586f9b73d5:0xc227c473fffb50c7!8m2!3d39.0185856! 4d, :0xb0a054071514d050!4m6!3m5!1s0x89b7cf586f9b73d5:0xc227c473fffb50c7!8m2!3d39.0185856! 4d-77.0120635

Full text and comments »

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

52.
By Slamur, 5 years ago, In Russian
Видимость разборов задач из мешапов для участников группы Столкнулся с неожиданной проблемой: разборы задач из мешапа, добавленные с помощью тега [tutorial:] в блог группы, не доступны для просмотра участникам группы. <spoiler summary="Как это видит участник группы"> ![ ](/predownloaded/fb/53/fb53da250b9e999714dd7cbf4b9a4880ae26956e.jpg) </spoiler> В режиме предпросмотра разбор виден, но отображается красная надпись "не доступно публично". <spoiler summary="Режим предпросмотра"> ![ ](/predownloaded/cf/4d/cf4db794419b36b2af249a6804bdfd8a6533b040.png) </spoiler> Это известная проблема? Кто-нибудь уже сталкивался с таким? Есть ли какой-то способ починить видимость, кроме копипасты всего разбора из полигона напрямую в блог? <br> <spoiler summary="Мои мысли по этому поводу:"> В описании мешапов написано, что мешап не может иметь видимость, отличную от приватной &mdash; может быть дело в этом? Но ведь мешап уже добавлен в группу, а значит видимость задач точно расширена на участников данной группы. Выглядит так, что или...
![ ](/predownloaded/cf/4d

Full text and comments »

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

53.
By solvemproblr, history, 8 years ago, In English
Slow unofficial editorial for April Fools Day Contest! [G-AI Takeover](https://codeforces.me/contest/1145/problem/G) <p> <spoiler summary="Solution"> Don't you know how to play rock-paper-scissors? Just read [this](https://en.wikipedia.org/wiki/Rock%E2%80%93paper%E2%80%93scissors). You'll find solution easily if you read it till the end. </spoiler> [F-Neat Words](https://codeforces.me/contest/1145/problem/F) <p> <spoiler summary="Solution"> This problem can be solved greedily. Just make a list of strings for which answer is "NO". In order to do this add all strings in the sample testcases and add some strings that you don't like. <br> Easier solution for this problem uses suffix array + DP. </spoiler> [E-Fourier Doodles](https://codeforces.me/contest/1145/problem/E) <p> <spoiler summary="Solution"> Failed to load. Check your internet connection. </spoiler> [D-Pigeon d'Or](https://codeforces.me/contest/1145/problem/D) <p> <spoiler summary="Solution"> You just need poor english skills to understand probl...
understand problem statement(look at the circles carefully).And then you need 4D segment tree to find, (look at the circles carefully).And then you need 4D segment tree to find solution.

Full text and comments »

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

54.
By kefaa, 10 years ago, In English
IOI format in mashups Today I found I can choose IOI format for my mashup (in "Edit" tab). It looks like a new feature but I can't deal with it :D. Submitting author's solution returns the next verdict: "Partial result: 0 points" ![ ](http://codeforces.me/predownloaded/a3/4d/a34d51c1387598eeb72bf0f36c8400dbf410d729.bmp) Opening standings references me to error page: ![ ](http://codeforces.me/predownloaded/6f/d8/6fd8cb9200362e265d2c6350b016786d751162aa.png) So I thought I should set points for the problem in polygon, but I didn't find such feature. Codeforces, how to set an IOI-style contest in mashup if it possible? Or is this feature still under development?
result: 0 points" ![ ](http://codeforces.me/predownloaded/a3/4d, ![ ](http://codeforces.me/predownloaded/a3/4d /a34d51c1387598eeb72bf0f36c8400dbf410d729.bmp)

Full text and comments »

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

55.
By maanassehgal, history, 15 months ago, In English
Codeforces Lite Codeforces Lite is performing better than ever! ----------------------------------------------- I still can’t believe it. Three months ago, we had handled a total of 5000 submissions. Today, that number has crossed 150,000+! Yesterday’s contest alone saw more than 4,000 submissions in a single day! We’re now a community of over 3,000 competitive programmers who are regularly using the extension, and I genuinely want to thank each one of you for the incredible support :) Codeforces Lite is helping thousands of programmers every day, if you haven’t explored it yet, you’re missing out big time. With a customizable dark theme, you get code execution directly from Codeforces, testcase verification, etc. Check out the extension now! https://chromewebstore.google.com/detail/codeforces-lite-dark-mode/hgcgfmgjkfjmhoebifgmbfipinkkjgco ![Codeforces Lite Statistics](/predownloaded/4d/26/4d2681533bf20b448135e1ac2313034b5c603b6c.png) ![Codeforces Lite Graph](/predownloaded/f...
![Codeforces Lite Statistics](/predownloaded/4d /26/4d2681533bf20b448135e1ac2313034b5c603b6c.png, ](/predownloaded/4d/26/4d2681533bf20b448135e1ac2313034b5c603b6c.png) ![Codeforces Lite Graph](/predownloaded

Full text and comments »

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

56.
By practice080, 3 years ago, In English
A difficult tree problem Hi all, my friend asked me a question few months ago. ## Problem Statement Given a tree with $N$ vertices ($v_1, ..., v_N$), among them, there is a source vertex $v_S$ and a destination vertex $v_E$ ($S \ne E$, $1 \le S,E \le N$). Each edge has an integer weight (can be negative, zero, or positive). Alice starts at $v_S$ with an initial health value of $h$, and she wants to reach $v_E$. When she traverses through an edge with weight $w$, the weight $w$ is added to her health value. At any point in time, her health value cannot be negative. After an edge is used, the weight of the edge becomes $0$. Alice can use the same edge multiple times, but only the first time will affect her health value because the weight of the edge becomes $0$. Find out whether Alice can reach $v_E$ with a non-negative health value. ## Constraint $2 \le N \le 2 \times 10^5$ (for reference only, the expected solution's complexity needs to be better than $O(N^2)$) ## Example #### Example 1 ...
health value will be $1 \to 0 \to 2 \to 2\to 2 \to 0$. #### Example 2 ![ ](/predownloaded/4d, ![ ](/predownloaded/4d/b7/4db703a5555cddbe854c14645fdd5c08d88a4ecb.png)

Full text and comments »

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

57.
By kevinpatel_20, history, 8 years ago, In English
Code Mutants -19 Online Round on CodeChef Hello Everyrone!! ------------------ I would like to invite you all to Online Round of Code Mutants -19 , which is a part of [Synapse](http://synapse.daiict.ac.in/#home), the annual Cultural Fest of DA-IICT. It will take place on CodeChef on [19th Feb Tuesday at 10:00 pm](https://www.timeanddate.com/worldclock/fixedtime.html?msg=CodeMutants-19&iso=20190219T10&p1=1572&ah=2&am=30) ![ ](/predownloaded/f0/4d/f04d96520b65ceb7dafe9f04309f0c747b2a5940.jpg) In this round you will be given 6 problems and 2:30 hours to solve them.Top 3 contestants will be rewarded with **250 Laddus!!** from CodeChef.Some of the top contestants will selected for onsite round where prizes worth **10,000 INR** are waiting for you!!.So it's time to put on your thinking caps and prove yourselves as this year competition will be intense.All participants are requested to fill up the google form provided below.Only participants who have filled the google form will be taken into consideration for selection of...
![ ](/predownloaded/f0/4d/f04d96520b65ceb7dafe9f04309f0c747b2a5940.jpg)

Full text and comments »

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

58.
By erikr, 13 years ago, In English
Haskell solutions For those who are interested, here is a list of all problems for which Haskell solutions have been submitted. (Use the 'Status filter' to show only the Haskell submissions.) [1A](http://codeforces.me/problemset/status/1/problem/A) [1B](http://codeforces.me/problemset/status/1/problem/B) [1C](http://codeforces.me/problemset/status/1/problem/C) [2A](http://codeforces.me/problemset/status/2/problem/A) [2B](http://codeforces.me/problemset/status/2/problem/B) [2C](http://codeforces.me/problemset/status/2/problem/C) [3A](http://codeforces.me/problemset/status/3/problem/A) [3B](http://codeforces.me/problemset/status/3/problem/B) [3C](http://codeforces.me/problemset/status/3/problem/C) [3D](http://codeforces.me/problemset/status/3/problem/D) [4A](http://codeforces.me/problemset/status/4/problem/A) [4B](http://codeforces.me/problemset/status/4/problem/B) [4C](http://codeforces.me/problemset/status/4/problem/C) [4D](http://codeforces.me/problemset/status/4/problem/D)...
/status/4/problem/B) [4C](http://codeforces.me/problemset/status/4/problem/C) [ 4D](http, ://codeforces.com/problemset/status/4/problem/C) [4D ](http://codeforces.me/problemset/status/4/problem/D

Full text and comments »

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

59.
By wRabbits_AlMag, history, 7 years ago, In Russian
What is geometric interpretation of Maximize an Expression task from Codechef's Aug19 competition? Hi, all. There was [an interesting problem](https://www.codechef.com/problems/MAXEXPR) from Codechef's August 19 Long challenge. In short, you are given vector k and vector c, and you have to find vector x, such that x1⋅k1+x2⋅k2+…+xN⋅kN=0. and √x1+c1+√x2+c2+√+…+√xN+cN is max (of course if every expression under a root is non-negative). There have been [great analytical solutions](https://www.codechef.com/viewsolution/25740200) to this problem, and [the editorial](https://discuss.codechef.com/t/maxexpr-editorial/33482/2) mentions approaches like using [Cauchy-Schwarz Inequality](https://brilliant.org/wiki/cauchy-schwarz-inequality/) and alike. I have a feeling that the solution might represent something geometrical. Given the first equation, we can see that vectors x and k are perpendicular. I can't interpret the second expression in geometrical terms, but from drawing few examples, X seem to be parallel with the perpendicular, drawn from the point C to the vector K, with the leng...
length, multiplied by some number ![ ](/predownloaded/4d/14, ![ ](/predownloaded/4d/14/4d14892bbe15270e32b50d5c604978a1cb819fbb.png)

Full text and comments »

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

60.
By MiptLited, 6 years ago, translation, In English
Открыта регистрация на международные сборы по программированию Moscow Pre-Finals Workshop 2021 Сборы пройдут с 17 по 23 апреля в дистанционном формате. Приглашаем студенческие команды со всего мира. Ждём всех, кто хочет круто прокачаться в олимпиадном программировании вместе с сильнейшими студентами из разных стран. Небольшой факт о сборах: в 2019 году 11 из 12 медалистов ICPC проходили обучение в Moscow Workshops. Обучение проводится на английском языке. В программу входит решение контестов, разбор задач с тренерами и лекции от преподавателей ведущих российских вузов, бывших участников и победителей ICPC. Методистом сборов является Михаил Тихомиров, тренер золотых медалистов ICPC 2016 и 2018, серебряных медалистов 2017 и бронзовых 2019 года. Основным модератором контестов выступит Олег Христенко (aka Snark), главный судья Moscow Workshops ICPC и главный редактор Snarknews. Все участники будут разделены по дивизионам: - Дивизион А — для опытных команд с серьезным уровнем подготовки, которые будут участвовать в финале. - Дивизион B — для участников, которые не пр...
![ ](/predownloaded/4d/56/4d56982ad03f61d3e8668091b0e062f0c6f11004.png)

Full text and comments »

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

61.
By Jajceslav, history, 7 months ago, In English
Dynamic Programming Video pt. 2 Dynamic Programming Video pt. 2 ===== Hello everyone! Me and [user:DJeniUp,2026-04-10] are back with another programming video! ![ ](/predownloaded/1b/4d/1b4d19824604835d73cc00c63e0875db99079f0c.png) https://www.youtube.com/watch?v=dv_dGwrazuE This video is about a tricky problem that i've encountered at my first ever programming competition. At first glance it seems like a simple strategy will cut it, but as you submit more and more solution, you start to realize it's not that simple... This video is about interval dp, and you can solve the problem for yourself: https://codeforces.me/gym/106465/problem/A PS: Thanks everybody for 1k subscribers!
back with another programming video! ![ ](/predownloaded/1b/4d, ![ ](/predownloaded/1b/4d/1b4d19824604835d73cc00c63e0875db99079f0c.png)

Full text and comments »

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

62.
By InnocentHuman, history, 12 months ago, In English
The bots are back. I was wondering why the queue is longer than usual, but I remembered a post about bots flooding the queue, making it painstakingly long for your submissions to go through. So, I decided to check, and it seems the rumours are true. They seem to have the same or similar programming style, suggesting that they might be LLMs writing the code. ![ ](/predownloaded/7c/d5/7cd5ffd28e8177625bc6d48ff682fc110488f77d.png) ![ ](/predownloaded/ab/89/ab8956c5af50cb60340f97f1dfecb183c9b73980.png) Another thing worth mentioning is that in the submissions, their code always has an empty line before the actual include statements. ![ ](/predownloaded/f7/9a/f79a68bf1becd7ee730e7706178a29602bc6d39a.png) ![ ](/predownloaded/a1/89/a189824aace17047168bf9c1760a2b00fadb40e4.png) ![ ](/predownloaded/1f/4d/1f4d0dbd0b1207162d50b2b76ed01d575edd6f3a.png) ![ ](/predownloaded/19/c4/19c418009b4a8d12fb8a4ae472c0cb1f8b88406f.png) Pretty weird to see this around. I wish there were a way to filter these bo...
/4d/1f4d0dbd0b1207162d50b2b76ed01d575edd6f3a.png) ![ ](/predownloaded/19/c4, /a189824aace17047168bf9c1760a2b00fadb40e4.png) ![ ](/predownloaded/1f/4d

Full text and comments »

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

63.
By NotStack, history, 21 month(s) ago, In English
Nobody is standing with CHEATERS! LMAO..... [user:Utsav_Kashyap,2025-02-13] Bro started div2 contest **almost after 50 mins and still solved 6 problems**, GOD level thinking. **In just 2 months bro become candidate master** and may be GM or IGM in next 2 to 3 months I guess. Bro you should join some plateform to teach noob coders like us so that we can reach pupil or specialist to feel that happiness as you've. LMAO, I don't even have words, what to say, people already said alot. [user:AmmarAhmedTheSaviour,2025-02-13] Bro **couldn't able to solve this simple Problem E. in div 4** which have over **3000+** submissions [E. Skibidus and Rizz](https://codeforces.me/problemset/problem/2065/E) but bro **solved the hardest problem F. in div 2 which have only 270** submissions [F. Bitwise Slide](https://codeforces.me/contest/2067/problem/F). And the best part is He gave only 2 contest till now and solved 6 problems in div 2 and only 5 problems in div 4 and **not even have a single wrong answer** on any problem, OMG. And He is sti...
/2067/problem/C) **with 4D DP** which can be solved in just 5 to 8 lines using greedy. **He solved, ] Bro solved problem [C. Devyatkino](https://codeforces.me/contest/2067/problem/C) **with4D DP

Full text and comments »

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

64.
By temp-for-talk, 17 months ago, In English
LinkedIn Influencers Engagement Farming (Exploitative Version) I really want to know your opinions on this, I might be wrong here, but I don't think it's fair and that's why this blog <br> <br> Please share your opinions if you think this to be right instead <br> <br> Coming to my main point, <br> It feels stupid to see users like [user:srishtik_16,2025-06-06] posting on Linkedin stealing the information from some "very nice" codeforces blogs and making a ChatGPT post out of it to publish on Linkedin and farm their own engagement <br> <br> Codeforces community has many elite people (legends) who post meaningful and extraordinary stuff. The real people who are behind the work/research are even more "sophisticated" and have "higher standards" in my opinion. So, I really don't think they'd ever like to get "cheap publicity" of their original work by some stupid LinkedIn Influencer on their way to farm some engagement <br> <br> ![ ](/predownloaded/e9/76/e9762323814ba624c55af2a03aca4df2190e9b84.png) ![ ](/predownloaded/4d/53/4d5325232231875...
![ ](/predownloaded/e9/76/e9762323814ba624c55af2a03aca4df2190e9b84.png) ![ ](/predownloaded/4d/53

Full text and comments »

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

65.
By MiptLited, 7 years ago, translation, In English
Дистанционное участие в сборах Discover Vladivostok by Moscow Workshops ICPC **Для дивизиона А открывается возможность участвовать в сборах дистанционно.** Участники получат логин и пароль на команду из одного, двух или трёх человек и смогут выбрать удобное время для решения задачек. Финальный контест все участники как очного, так и дистанционного обучения будут писать одновременно. Студентам также будут доступны разборы всех задач. ![ ](/predownloaded/4d/bf/4dbf6e6ab1f1cc3043894f8cf1861ee7e82bd634.jpg) Преподавать в дивизионе А во Владивостоке будут тренеры Moscow Workshops ICPC: **Филипп [DPR-pavlin](https://codeforces.me/profile/DPR-pavlin) Рухович**, со-тренер команды МФТИ, бронзового призера Финала ICPC 2019; в прошлом финалист ICPC, а ныне главный методист сборов в Гродно, во Владивостоке и Открытых Московских Тренировок; **Илья [izban](https://codeforces.me/profile/izban) Збань**, Чемпион ICPC 2017 года в Рапид-Сити (США). Дистанционное участие — это уникальная возможность приобщиться к миру спортивного программирования, когда обстояте...
одновременно. Студентам также будут доступны разборы всех задач. ![ ](/predownloaded/4d/bf, ![ ](/predownloaded/4d/bf/4dbf6e6ab1f1cc3043894f8cf1861ee7e82bd634.jpg)

Full text and comments »

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

66.
By sargeX, history, 19 months ago, In English
CFPusher — A Chrome Extension to automatically push your Codeforces submissions to your Github repo [CFPusher](https://github.com/SarJ2004/cf-pusher) &mdash; Automatically push Codeforces Submissions to GitHub ================== _Have you ever wanted to keep track of your Codeforces streaks and problem-solving progress without lifting a finger? What if I told you there's now an extension that automatically does it for you — and even pushes your accepted solutions to GitHub instantly? Introducing **CFPusher** — a sleek, lightweight Chrome extension built with love for competitive programmers like you._ ### SCREENSHOTS: <div style="display: flex; justify-content: space-between; margin-bottom: 16px;"> <img src="/predownloaded/ce/ec/ceecfcffe66f7d7a82726c5c39535551bd8dbc4e.png" alt="Image 1" style="width: 49%;" /> <img src="/predownloaded/7c/ad/7cad7c946b4bac0a25d2d1effe2558e3d86a326d.png" alt="Image 2" style="width: 49%;" /> </div> [cut] <div style="display: flex; justify-content: space-between;"> <img src="/predownloaded/4d/6d/4d6d1c0c640e648c35d133e5a8cb6f...

Full text and comments »

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

67.
By shiftpsh, history, 2 years ago, In English
Candidate Teams to the 2025 ICPC Asia Pacific Championships Since the Seoul regional has concluded, I've compiled a list of teams expected to compete in the [2025 APAC Championship](https://icpc.asia/) based on the current situation and the [selection rules](https://icpc.iisf.or.jp/asia-pacific/2024-2025-cycle/): - https://icpcapac.solved.ac/2025 The Site scores for each of the five sites are also included, and the values are: - **Taichung** (17 Nov): **74.26** - **Seoul** (23 Nov): **76.34** - **Jakarta** (1 Dec): **86.16** - **Hanoi** (13 Dec): **104.10** - **Yokohama** (22 Dec): **71.50** Details for the calculation can be viewed on the site. 65 teams will be advanced/invited. Our team is currently 66th on the list, please wish us luck: ![Redshift](/predownloaded/4d/ff/4dff7f73ae25c0a385685dcf2d853f9acbecd13e.png)
us luck: ![Redshift](/predownloaded/4d /ff/4dff7f73ae25c0a385685dcf2d853f9acbecd13e.png), ![Redshift](/predownloaded/4d/ff/4dff7f73ae25c0a385685dcf2d853f9acbecd13e.png)

Full text and comments »

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

68.
By rish-bish, history, 6 years ago, In English
UPDATE: Added Atcoder and Codeforces Questions to Caucus Thank you so much for the positive feedback. Now Caucus natively supports codeforces and atcoder questions. If you find any bug please create an issue on github and let me know. https://github.com/Rishabh-malhotraa/caucus/issues | Enter Coderforces/Atcoder Link | Atcoder Question | Codeforces Question | |---|---|---| | ![Input Field](/predownloaded/04/4c/044c0e4825984fd3f626e81a4bcd854bc5f56705.png) | ![ Atcoder-question ](/predownloaded/46/4d/464d3529878f168b933982f4dce849560c77cba7.png) | ![CF-question](/predownloaded/fe/fd/fefd32fad905831e09d5357fba4a48784c984631.png) | PS: if two people are collaborating (A & B) and A searches for a question of codeforces then other B automatically get the questions user A searched for.(Problem Page is synced across all the users that are collaborating) Please consider giving the repo a star on Github if you liked the project. Cheers! GITHUB: https://github.com/Rishabh-malhotraa/caucus WEBSITE: https://caucus-app.herok...
-question ](/predownloaded/46/4d/464d3529878f168b933982f4dce849560c77cba7.png) | ![CF-question, /044c0e4825984fd3f626e81a4bcd854bc5f56705.png) | ![ Atcoder-question ](/predownloaded/46/4d

Full text and comments »

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

69.
By Safin17, 11 months ago, In English
Replay Contest Announcement: Inter University Programming Contest – IIUC Tech Fest 2025 <h2>The Replay Contest of <strong>DDN presents Inter University Programming Contest – IIUC Tech Fest 2025</strong></h2> <p>The contest will be held on <strong>16 December 2025 at 09:00 (GMT +6)</strong>.</p> <p>The contest is open for all.</p> <p>Problems are curated by <a href="https://baps-bgd.github.io/" target="_blank"><strong>BAPS</strong></a>, making this contest a good opportunity to practice and prepare for the <em>ICPC Asia Dhaka Regional Contest 2025</em>.</p> <h3>Registration Deadline:</h3> <p>Sign-up will close on <strong>16 December 2025 at 09:00 (GMT +6)</strong>.</p> <p>Contest Platform: <a href="https://toph.co" target="_blank"><strong>Toph.co</strong></a></p> <p>Participation Link:<br> <a href="https://toph.co/c/inter-university-iiuc-tech-fest-2025-r" target="_blank">https://toph.co/c/inter-university-iiuc-tech-fest-2025-r</a></p> <div style="text-align: center; margin-top: 20px;"> <a href="https://toph.co/c/inter-university-iiuc-tech-fest-202...
-2025-r" target="_blank">

Full text and comments »

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

70.
By Temirulan, history, 9 years ago, In Russian
IOI 2017 — 2 тур Всем привет из Тегерана! В течении часа начнется второй тур олимпиады. Вместо простых и бесконечных нажатий на F5 я решил делится своими мыслями и освещать текущие результаты участников из Казахстана для тех кто не может смотреть на таблицу. Все будет происходить в телеграмме. [Link to channel](https://t.me/ioi2017day2). Feel free to join us. Свои же мысли/вопросы можете писать здесь же в комментах или в комментах к посту на [facebook](https://www.facebook.com/photo.php?fbid=1973323689569576&set=a.1507950676106882.1073741828.100006758916414&type=3&theater). Удачи Асхат [user:i_love_margot_robbie,2017-08-01] Жалгасов, Санжар [user:sancho,2017-08-01] Бидайбек, Нурбахыт [user:m4ddie,2017-08-01] Мадибек и Нурлыхан [user:Nurlykhan,2017-08-01] Кайрлы. Алга Казахастан! #kzforgold #goforgold #ioi2017 #zhananaioi #zhanavtokyo ![ ](/predownloaded/4d/99/4d9956702c291a31f95d69f54428bedc9d65499d.jpg)
#goforgold #ioi2017 #zhananaioi #zhanavtokyo ![ ](/predownloaded/4d/99, Алга Казахастан! #kzforgold #goforgold #ioi2017 #zhananaioi #zhanavtokyo ![ ](/predownloaded/4d/99

Full text and comments »

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

71.
By Vladik, history, 11 years ago, In Russian
ЗКШ: Второй отбор Всем доброго времени суток. [17 января в 15:00 мск](http://www.timeanddate.com/worldclock/fixedtime.html?day=17&month=1&year=2016&hour=15&min=0&sec=0&p1=166) пройдет второй отборочный этап Зимней школы по программированию. Более подробно о школе можно почитать на официальном [сайте](http://it-edu.mipt.ru/zksh2016). ![ ](http://codeforces.me/predownloaded/83/4d/834d9642f516b35bec2a3bb3b4277390a0bbb3bd.png) Предлагаю обсудить задачи после окончания контеста. **UPD:** Контест завершен!
![ ](http://codeforces.me/predownloaded/83/4d /834d9642f516b35bec2a3bb3b4277390a0bbb3bd.png), -edu.mipt.ru/zksh2016). ![ ](http://codeforces.me/predownloaded/83/4d

Full text and comments »

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

72.
By karanarjunjr, history, 5 years ago, In English
A Chrome Extension for CP-ers Hello again everybody! How's it going? ====================================== ![ ](/predownloaded/dd/4d/dd4d319ee0a9cfa6c6be4a6bcddfffa8f834b773.png) I have developed a **Chrome Extension** that goes by the name **CP Calendar** , which helps you get the schedule of all Competitive Programming contests, hosted by various well-known platforms, listed in a single place. Sounds cool? It's completely **FREE** and what are you waiting for? Do try it out from the **Chrome Web Store**, drop a rating / review if you find it helpful. A share with your programming friends or your college community would be considered gold. Platforms supported: -------------------- - Atcoder - CodeChef - Codeforces - GeeksForGeeks - Naukri.com - Leetcode - TopCoder ### [ADD TO CHROME](https://bit.ly/2ZGtnjP) ### **UPDATE: The extension hasn't been working for quite sometime and it's fixed. Kindly Update!** Happy Coding!
/dd/4d/dd4d319ee0a9cfa6c6be4a6bcddfffa8f834b773.png)

Full text and comments »

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

73.
By P_Nyagolov, 10 years ago, In English
Deleting messages? Hello everybody, When I opened gmail this morning, I saw the usual "You have new message" notification &mdash; http://store.picbg.net/pubpic/F3/D8/21675f680b25f3d8.png. However, when I followed the link, I saw there was no such message &mdash; http://store.picbg.net/pubpic/4D/EA/a9846246fd744dea.png. How is this possible? I tried sending a random message to a friend of mine in order to see if I can somehow delete it in the first few minutes but nah, I couldn't. PS: I also noticed that I haven't received an email for this comment &mdash; http://codeforces.me/blog/entry/46407?#comment-308043. Is it some sort of a bug, I remember this has happened before?
the link, I saw there was no such message — http://store.picbg.net/pubpic/4D/EA, was no such message — http://store.picbg.net/pubpic/4D/EA/a9846246fd744dea.png.

Full text and comments »

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

74.
By ruslanjan, history, 11 years ago, In Russian
Генератор числа ПИ на С++ Кому интересно. Вот код: ~~~~~ #include <time.h> #include <stdio.h> #include <malloc.h> #include <math.h> long B=10000; long LB=4; long MaxDiv=450; void SetToInteger (long n, long *x, long Integer) { long i; for (i=1; i<n; i++) x[i] = 0; x[0] = Integer; } long IsZero (long n, long *x) { long i; for (i=0; i<n; i++) if (x[i]) return 0; return 1; } void Add (long n, long *x, long *y) { long carry=0, i; for (i=n-1; i>=0; i--) { x[i] += y[i]+carry; if (x[i]<B) carry = 0; else { carry = 1; x[i] -= B; } } } void Sub (long n, long *x, long *y) { long i; for (i=n-1; i>=0; i--) { x[i] -= y[i]; if (x[i]<0) { if(i) { x[i] += B; x[i-1]--; } } } } void Mul (long n, long *x, long q) { long carry=0, xi, i; for (i=n-1; i>=0; i--) { xi = x[i]*q; ...
) { long i; printf ("%d.", x[0]); for (i=1; i4d", x[i, ++) { printf ("%.4d", x[i]); if (i%25==0) printf ("%8d\n", i*4

Full text and comments »

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

75.
By MohammadParsaElahimanesh, 11 months ago, In English
Codeforces Global Round 31 Salam ! Here is the editorial for [Codeforces Global Round 31](https://codeforces.me/contest/2180). We hope you find these solutions helpful. We also have prepared a special editorial with step by step hint, examples, tables, and walkthroughs which is available [here](https://repovive.com/editorial/codeforces-global-round-31). #### [problem:2180A] **Idea:** [user:Amirrzwm,2025-12-18], [user:MohammadParsaElahimanesh,2025-12-18] &mdash; **Preparation:** [user:MohammadParsaElahimanesh,2025-12-18] <spoiler summary="Solution"> <spoiler summary="Simple Simulation (Brute force)"> Since constraints are small, we can simulate the spins directly: - Start from section $a$. - Move the pointer by adding $b$ modulo $l$ repeatedly. - Stop when we return to a previously visited section. - Among all visited sections, select the section with the highest prize. It runs in $\mathcal{O}(l)$ as we mark each section at most once. </spoiler> <spoiler summary="Mathematical Solutio...
,\ 4d,\ y)$, - $(d,\ \tfrac{3d}{2},\ 2d,\ y)$ when $d$ is even. **Step 3: parameters $(t,d)$ and, : - $(d,\ 2d,\ 3d,\ y)$, - $(0,\ 2d,\ 4d,\ y)$, - $(d,\ \tfrac{3d}{2},\ 2d,\ y)$ when $d$ is even.

Full text and comments »

76.
By Juniorandrade, history, 10 years ago, In English
Caution! Fake Email! Hi codeforces, Today, i received a email from "[email protected]" to registrate in contest. Obviously, it is a spam try to steal my username and password. Someone received that? ![ ](http://codeforces.me/predownloaded/d4/9d/d49dfa64de72a193708fc47524c0179a194494ff.png) Look this url! ![ ](http://codeforces.me/predownloaded/4d/43/4d43ce1f8d03bfc4876e692ee4a3bba2e80217f9.png)
this url! ![ ](http://codeforces.me/predownloaded/4d /43/4d43ce1f8d03bfc4876e692ee4a3bba2e80217f9, ![ ](http://codeforces.me/predownloaded/4d /43/4d43ce1f8d03bfc4876e692ee4a3bba2e80217f9.png)

Full text and comments »

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

77.
By karanarjunjr, history, 5 years ago, In English
Chrome Extension for Competitive Programmers Hello again everybody! How's it going? ====================================== ![ ](/predownloaded/dd/4d/dd4d319ee0a9cfa6c6be4a6bcddfffa8f834b773.png) I have developed a **Chrome Extension** that goes by the name **CP Calendar** , which helps you get the schedule of all Competitive Programming contests, hosted by various well-known platforms, listed in a single place. Sounds cool? It's completely **FREE** and what are you waiting for? Do try it out from the **Chrome Web Store**, drop a rating / review if you find it helpful. A share with your programming friends or your college community would be considered gold. Platforms supported: -------------------- - Atcoder - CodeChef - Codeforces - GeeksForGeeks - Google - HackerEarth - Leetcode - TopCoder ### [ADD TO CHROME](https://bit.ly/2ZGtnjP) Happy Coding!
/dd/4d/dd4d319ee0a9cfa6c6be4a6bcddfffa8f834b773.png)

Full text and comments »

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

78.
By SAT2020, history, 4 years ago, In English
Segmentation Fault on 4D Vector but not Array? Hello Codeforces! After Tuesday's contest, I decided to learn a little bit more about Sparse Tables. While solving [this](https://www.codechef.com/problems/CHSQARR?tab=statement) problem on Codechef, I came across some code that has been heavily confusing me for the past few hours. Basically, when I initialize the sparse table "table" as an array, everything works great. But when I initialize it as a 4-D vector inside the function "build_table", the code gives segmentation fault on large test cases! I've attached both submissions below. Any help would be extremely appreciated! [Submission 1 (Array, AC)](https://www.codechef.com/viewsolution/83754291) [Submission 2 (Vector, Seg Fault)](https://www.codechef.com/viewsolution/83754166) Thanks! -Simon
Segmentation Fault on 4D Vector but not Array?

Full text and comments »

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

79.
By MiracleInLife, history, 4 years ago, In English
[Haskell] Having trouble with module not found and weird submissions's result **Hello everyone, can you guys help me solve this trouble please?** My story is I'm was doing [this problem](https://codeforces.me/contest/4/problem/C) by using Haskell. At first, with my [submission #168264592](https://codeforces.me/contest/4/submission/168264592), it got compiler error. I think because the current GHC version I use is 8.10.7, meanwhile codeforces's GHC version is 8.10.1 so it does not have module 'Data.HashMap.Strict'. So I switch to use Data.Map.Strict which codeforces'GHC suggests, however my [submission #168266690](https://codeforces.me/contest/4/submission/168266690) got wrong answers. Here's the weird part: My results and the jury's result is the same, so I do not know why I got it wrong?? ![ ](/predownloaded/64/4d/644df9be4bd2ecd3fe818d0c4129f4d1bc9771ec.png)
![ ](/predownloaded/64/4d/644df9be4bd2ecd3fe818d0c4129f4d1bc9771ec.png), , so I do not know why I got it wrong?? ![ ](/predownloaded/64/4d

Full text and comments »

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

80.
By maverick_GOD, history, 5 years ago, In English
How to use gcc instead of clang on macOS, specially M1? I posted a blog, 3 months ago [( this one ),](https://codeforces.me/blog/entry/88063) Still many are facing the same issue as more and more M1 users increases. And I am still getting many doubts in messages. ![ ](/predownloaded/f7/b7/f7b75f2875ddc2ca6d0f5bd10c7343cf21e6c5f1.png) ![ ](/predownloaded/df/4d/df4d1a7a9c497dd299c1feabd7a2bddf8e5b5c73.png) ![ ](/predownloaded/ee/1f/ee1f09a4d132e7abcfca024739efbca7d2caad37.png) ![ ](/predownloaded/ff/55/ff55138642330ad95f6168c9c0bc8254e630da16.png) ![ ](/predownloaded/4a/ea/4aeaa2a3ce64d6d512ee1e41ebbbe651d85c22ef.png) ![ ](/predownloaded/71/a5/71a5a83947f5cfaee4f5bd6a09863ac1c7c14207.png) No proper tutorial is available anywhere, StackOverflow, youtube, etc. **I request someone who can explain the whole process accurately, and if a youtuber wants to make a demo video for that.** Thanks in advance!!! P.S: Some solutions are there in the comments of the above [blog.](https://codeforces.me/blog/entry/88063)
![ ](/predownloaded/df/4d/df4d1a7a9c497dd299c1feabd7a2bddf8e5b5c73.png)

Full text and comments »

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

81.
By divyansh_0602, history, 4 years ago, In English
Seriously? Codechef? Look at the account on rank 1. ![ ](/predownloaded/19/92/19927639f9814e436cdabee9c58e6a4e332bfc62.png) He/she openly invites people to join telegram channel and get the solution. ![ ](/predownloaded/4d/36/4d36077d6621a340877898932161cbef1874f368.png) ![ ](/predownloaded/6c/ff/6cff82d7d62dfc7350e90b8399f0c789edbcf447.png) These accounts should be banned from live contest. :(
![ ](/predownloaded/4d/36/4d36077d6621a340877898932161cbef1874f368.png) ![ ](/predownloaded/6c/ff

Full text and comments »

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

82.
By ritik_patel05, history, 7 years ago, In English
Help in DP Problem 4D **Problem**: https://codeforces.me/contest/4/problem/D **Solution**: https://codeforces.me/contest/4/submission/73546246 What I am doing is first sorting indexes with given height and width in increasing order. Then I am making a recursive function to calculate longest chain. Whenever I reach an index, I have 2 options either include or don't include it. I have been trying to find for long why am I getting the wrong answer. But I have no clue. It would be great if someone could point out my error in thinking. Thank you :)
Help in DP Problem 4D

Full text and comments »

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

83.
By Abdur-Rehman, history, 5 weeks ago, In English
Congratulations to ZainUlHaq Huge Congratulations to [user:ZainUlHaq,2026-10-08] for finally reaching expert. His rating graph is a testament to all inconsistent performers that one day when the stars line up they may also perform well for multiple rounds in a row. No longer can Zain be bullied by <a href="https://codeforces.me/profile/M_AsadHussain" title="Master M_AsadHussain"><b><font color="#ff8c00">M_AsadHussain</font></b></a> for being worse than him. ‎ ‎ ‎ ‎ ‎ <div class="flex-container" style="display: flex; flex-direction: column; align-items: center; text-align: center;"> <img src="/predownloaded/4d/d6/4dd6b932955dd3ec3af701f306a84c29ebbe0c38.jpg" alt="Description"> <p style="margin-top: 8px; font-style: italic;">ZainUlHaq circa 2001</p> </div>
-items: center; text-align: center;"> , ="/predownloaded/4d/d6/4dd6b932955dd3ec3af701f306a84c29ebbe0c38.jpg" alt="Description">

Full text and comments »

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

84.
By forforfor, history, 6 years ago, In English
Educational Codeforces Round 88 (Problem C) Precision Problem. [submission:81749180] The same c++ code on different c++ compiler is giving different output Try with the given below testcase : ~~~~~ 1 999977 17 499998 ~~~~~ The correct answer as per the given testcases is `499981` `This is the 14th testcase of 4 test file(Test #4) of given submission` ![ ](/predownloaded/a2/82/a28206a22a322f72e65af03c50c647a0ad97616c.png) ![ ](/predownloaded/ed/4d/ed4d57f0c79bb17f2ab5029f544e293c2c6ed4c7.png) ![ ](/predownloaded/3a/42/3a427656489908bc4dff5c609eef09b9e3db8318.png) ![ ](/predownloaded/92/99/92995afc24e78d2260c8deca3f1abcf90365e19c.png)
![ ](/predownloaded/a2/82/a28206a22a322f72e65af03c50c647a0ad97616c.png) ![ ](/predownloaded/ed/4d, ) ![ ](/predownloaded/ed/4d/ed4d57f0c79bb17f2ab5029f544e293c2c6ed4c7.png) ![ ](/predownloaded/3a/42

Full text and comments »

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

85.
By CalisthenicsMan, 4 years ago, In English
Segment tree memes Hey guys/girls/*, I've made some simple memes about segment trees using [imgflip templates](https://imgflip.com/memetemplates). I need your help to create some more original ones, maybe based on your personal experiences at competitions, craziest problems involving segtree, famous people from CF using segtree etc.! ![ ](/predownloaded/a6/01/a60124d5354a5e29c4523a1c8498d9fae6bbe55f.jpg) ![ ](/predownloaded/26/a1/26a1d14f3d6011f32afc23b38217bb88d36a862d.jpg) ![ ](/predownloaded/3b/70/3b703eb0487dac2f6b1f365a80a4dad0cd70235b.jpg) ![ ](/predownloaded/c0/4d/c04d8b523037231576d2afd28029ffc76c83318a.jpg) Maybe your's will be more fun
/3b703eb0487dac2f6b1f365a80a4dad0cd70235b.jpg) ![ ](/predownloaded/c0/4d

Full text and comments »

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

86.
By pani.natalia, 5 years ago, In English
Handle Length Statistics [user:MikeMirzayanov,2022-01-07] [in this blog] (https://codeforces.me/blog/entry/98347) asked a question about fighting against meaningless blogs, so I am in hurry to post this picture before rules become strict :-) ![ ](/predownloaded/4d/40/4d40baa52ecf4edc82af33f5ad659020d5a4665a.jpg) [cut] _._ Line chart shows distribution of handle length by year of registration. Dashboard is created using Tableau. Guys, I love it, Tableau is great! It is possible to look at more details when you hover charts on [dashboard] (https://public.tableau.com/app/profile/natalia5014/viz/CodeForces/Dashboard) directly. Dashboard is based on data downloaded by python [script](https://github.com/NataIss/codeforces) using Codeforces API.
rules become strict :-) ![ ](/predownloaded/4d /40/4d40baa52ecf4edc82af33f5ad659020d5a4665a.jpg

Full text and comments »

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

87.
By Vladik, 11 years ago, In Russian
ЗКШ: Первый отбор Всем доброго времени суток. Сегодня прошел первый отборочный этап Зимней школы по программированию. Более подробно о школе можно почитать на официальном [сайте](http://it-edu.mipt.ru/zksh2016). ![ ](http://codeforces.me/predownloaded/83/4d/834d9642f516b35bec2a3bb3b4277390a0bbb3bd.png) Предлагаю обсудить задачи здесь.
![ ](http://codeforces.me/predownloaded/83/4d /834d9642f516b35bec2a3bb3b4277390a0bbb3bd.png), ). ![ ](http://codeforces.me/predownloaded/83/4d /834d9642f516b35bec2a3bb3b4277390a0bbb3bd.png

Full text and comments »

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

88.
By aryan0707as, history, 18 months ago, In English
Need help in " Anti-Subarray Sum " problem ( D ) of codechef 187 problem -> https://www.codechef.com/problems/ANTISM?tab=statement In this problem, I know that a prefix and suffix approach can solve it, but I am struggling with the dynamic programming (DP) approach. I have tried to understand many solutions that use 4D or 5D DP, but I still haven’t been able to grasp them. Can anyone explain how to approach this using DP? My recursive DP gives a TLE because it involves the sum of the subarray. Here's the structure of my recursive function: f( i , picked_first_element , left_one_element_in_middle_after_picking , pick_one_ele_after_leaving_one_in_middle , sum_of_ele_picked_right_now , picked_anyone_ele_such_that_its_b[i]==1 ) { // code accordingly // gives TLE due to "sum" variable }
the dynamic programming (DP) approach. I have tried to understand many solutions that use4D or 5D DP, ) approach. I have tried to understand many solutions that use 4D or 5D DP, but I still haven’t been able

Full text and comments »

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

89.
By kirill_borisenkov, history, 8 months ago, In Russian
Htg Classic &mdash; Offensive. 1. Качаем, разархивируем. 2. Параметры запуска в cs2: -game csco/csgo -steam -language english -maxdownloadfilesizemb 200 3. Запускаем ярлык из папки. Пробуйте скачать по одной из ссылок: https://gofile.io/d/TUJyr3 https://mega.nz/folder/i5s0UJBI#_pfWXyZ1XlprdOLsvLn9Og https://drive.google.com/file/d/1ExhxlK3qoXTL_ARnZy9Utp0ZgBfAdvrq/view?usp=sharing https://www.dropbox.com/scl/fi/gvbd4qmf7j63l2e38iaie/Classic-Offensive-May-7th.zip?rlkey=3avcp8zswlfibc4gbdktrpnt4&st=tcpauxe6&dl=0 https://drive.google.com/file/d/1SCasTUenY3PGsTDvbx7Nhw7iA3pZr-4d/view
/1SCasTUenY3PGsTDvbx7Nhw7iA3pZr-4d/view

Full text and comments »

90.
By fast-fourier-transfem, history, 5 years ago, In English
Codeforces Unicode playtesting glitch Codeforces breaks when you enter an emoji (or some weird unicode) in your name. It redirects to this: ![Image](/predownloaded/4d/f0/4df0cdc7e9b2139c991d43e5f86339221511c49f.png) However some characters still work. See my profile for a c࿆o࿆o࿆l࿆ display.⃣.
this: ![Image](/predownloaded/4d /f0/4df0cdc7e9b2139c991d43e5f86339221511c49f.png)

Full text and comments »

91.
By ismagilov.code, history, 11 years ago, In Russian
Групповые операции на декартовом дереве по неявному ключу Кто может помочь с групповыми операциями на декартовом? Например скинуть литературу по теме. Заранее спасибо! ![ ](http://codeforces.me/predownloaded/82/4d/824d755514d6acb2af159c29795a95b585199fb2.png)
. Заранее спасибо! ![ ](http://codeforces.me/predownloaded/82/4d /824d755514d6acb2af159c29795a95b585199fb2

Full text and comments »

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

92.
By roben_76, 13 years ago, In English
what's wrong with my answer to the problem "4D. Mysterious Present"? hello, would you tell me why my answer doesn't work? please help me to know why doesn't work. and you could see the submission here:[4713882](http://codeforces.me/contest/4/submission/4713882) ` #include <iostream> #include<stdio.h> #include<stdlib.h> #include <cmath> #include<algorithm> #include<vector> #include<string> #include<string.h> #include<sstream> #define pb push_back #define limit 5000 #define mp make_pair #define ff first.first #define fs first.second using namespace std; int main(){ int n,w,h; cin>>n>>w>>h; pair<pair<int,int>,int> a[n]; for(int i=0;i<n;i++){ cin>>a[i].first.first; cin>>a[i].first.second; a[i].second=i; } sort(a,a+n); vector<int> v[n+1]; for(int i=0;i<n-1;i++){ for(int j=i+1;j<n;j++){ if(a[j].ff>a[i].ff && a[j].fs>a[i].fs){ v[i].pb(j); } } } for(int i=0;i<n;i++){ if(a[i].ff>w&&a[i].fs>h){ v[n].pb(i); } } if(v[n].size()==0){ cout<<"0"; retu...
what's wrong with my answer to the problem "4D. Mysterious Present"?

Full text and comments »

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

93.
By singlabharat, 5 years ago, In English
The RISE & FALL of Orz ###### **A month ago** <spoiler summary="Spoiler"> ![ ](/predownloaded/4d/b9/4db9800806734e442c8816ef3a5b4f8fa04f72d2.jpg) </spoiler> ###### **A week ago** <spoiler summary="Spoiler"> ![ ](/predownloaded/52/23/5223cf6ad37b00e651061b1239a5c42c729d4b3f.jpg) </spoiler> Cud someone pls explain the context as to why this happened?
![ ](/predownloaded/4d/b9/4db9800806734e442c8816ef3a5b4f8fa04f72d2.jpg, ###### **A month ago** ![ ](/predownloaded/4d/b9

Full text and comments »

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

94.
By rock19, history, 9 years ago, In English
Abusive Message I have received this abusive message from @zeema99. ![ ](/predownloaded/4d/0a/4d0a0f651c9fce7e4e7e40a7af5f70bd7a204b37.png) I think he should be banned.
I have received this abusive message from @zeema99. ![ ](/predownloaded/4d/0a

Full text and comments »

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

95.
By flamestorm, 4 years ago, In English
Every problem I ever made As you may [have seen](https://codeforces.me/contests/writer/flamestorm), I've written a lot of problems. In this post, I want to go over each of my problems and describe my thought process for how I created each problem. I got this idea from [user:antontrygubO_o,2023-01-21], but I was also inspired by [user:McDic,2023-01-21]'s editorials that included a "behind story" for each problem. Anyway, I thought it would be fun to give you all a glimpse into my thought process: where my ideas came from, the obstacles I encountered along the way, and any random tidbits that give a bit more pizzazz to the problems. I think it's important to remember that problem-writing is a creative endeavor, so I hope you'll enjoy reading about the making of my problems as much as I enjoyed creating them. And who knows, maybe you'll even be inspired to write some problems of your own. Also, spoilers for a lot of problems. Obviously. <table> <thead> <tr> <th>ID</th> <th>Problem</th> ...
Div. 4D, because we're past the "just implement" problems, but it still needs to be easy... I think, >And here come the Div. 4 problems! To be honest, I think it is quite hard to make a Div.4D, because

Full text and comments »

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

96.
By shaaban_abdelrahim, history, 12 months ago, In English
3D/4D MO What is the best B to use in 3D/4D MO?
3D/4D MO

Full text and comments »

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

97.
By ash_ketchum, history, 11 years ago, In English
Codeforces Round #339 (Div. 2) A. Link/Cut Tree Well hello guys! Below is the link to my source code for the above problem. http://codeforces.me/contest/614/submission/15376824 I am getting a WRONG_ANSWER on test case 3 after my submission on CodeForces but when I compiled and executed the testcase on my g++ compiler it gave the right answer.Can anyone please tell me why is this happening?!.Below is a screenshot of the answer that I got for testcase 3 after compiling on g++. (http://codeforces.me/predownloaded/4d/2c/4d2c56826166cb8597ec2f5249162eb3266b58b4.png)
testcase 3 after compiling on g++. (http://codeforces.me/predownloaded/4d/2c

Full text and comments »

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

98.
By do_good_, history, 8 years ago, In English
How rng_58 able to come up with such solutions in his mind . I Just look at [editorials](https://img.atcoder.jp/wtf19-open/editorial.pdf) even looks much harder than gcj finals and i was like ..ITS IMO. ![ ](/predownloaded/a0/4d/a04dc36ca70186af718b082254d2a994199e2691.jpg)
than gcj finals and i was like ..ITS IMO. ![ ](/predownloaded/a0/4d, ![ ](/predownloaded/a0/4d/a04dc36ca70186af718b082254d2a994199e2691.jpg)

Full text and comments »

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

99.
By tiliguzov_read-only, history, 7 years ago, In English
MWJ olympiad 2020 03.03.2020 состоялась олимпиада ЗКШ 2020. На ней было предложено 6 задач в формате IOI. На тур было отведено 4 часа. Однако, через час после начала контеста, было выяснено что задачи использовались в другом контесте ранее. Была создана вторая версия олимпиады, на которой были предложены 6 задача в формате ICPC. На тур было отведено 3 часа, однако большинство участников узнали об это через 15 минут после начала. Однако настойчивыми участниками было установлено, что все задачи были взяты из Яндекс.Алгоритме 2014. Прошу обратить внимание [user:MikeMirzayanov,2020-03-03] на данную проблему! ================== ![ ](/predownloaded/66/4d/664dd482913965a90522562c510f37fa09d67d8c.jpg).
! ================== ![ ](/predownloaded/66/4d /664dd482913965a90522562c510f37fa09d67d8c.jpg).

Full text and comments »

100.
By Satwik_Mishra1, history, 5 years ago, In English
Help Needed in a DP problem My code for the problem https://codeforces.me/problemset/problem/682/D gets a TLE, Please can someone help me in figuring it out the reason? Genrally solutions involve 4D DP but I tried solving it using 3D DP. Thanks in advance. Link to my code- https://codeforces.me/contest/682/submission/127054863
someone help me in figuring it out the reason? Genrally solutions involve 4D DP but I tried solving it

Full text and comments »

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