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.

fancy

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

Full text and comments »

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

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

Full text and comments »

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

4.
By peltorator, 15 months ago, In English
"Algorithms in Depth" Stream Series: Kicking Off With FFT Hi Codeforces! I’ve long believed that it's _really_ worth revisiting the same competitive programming topics multiple times. The first time, you’re just trying to survive and maybe grasp the basics. The second time, you’ve solved some problems, you know where you got confused, and you're ready to absorb more. By the third time, you’ve seen and solved enough to start appreciating the subtleties — the tricks, advanced applications, deeper meaning. But most lectures I’ve seen are designed as a one-size-fits-all — trying to cover everything from scratch _and_ dive into the advanced stuff in one go. That’s rarely optimal. Take binary search. I once talked about it for six hours straight. A beginner at that lecture would’ve probably quit CP immediately. And that’s ok. Beginners don’t need all that. But the truth is, there _is_ that much depth to explore even in seemingly simple topics like binary search — once you're ready. Yet many people only see the beginner version once and mo...
first stream will cover only the basics. No fancy math. Just the simplest path to fast polynomial, will cover only the basics. No fancy math. Just the simplest path to fast polynomial multiplication

Full text and comments »

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

5.
By -is-this-fft-, history, 4 years ago, In English
[Tutorial] The command line: how to read input from file without #ifdef and much more #### Introduction Instead of algorithms and math, I'll be doing something completely different here. There is something that has bothered me for a long time: people not understanding the tools they use to participate in contests and thus failing to take real advantage of them. And it all goes back to not understanding the command line. Some of you might say, "well surely, the command line is something obsolete and you're only clinging to it because you [insert ridiculous amateur-psychology here]?" No! The command line is not obsolete, and unless competitive programming becomes so mainstream that software vendors start writing professional-grade tools aimed specifically at us, it won't be. [cut] $~$ What is the command line? Any of these: ![ ](/predownloaded/bd/b6/bdb6c157b9b3ce5ae046c9064e469e0081f8c0fe.png) As you can see, it comes in many background colors and fonts, but the basic idea is always the same. It's a box you can type commands in, which it will ...
bit to avoid any temptations. Don't worry, later we will come back to the fancy editors and using, worry, later we will come back to the fancy editors and using the command line there. The first step

Full text and comments »

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

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

Full text and comments »

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

7.
By sammyuri, 3 months ago, In English
Spectral::Cup 2026 Round 2 (Codeforces Round 1100, Div. 1 + Div. 2) Editorial Thank you for participating in our round! We hope you enjoyed the problems as much as we enjoyed preparing them. <spoiler summary="Rate the contest!"> <spoiler summary="Quality"> - Absolute Cinema contest - Excellent contest - Good contest - Average contest - Bad contest - Horrible contest </spoiler> <spoiler summary="Difficulty"> - Trivial contest - Easy contest - Average contest - Hard contest - Impossible contest </spoiler> </spoiler> [problem:2229A] Idea by: [user:Intellegent,2026-05-23] Prepared by: [user:Intellegent,2026-05-23] Editorial by: [user:reirugan,2026-05-23] <spoiler summary="Hint 1"> Let $y$ denote the final position of all of the slimes. Then it is optimal to choose $x = y$ for every operation. </spoiler> <spoiler summary="Hint 2"> Let $\mathrm{mn}$ denote the minimum value in $a$, a...
It's not convex, monotone, monge, FFT, centroid, or any other fancy, , FFT, centroid, or any other fancy trick like that. The solution is simpler than you might expect

Full text and comments »

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

8.
By antontrygubO_o, 2 years ago, In English
[CONTEST OVER] MIT Informatics Tournament 2024 Spring Invitational **Update 2**: The Qualification Round has **officially concluded**! A huge thank you to our contestants for joining us and supporting this new initiative! Congratulations to the top 16 finalists who are advancing to the finals round (along with many more as we continue to confirm people's availability)! 1. [user:Rewinding,2024-04-24] 2. [user:ksun48,2024-04-24] 3. [user:Petr,2024-04-24] 4. [user:Geothermal,2024-04-24] 5. [user:mango_lassi,2024-04-24] 6. [user:hank55663,2024-04-24] 7. [user:ecnerwala,2024-04-24] 8. [user:MiFaFaOvO,2024-04-24] 9. [user:Kevin114514,2024-04-30] 10. [user:A_G,2024-04-30] 11. [user:Adam_GS,2024-04-24] 12. [user:Tourist,2024-04-24] 13. [user:FlowerOfSorrow,2024-04-24] 14. Matthew Allan 15. [user:uwu,2024-04-24] 16. [user:TLE,2024-04-24] At this time, the scoreboard has been finalized, and you can upsolve our problems / watch our video tutorials with the following links: - Finalized Scoreboard: [https://mitit.org/Contest/ViewScoreboar...
Round is filled with exciting activities, such as fun tours around Boston, a fancy banquet

Full text and comments »

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

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

Full text and comments »

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

10.
By adamant, history, 15 months ago, In English
Finding a billion factorials in 60 ms with SIMD Hi everyone! _This blog is not about asymptotic optimization. Refer to [this comment](https://codeforces.me/blog/entry/63491?#comment-474051) for those._ There is a problem on Library Checker that goes as follows: <hr> **[Many Factorials](https://judge.yosupo.jp/problem/many_factorials)**: You're given $n_1,\dots,n_t$, where $t \leq 10^5$. For each $i$, find $n_i! \bmod M$, where $M = 998\;244\;353$. <hr> In this blog, we will learn how to solve this task in 61 ms, without precalc and **without** FFT. That's right, we will take the dumbest solution we can imagine, and will improve its constant factor until its decent enough. How much decent? Well, let's use the following baseline: <spoiler summary="Naive solution"> ```cpp vector<int> facts(vector<int> args) { const int block = 1 << 16; vector<int> args_per_block[mod / block + 1]; vector<int> res(size(args)); for(auto [i, x]: args | views::enumerate) { args_per_block[x / block].push_b...
doesn't do anything fancy, just splits the domain in blocks of length $2^{16}$, then computes all, It doesn't do anything fancy, just splits the domain in blocks of length $2^{16}$, then computes

Full text and comments »

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

11.
By mango_lassi, 5 years ago, In English
Young Tableaus and the Hook Length Formula Boring backstory of this blog ----------------------------- In 300IQ contest 3, there [was a problem](https://codeforces.me/gym/102538/problem/D) where you had to count the number of permutations with two disjoint longest increasing subsequences. We VCd this contest while practising for ICPC, and didn't solve this problem during the contest, so I was very interested to see how it could be solved. Turns out the solution uses something called Young diagrams, and unless you already know what they are, the editorial is impossible to understand. I asked if someone knew about Young diagrams on the competitive programming discord, and got linked [a paper](https://github.com/enkerewpo/OI-Public-Library/blob/master/IOI%E4%B8%AD%E5%9B%BD%E5%9B%BD%E5%AE%B6%E5%80%99%E9%80%89%E9%98%9F%E8%AE%BA%E6%96%87/%E5%9B%BD%E5%AE%B6%E9%9B%86%E8%AE%AD%E9%98%9F2019%E8%AE%BA%E6%96%87%E9%9B%86.pdf) from the Chinese IOI selection camp, written by [user:yfzcsc,2021-12-22]. If you can speak chinese, you shoul...
------------------ The name is fancy, but the mapping isn't hard (though proofs of its properties are, The name is fancy, but the mapping isn't hard (though proofs of its properties are).

Full text and comments »

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

12.
By brunovsky, 5 years ago, In English
[Tutorial] Network simplex Hello! If you've learned the simplex algorithm and a minimum cost flow algorithm, perhaps you've also heard about this fancy thing called [network simplex](https://en.wikipedia.org/wiki/Network_simplex_algorithm) which is supposed to be a specialization/optimization of the simplex algorithm for computing a [minimum cost circulation](https://en.wikipedia.org/wiki/Minimum-cost_flow_problem). If your google search didn't turn up any interesting results or your interest faded, you might have moved on to other subjects. Well I didn't! So this is a tutorial on network simplex (NS) for the **minimum cost circulation** problem. I'll describe and formulate the problem, show how it relates to the usual minimum cost flow problem, explain the theory behind the algorithm in-depth, and then derive the implementation details. ## Introduction The algorithm commonly used in competitive programming for this sort of task is a minimum cost flow algorithm based on finding augmenting paths in a *f...
heard about this fancy thing called [network simplex](https://en.wikipedia.org/wiki

Full text and comments »

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

13.
By antontrygubO_o, 18 months ago, In English
MIT Informatics Tournament 2025 Spring Invitational **Update (5/8):** The Finals Round has concluded (here are links to [gym](https://codeforces.me/gym/105870/standings) & [editorial](https://codeforces.me/gym/105870/attachments/download/31412/MITIT_2025_Finals_Editorial.pdf)). Editorials and problems for [Qualification Round 1](https://codeforces.me/gym/105822) and [Qualification Round 2](https://codeforces.me/gym/105837) are in the gym. Congratulations to all of our finalists! 1. [user:hos.lyric,2025-05-09] (405, 13:32:43) &mdash; $1500 2. [user:tourist,2025-05-09] (400, 05:50:33) &mdash; $1000 3. [user:benq,2025-05-09] (340, 05:41:11) &mdash; $500 4. [user:A_G,2025-05-09] (310, 05:52:27) 5. [user:Kevin114514,2025-05-09] (310, 09:29:36) 6. [user:ksun48,2025-05-09] (305, 06:32:42) 7. [user:gamegame,2025-05-09] (305, 06:51:14) 8. [user:rainboy,2025-05-09] (305, 07:16:58) 9. [user:jeroenodb,2025-05-09] (300, 04:57:25) 10. [user:errorgorn,2025-05-09] (300, 05:51:34) 11. [user:ecnerwala,2025-05-09] (300, 05:53:09) 12. ...
day of the Final Round is filled with exciting activities such as fun tours around Boston, afancy, of the Final Round is filled with exciting activities such as fun tours around Boston, afancy

Full text and comments »

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

14.
By adamant, history, 2 years ago, In English
Efficient linear algebra for dummies Hi everyone! Some time ago I started developing a linear algebra library for Library Checker, and it turned out to be much fun. I'd like to write this blog to outline how one can implement a linalg library with a very good Library Checker performance, while also avoiding highly technical low-level details that are common in other similar blogs. Instead, we will learn a few high level ideas that will let us write a code that the compiler will then optimize using all these fancy techniques _in our stead_. Huge thanks to ~ToxicPie9,2024-05-08 and [user:magnus.hegdahl,2024-05-08] for explaining me some of the optimizations used here! You may also look into ~sslotin,2024-05-08's [entry](https://codeforces.me/blog/entry/101655) about how it can be sped up even further with more advanced and low-level techniques. ### Tl'dr. In this blog, I present my [matrix library](https://cp-algorithms.github.io/cp-algorithms-aux/cp-algo/linalg/matrix.hpp), which maintains a simple and elegant...
in top-10% of submissions, **and we didn't use [anything fancy ](https://codeforces.me/blog/entry, that will let us write a code that the compiler will then optimize using all thesefancy techniques _in, write a code that the compiler will then optimize using all these fancy techniques _in our stead_.

Full text and comments »

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

15.
By Zlobober, 9 years ago, translation, In English
Yandex.Algorithm 2017 We are announcing the annual Yandex.Algorithm 2017 championship! This is a great opportunity to compete with the strongest programmers of the world, win a fancy T-shirt, visit Yandex office or even receive some serious money prize. ![Yandex.Algorithm 2016!](http://codeforces.me/predownloaded/1b/c0/1bc02bc41cf4a9b3e823b5afa09136a9b5f50a24.jpg)<br /> [cut] <center><h3><a href="https://contest.yandex.com/algorithm2017/schedule/">Complete schedule</a></h3></center> In order to take place in the main part of the competition you must participate in at least one of the Warm-Up round ([April 22nd, 16:00 Moscow Time](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Yandex.Algorithm+2017+Warm-up+round&iso=20170422T16&p1=166&ah=1&am=40)) and Qualification round ([April 29nd or 30th, virtual participation](https://www.timeanddate.com/worldclock/fixedtime.html?msg=Yandex.Algorithm+2017+Qualfication+round&iso=20170429T00&p1=166)) and solve at least one problem in some of them. ...
compete with the strongest programmers of the world, win a fancy T-shirt, visit Yandex office or even

Full text and comments »

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

16.
By arvindf232, history, 9 months ago, In English
Quadratic binary energy function minimisations by Flow ## Motivations I tried to read [https://codeforces.me/blog/entry/148438](https://codeforces.me/blog/entry/148438) and failed. It contains a lot of extra explanations and intuition that I either already knew or could reconstruct immediately. That is not inherently bad, but for me personally it made the key ideas harder to see. (I think most contestants would not struggle with visualising binary logical relations...) As I asked around (and with help from LLMs), it became clear that the underlying structure is the Kolmogorov–Zabih characterization of which quadratic binary energies are solvable via a single max-flow. This blog is essentially a reweighting of that material: shorter, more “algebraic”, and aimed at people who are already comfortable with max-flow / min-cut and with abstracting away implementation details. This blog is also just essentially an extremely long comment that is too long to fit in comment section. ## Declarations While writing this, I did **not**...
comment on the rest. Also, I am sorry for the fancy name that is ultimately something pretty well, Also, I am sorry for the fancy name that is ultimately something pretty well known.

Full text and comments »

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

17.
By -is-this-fft-, history, 2 years ago, In English
[Tutorial] The residual graph and working with the set of all minimum cuts I have previously written about flows in these blogs: [1](https://codeforces.me/blog/entry/104960), [2](https://codeforces.me/blog/entry/105330), [3](https://codeforces.me/blog/entry/105658). Minimum cuts are a very fascinating topic for me. There are a lot of maximum flow problems where there's a fairly simple chain of reductions leading to "you should use flow", but there are also a lot of flow problems where flow comes apparently out of nowhere. Particularly fascinating are those where it's more convenient to think in terms of minimum cut: they work, because minimum cut allows you to model partitioning a set in two, with some additional implication-like constraints. Here are a couple of problems with that nature: - [ARC085E \- MUL](https://atcoder.jp/contests/arc085/tasks/arc085_c) (this reduction is almost standard these days) - [ARC142E \- Pairing Wizards](https://atcoder.jp/contests/arc142/tasks/arc142_e) - [problem:104925D] There are also flow problems on graphs ...
check any cut for minimality has a fancy name too: _complementary slackness_. Let's write down the, idea that one maximum flow can be used to check any cut for minimality has a fancy name too

Full text and comments »

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

18.
By awoo, history, 3 years ago, translation, In English
Educational Codeforces Round 153 Editorial [problem:1860A] Idea: [user:BledDest,2023-08-18] <spoiler summary="Tutorial"> [tutorial:1860A] </spoiler> <spoiler summary="Solution (Neon)"> ~~~~~ #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int t; cin >> t; while (t--) { string s; cin >> s; int n = s.size(); string a, b; for (int i = 0; i < 2 * n; ++i) { a += "()"[i & 1]; b += ")("[i < n]; } if (a.find(s) == string::npos) { cout << "YES\n" << a << '\n'; } else if (b.find(s) == string::npos) { cout << "YES\n" << b << '\n'; } else { cout << "NO\n"; } } } ~~~~~ </spoiler> [problem:1860B] Idea: [user:BledDest,2023-08-18] <spoiler summary="Tutorial"> [tutorial:1860B] </spoiler> <spoiler summary="Solution 1 (BledDest)"> ~~~~~ #include<bits/stdc++.h> using namespace std; int main() { int t; cin >> t; for(int i = 0; i < t; i++) { int m, k, a1, ak; cin >> m >> k >> ...
>> m >> k >> a1 >> ak; // function which calculates the number of fancy coins taken // if we take, which calculates the number of fancy coins taken // if we take exactly x coins of value k auto, ; // function which calculates the number of fancy coins taken // if we take exactly x coins of value k

Full text and comments »

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

19.
By dcclyde, history, 4 years ago, In English
My C++ template, incl. fancy colorized debug printouts My C++ template, incl. fancy colorized debug printouts ================== Use [this template](https://github.com/dcclyde/coding_puzzles/blob/master/templates/template.cpp) and you'll gain 350 rating right away! OK maybe not, but it has a bunch of cool features I built up while climbing from 1800 to 2150 in February-May of this year, and I bet some of them can be helpful to others too. Please, comment with feedback/suggestions/feature requests about how to make the template more useful :) #### Links * [Current template.cpp](https://github.com/dcclyde/coding_puzzles/blob/master/templates/template.cpp) &mdash; includes updates made after this blog was posted. This is the recommended version for most people. * [Minimal version with debug printouts only](https://github.com/dcclyde/coding_puzzles/blob/master/templates/dbg_demo.cpp) &mdash; Stripped-down version that compiles faster while still providing the `dbg()` setup, which is IMO the most novel and cool feature in the template....
My C++ template, incl. fancy colorized debug printouts

Full text and comments »

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

20.
By commandox, 7 months ago, In English
[UNMAINTAINED] [v1.0.1] OI-TED-ARCHIVE — Preserve OI resources before they disappear Goodluck for IOI2026, APIO2026 and Other OI2026. APIO2026, BOI2026, EGOI2026, COCI2026, USACO2026, NOISG2026 Uploaded to internet archive Future TODO 2026 - CEOI July 5-7, 2026 - EJOI July 24-30 2026 - IOI August 9-16, 2026 - JOI (todo) - IZHO (task possible only) OI 2026 Blog: https://codeforces.me/blog/entry/149727 --- # OI-TED-ARCHIVE **OI Tasks + Editorial + Testdata Archive (+ Graders & Results)** **Goal:** Preserve complete Olympiad in Informatics resources before they disappear. --- ## Current Status **Latest progress:** https://docs.google.com/spreadsheets/d/1XPHTMTUGaKrDvCvNyh6LWuWEddNSxwxJhEB2NlUezOI/edit?usp=sharing For Upcoming Problems, 2 Major release will be made each year. Expect First Update around July-Auguest. --- ## OI-TED-ARCHIVE LINKs > Check Sheet ["ARCHIVE"](https://docs.google.com/spreadsheets/d/1XPHTMTUGaKrDvCvNyh6LWuWEddNSxwxJhEB2NlUezOI/edit?gid=118823279#gid=118823279) for Detailed & Updated Archive Info > Ite...
*: currently active on web or preserved in wayback. > Google Hacking/Dorking is just afancy name for google, > Google Hacking/Dorking is just a fancy name for google advance search 🤣

Full text and comments »

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

21.
By gen, 14 years ago, translation, In English
Codeforces Round #165 Tutorial ### [problem:270A,Div II A — Fancy Fence] #### Problem The problem is to tell whether there exists a regular polygon with angle equal to $a$. #### Solution Consider all supplementary angles of the regular $n$-polygon with angle $a$, which are equal to $180^\circ-a$. Their sum is equal to $360^\circ$, because the polygon is convex. Then the following equality holds: $n\cdot(180-a) = 360$, which means that there is an answer if and only if $360\mod(180-a) \equiv 0$. ![ ](http://oi47.tinypic.com/qx1538.jpg) Time: $O(t)$. Memory: $O(1)$. Implementation: [C++](http://ideone.com/xnq9Iu), [Java](http://ideone.com/D2hHEL) #### Comments The problem can be also solved by rotating vector $(1,0)$ by angle $180^\circ-a$ until it returns in this position (but at most 360 times), and checking that only one full turn has been made (implementation example: C++). It is also a rare problem on Codeforces that contains just 1 sample test, 1 pretest and 1 full test. ### [proble...
### [problem:270A,Div II A — Fancy Fence]

Full text and comments »

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

22.
By Nathan4, history, 14 months ago, In English
This is what job hiring processes should be like _Story_: - Regularly scrolling through x. - Wondering which AI research guy Meta might poach next. <spoiler summary="Saw this post"> ![ ](https://i.ibb.co/Kx9C1Kt8/Screenshot-2025-07-08-at-11-22-41.png) </spoiler> At first sight, this just seemed like another hiring post to me. _But wait, that's an elegant graph! I should probably still click the link...what if it's about trees? :D_ And so I did. The link landed me on a [clean page](https://www.tilderesearch.com/challenges) with only one problem, and it is indeed a graph theory one. <spoiler summary="Screenshot"> ![ ](https://i.ibb.co/5W5PRKbL/Screenshot-2025-07-08-at-11-42-09.png) </spoiler> Here I am, typing the LaTeX down for you to enjoy the problem :) <spoiler summary="The Challenge Task"> For $n \geq 2$, define the graph $G_n$: - Vertices: Ordered pairs $(x, y)$ with $1 \leq x, y \leq n$ and $x \ne y$. - Edges: $(x_1, y_1) \sim (x_2, y_2)$ if $x_1 + y_1 = x_2 + y_2$ or $x_1 - y_1 = x_2 - y_2$. Defin...
we think, not on how fancy our resumes look. **This is what job hiring processes should be like, Here we were being evaluated based on how we think, not on how fancy our resumes look. **This is

Full text and comments »

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

23.
By bicsi, history, 5 years ago, In English
Cprep - preparing contests made easy Hello Codeforces! Some time during the past weeks I have been working on developing a tool for preparing contests (for Romanian NOI and programming camps), inspired by Polygon. It allows people to quickly and safely prepare problems for contests using a simple command line interface utility. It has support for generators, validators, close-to-TL warnings, and even stress-testing to maximize a given objective value (e.g., generate tests where the answer is as big as possible) or to fail a given solution. It also has some neat checks, like checking for duplicate tests, or checking if generator is deterministic for reproductibility. More features will be added in the future. I have already successfully prepared a couple of problems with it, and it worked flawlessly (for me, at least). Github: [https://github.com/bicsi/cprep](https://github.com/bicsi/cprep) ### Installation In order to install it, you just (hopefully) need to make sure you have python installed, and then...
. If you fancy extra features, let me know privately or in the comments below :)., If you fancy extra features, let me know privately or in the comments below :).

Full text and comments »

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

24.
By Geothermal, history, 7 years ago, In English
AtCoder Beginner Contest 150 English Solutions #A &mdash; 500 Yen Coins We are essentially asked whether $500K \geq X$. We can determine this using an if statement. If you'd like to be fancy, you can shorten your code using the ternary operator, printing $\texttt{500K >= X ? "Yes" : "No"}$. Runtime: $O(1)$. [Click here for my submission.](https://atcoder.jp/contests/abc150/submissions/9382642) --- #B &mdash; Count ABC There are several ways to do this. The first is to compute each three-letter substring of $S$, either through brute force or your language's substring computation function, then comparing them to "ABC". Another, which I implemented, is to simply iterate over each position in the string up to $N-3$, using zero-indexing, and check whether $S[i] = A$, $S[i+1] = B$, and $S[i+2] = C$. If so, we increment the answer. Either way, we can maintain a count of "ABC" substrings and return it at the end. (Of course, we theoretically could use a more complicated pattern matching algorithm, but because the str...
using an if statement. If you'd like to be fancy, you can shorten your code using the ternary, you'd like to be fancy, you can shorten your code using the ternary operator, printing $\texttt{500K

Full text and comments »

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

25.
By AlexLuchianov, 4 years ago, In English
[Tutorial] Sparse table The most common example when talking about sparse tables is the following problem: _"Given an array of $N$ integers, your task is to process $Q$ queries of the form: what is the minimum value in range $[a,b]$?"_ A brute-force approach would be to iterate over all of the elements of each query interval. This approach has $O(NQ)$ time complexity and is quite slow. One way to improve the time complexity would be to precompute the minimum value for various intervals and then use this information to speed up the queries. For what intervals should we precompute the minimum value? For a start, let's try precomputing it for all intervals of length $2$, $4$, $8$ and so on. More formally, let $rmq[h][i]$ be the minimum value on the interval $[i, i + 2^h - 1]$. One simple and efficient way to precompute this table is by observing that one interval whose length is a power of $2$ can be split into $2$ smaller intervals. This observation translates into the following recurrence relation:...
$ operation is an **idempotent** operation. This may sound complicated, however this is simply afancy math, fancy math term for an operation that can be applied multiple times without changing the result beyond

Full text and comments »

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

26.
By cricrazy_001, history, 7 months ago, In English
The Journey to Candidate Master: Plateaus, Faith, and Consistency I started **Competitive programming** in **August 2024**, at the beginning of my second year of college. My first few Div.2 contests were humbling — I could solve 1 problem, sometimes 2. In Div.3, solving 3 problems felt like a win. But what kept me going was not the rating, but the nature of the problems themselves. At the **800–1000 level**, it’s mostly about thinking — no fancy algorithms, no heavy data structures — just logic and clarity. **That fascinated me**, and I decided to stay. **---------------------------------------------------------------------------------------------------------------------------------------------------** The Phase Nobody Talks About ---------------------------- In the first four months, I climbed quickly and reached **1459** on **12 January 2025.** Then the graph stopped moving. For the next **110 Days**, I was **stuck below 1450**. I practiced. I gave contests. I did everything I had been doing before. But nothing showed. On...
the problems themselves. At the **800–1000 level**, it’s mostly about thinking — nofancy, At the **800–1000 level**, it’s mostly about thinking — no fancy algorithms, no heavy data

Full text and comments »

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

27.
By Spheniscine, history, 7 years ago, In English
Modular Arithmetic for Beginners Introduction ------------------ If you're new to the world of competitive programming, you may have noticed that some tasks, typically combinatorial and probability tasks, have this funny habit of asking you to calculate a huge number, then tell you that "because this number can be huge, please output it modulo $10^9 + 7$". Like, it's not enough that they ask you to calculate a number they know will overflow basic integer data types, but now you need to apply the modulo operation after that? Even worse are those that say you need to calculate a fraction $\frac pq$ and ask you to output $r$ where $r \cdot q \equiv p \pmod m$... not only do you have to calculate a fraction with huge numbers, how in the *world* are you going to find $r$? Actually, the modulo is there to make the calculation *easier*, not *harder*. This may sound counterintuitive, but once you know how modular arithmetic works, you'll see why too. Soon you'll be solving these problems like second nature. Terminol...
just a fancy term from abstract algebra theory for a set with the four basic operators (addition, fancy term from abstract algebra theory for a set with the four basic operators (addition

Full text and comments »

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

28.
By upobir, 7 years ago, In English
Fast Walsh Hadamard Transforms and it's inner workings One of my favorite algorithms out there is FWHT, but sadly there are not many tutorials about it. So here's a simple attempt by me (feedback is appreciate). **Note:** I will be explaining FWHT via DFT/FFT and as such good understanding of theory behind DFT/FFT is **required**. Also, I won't be going into Hadamard matrices, since I don't know much about them myself. What is FWHT? Suppose you have two sets $ (1, 2, 2) $ and $(3, 4, 5)$ and want to perform all possible xor operations between these two sets, the resulting set being $(1, 1, 2, 4, 5, 6, 6, 7, 7)$. This is commonly called xor convolution. Naively you'd do this in $O(n^2)$ time, where $n=2^k$, $k$ = maximum number of bits (you maintain a frequency count for each possible value and loop on all possible pair). FWHT let's you do this in $O(n\log n)$ time via some <strike>black magic</strike> FFT tricks. We first build the frequency arrays upto $n=2^k$, apply FWHT to turn them into some mysterious point-value form, perform ...
the $x^2$ term back to constants). So FWHT is now just a fancy FFT, huzzah!, fancy FFT, huzzah! Of course we don't need to do actual FFT algorithm for the variables, a

Full text and comments »

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

29.
By kamilszymczak1, history, 4 years ago, In English
[Tutorial] Euler's phi function, its properties, and how to compute it Hello codeforces! In one of the recent contests there appeared [a problem](https://codeforces.me/problemset/problem/1717/E) which involved Euler's phi function, and I figured I could write a bit about this function here. First, I will briefly introduce Euler's phi function, talk about two of its properties, and give you proofs of both of them. Ultimately, it will lead us to a way to compute the value of this function for some given integer $n$ with reasonable time complexity. [cut] <br> I tried to keep this post quite basic, so that it's accessible to everyone. Therefore, if you are already quite good at some topic mentioned here, feel free to skip a section or two. Also, I would like to say thank you to my friend, [user:sysia,2022-09-11], who helped me a lot with writing this post and suppressed my tendency to write too much. <br> ### What is Euler's phi function? Euler's phi function (which may be also called Euler's totient function) is a function that g...
more fancy and use [Pollard's rho algorithm](https://cp-algorithms.com/algebra/factorization.html, })$ algorithm or, if you want to deal with really large numbers, you can get morefancy and use

Full text and comments »

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

30.
By Maksim1744, 6 years ago, In English
Unofficial editorial for Codeforces Round #230 (just a little bit late) Yesterday I saw [this](https://codeforces.me/blog/entry/83811) blog and thought that one bad editorial is better than zero good ones, right? So, enjoy it! Here are links to contests: [Div. 1](https://codeforces.me/contest/392), [Div. 2](https://codeforces.me/contest/393) Div2A <spoiler summary="Editorial"> ### [problem:393A] Looking at examples and thinking about different cases lead to the idea that the best result would be to build a string which starts with $nineteenineteenineteen...$. The first word $nineteen$ requires 3 letters $n$, 3 letters $e$, 1 letter $i$ and 1 letter $t$. Every next occurrence of $nineteen$ requires the same set of letters, but we need only two letters $n$ for each new word. In other words, we can start with $n$, and then every word will need exactly two extra $n$-s. Let $cnt[c]$ denote the number of characters $c$ in the string. Then the answer is $min\left(\left\lfloor\frac{cnt[n] - 1}{2}\right\rfloor, \,\left\lfloor\frac{cnt[e]}{3}\right\r...
already counted (or I can say a fancy word _memoization_, which means the same thing), just store every value which we already counted (or I can say a fancy word _memoization_, which

Full text and comments »

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

31.
By UnexpectedValue, 18 months ago, In English
[Tutorial] A New Perspective on Numbers and Operators: Introducing Group Theory We often start our mathematical journey with counting, primes, and basic arithmetic. Then we encounter modular arithmetic, with its intriguing properties and theorems like Euclid's algorithm and the Chinese Remainder Theorem. But what if there's a deeper, more abstract framework that ties all these concepts together? You might have encountered hints that group theory is behind some clever algorithms and data structures ([like this comment suggests](https://codeforces.me/blog/entry/103174?#comment-915676)). But if you've tried to learn about it, you might have found resources that felt either too abstract and disconnected from your existing knowledge ([for instance](https://zhtluo.com/cp/from-burnside-to-polya-a-short-introduction-to-group-theory.html)), or too intimidating and complex ([like this one](https://codeforces.me/blog/entry/91731)). This blog aims to bridge that gap. We'll start with familiar ground in discrete math and modular arithmetic, and then progressively in...
explore fancy [Mobius](https://codeforces.me/blog/entry/53925) functions, [Sieve and Multiplicative, - Now you can go on a journey to explore fancy [Mobius](https://codeforces.me/blog/entry/53925

Full text and comments »

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

32.
By Nickolas, 6 years ago, translation, In English
April Fools Day Contest 2020: editorial _This was the most well-attended April Fools Day Contest in the whole history of them: 10343 participants solved at least one problem! It was also fairly well-balanced: while each problem has been solved by at least 200 participants, only 17 of them solved all 8 problems._ ##[problem:1331A] This was the consolation problem of the contest, and still a lot of participants asked me for hints on this problem &mdash; some even before the beginning of the round! If you're still not sure how to solve it, the contest announcement itself promised that the contest is not rated, so the answer is a resolute ``NO'' (case insensitive, quotes for clarity only) :-) ##[problem:1331B] Unusually for this type of contests, the second problem had an actual problem statement! The real task was hidden in it using Steganography 101 &mdash; the first letters of the lines spelled out "TWO FACTORS". [cut] A quick look at the examples confirmed that you needed to factor the given number and print ...
fairly approachable language — as long as you don't try anything fancy like arrays!, long as you don't try anything fancy like arrays!

Full text and comments »

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

33.
By willy108, history, 5 years ago, In English
[Tutorial] a few strange lca algorithms with a few strange time complexities pt 2 revised disclaimer: yet again i do not pretend to claim that this algorithm is useful. bin lifting is probably better in all aspects. ====================================================================================== intro ================== if you havent alr, consider reading [this](https://codeforces.me/blog/entry/88758) since most of my terminology will be from there. cube root decomp ================== before i start, this algorithm is entirely useless. bin lifting has both a shorter impl and it has a better time complexity. but being able to understand this algorithm will help with the generalized algorithm later in this article. so i first came up with this idea when i doing the [CSES Distance Queries](https://cses.fi/problemset/task/1135) with my sqrt lca and it tle'd. so what i was thinking was "why on earth is sqrt lca so slow", then it hit me, sqrt per query is horrible (and i should learn bin lifting, but i would rather brainstorm useless algs like this inst...
defining of terms: CUBE is a constant such that CUBE^3 >= n and CUBE is minimal (afancy way of saying, CUBE is a constant such that CUBE^3 >= n and CUBE is minimal (a fancy way of saying the cube root

Full text and comments »

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

34.
By polyhistor13, 13 months ago, In English
Using Lambda's for CP First of all, for whom this blog is (Ideally). -> Someone interested in learning and at least have a good knowledge of programming in c++. -> Want's to increase speed and code cleaner. Regardless everyone is Welcome!!!! What is Lambda? ------------------ Well lambda are so called **anonymous functions** which can sometimes really help for **faster coding** and **ease of writing**. ### Basic structure of Lambda First let's see how does a **lambda** look like, " [] () {} ; ". The first part, " [] " The **Capture Clause**: This is the **most powerful** part of a lambda. It defines what the lambda can "see" from its surrounding scope. -> []: Captures _nothing_. The lambda can only use its own parameters or global variables. -> [=]: Captures all _outside variables by value_ (makes a copy). -> [&]: Captures all _outside variables by reference_ (can modify the originals if '**const**' not used). -> [var1, &var2]: Captures var1 by value and var2...
can perform recursion, but if you don't need something this fancy (i.e **recursion**), we can just, this can perform recursion, but if you don't need something this fancy (i.e **recursion**), we can

Full text and comments »

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

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

Full text and comments »

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

36.
By rulerofcakes, history, 18 months ago, In English
My honest journey to Master in 4 years Hi all, this is my first blog on codeforces. I've just reached Master(+2100) after spending about 4 years on codeforces, and I'd like to talk about what I like and regret about my past decisions regarding practicing for this milestone. I know plenty of GM+s have written such blogs, but I think many of you(like my past self) may find these unrelatable simply because of how good they were from the beginning / how much time they have spent / etc, so I decided to write one of my own humble version. Hopefully some of you may find this helpful for your own journey. I honestly think it's possible to reach Master level proficiency in around 2 years, even if you're starting from scratch, assuming you practice hard enough with the right materials. This is based on my own experience. I say proficiency and not reaching the rating itself because I think having high codeforces rating may become even more meaningless in the near future with LLMs. ### The Beginning Like many of you all, I'm j...

Full text and comments »

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

37.
By Nickolas, 5 years ago, In English
April Fools Day Contest 2021: editorial ##[problem:1505A] This problem described the task in quite a lot of detail. The main challenge was that it was interactive, so some effort was required to figure out the right sequence of reading from standard input, writing the answer and checking for end of file. Here is the code in Python: ```python while True: try: q = input() except EOFError: break print("no", flush=True) ``` ##[problem:1505B] As the problem statement strongly hinted, in this problem you had to calculate the **digital** root of the given number. The digital root of a given number is the (single digit) value obtained by an iterative process of summing digits, on each iteration using the result from the previous iteration to compute a digit sum. The process continues until a single-digit number is reached. ##[problem:1505C] YES or NO answer implies that you need to figure out whether the given word is a Fibonacci word. Similarly to the Fibonacci-style integer s...
of sense, but you know how it is when you're trying to remember a fancy -sounding word and come up, these options makes a lot of sense, but you know how it is when you're trying to remember afancy

Full text and comments »

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

38.
By MohammadParsaElahimanesh, history, 13 months ago, In English
Geometry Tricks for a 5‑Year‑Old #### Hey everyone! Geometry problems can seem a bit intimidating at first $-$ with all the floating-point errors, tricky trigonometric functions, and things like dot and cross products. But don’t worry! In this short blog, I’ll show you a simple and reliable way to handle many geometry challenges using just basic integer math. No fancy templates or advanced techniques needed $-$ just a clean, straightforward approach that makes these problems much easier to manage. #### Quick review on functions: - `area2(A,B,C)`: Twice the area of triangle ABC. Equals 0 if A, B, and C are collinear. It's the basis of other functions. - `area2(P)`: Twice the area of polygon P calculated by summing triangle areas. - `in(p,P)`: Checks if point p lies inside polygon P. Compares polygon area with the sum of triangles formed with p. - `dis2(A,B)`: Squared distance between points A and B, useful for length comparisons without the square root. - `dis(l,o)`: Distance between point o and line l. Us...
challenges using just basic integer math. No fancy templates or advanced techniques needed $-$ just a clean, integer math. No fancy templates or advanced techniques needed $-$ just a clean, straightforward

Full text and comments »

39.
By zenolus, history, 6 years ago, In English
UpSolve.me - Backend and updates ![ ](https://codeforces.me/predownloaded/da/7f/da7fa93e4a23ba936e2171443a2d2e0333c27a4f.png) Hello, Codeforces community! Before going into the details, I would like to give a huge thanks to the community for the interest and support. I'm really awestruck to see over a thousand user handles having been entered in the web app in just barely 30 hours. (At the time of writing this blog.) If you haven't gone through the previous blog, [here it is](https://codeforces.me/blog/entry/79151). ![ ](https://i.gyazo.com/c33bfcd6517945d12247d029914838a2.png) There were some issues when I first made it live. I am sorry for that. I am no expert in the backend, so you guys had to face a lot of initial downtimes. Although I've applied a temporary fix, there's still work to be done. Keeping that aside, I would like to thank inputs from [user:manish_joshi,2020-06-23], [user:arthurg,2020-06-23], [user:RestingRajarshi,2020-06-23], [user:-is-this-fft-,2020-06-23] and everyone who checked it ou...
over a fancy UI. I was thinking, why not? I can retain all the functionality and make a side page

Full text and comments »

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

40.
By MrMoon, 5 weeks ago, In English
PSUT JCPC Qualification 2026 Tutorial Hints are mostly related, so you have to think and get some observations before understanding the next, make sure to understand the code before you submit it as well, "Most problems in life are due two reasons: act without thinking, think without acting" ~the,2026-08-02 poet,2026-08-01 Big thank you to the testers for improving this problem set beyond what it was, [user:the_seal,2026-08-02] , [user:Rayo,2026-08-02], [user:samsoom,2026-08-02], [user:lazlooz,2026-08-02] The contest exist in the group so make sure to join https://codeforces.me/group/ppRciMeJFg Some of these problems were inspired from other problems across the internet, "If I have seen further, it is by standing on the shoulders of giants." ~the,2026-08-02 poet [Problem A: MrMoon creates Lucky Number Seven Command](https://codeforces.me/group/ppRciMeJFg/contest/707652/problem/A) ================== ### 7 [Problem B: Moon creates seal backflips](https://codeforces.me/group/ppRciMeJFg/contest/707652/probl...
and matches capped at $100$, avoid overthinking. You don't need a fancy mathematical shortcut or a, overthinking. You don't need a fancy mathematical shortcut or a complex data structure. What is the most

Full text and comments »

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

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

Full text and comments »

42.
By nika-skybytska, history, 5 years ago, In English
Data Structures in Dynamic Programming Week [![thumbnail](/predownloaded/74/3c/743c38e2e9b8f1cfeacd9ab44f5cce581dc2d0ed.png)](https://youtu.be/Aaceu-Z0abc) (click on the thumbnail to watch a YouTube video) Welcome back to what I called "ds in dp week", and you'll see in a second what this is all about. But first I wanted to share some stats with you: ### Contests This week I took part in 7 contests. Four of them are rated for me, and in the remaining three, I participated unofficially. I took second place in the Hacker Earth's Easy competition, got on the first standings page of LeetCode Biweekly Contest 69, and had my best TopCoder performance so far, which saw 164 points rating increase. Codeforces' Hello 2022 didn't go so well, with me managing to solve only A-D. Luckily I only got -15, a surprisingly forgiving rating change for an underperformance. The remaining three competitions were unrated for me, so I didn't pay much attention to them. It partially explains my questionable results on CodeChef Start...
/submissions/28442072) 3. Finally, we have a [fancy problem H (Ex) from the same contest](https, 3. Finally, we have a [fancy problem H (Ex) from the same contest](https://atcoder.jp/contests

Full text and comments »

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

43.
By skavurskaa, history, 10 years ago, In English
Shortest Path Modelling Tutorial Shortest path problems are really common. There are uncountable problems that can be reduced to some shortest path problem on graph. In this post i will show some different problems that require some extra thinking because they are not the usual shortest path problems (there are additional constraints to the problem). For most high rated coders this is still common stuff but i hope i can help some newcomers out there. About Graph Modelling ------------------ Sometimes we face a problem that asks us to find some shortest path in a graph, but there are additional constraints to the problem. If we are not used to this kind of problem, we may come up with the idea of changing Dijkstra's algorithm so it will work in the specified problem. But usually this will not work. Instead, we must change our graph so that the traditional shortest path algorithm will solve the problem with added constraints. This is called graph modelling. State Graphs ------------------ What we want to b...
that you might not know: if you look at the code i don't do any fancy conditionals to go from an, Another cool trick that you might not know: if you look at the code i don't do anyfancy

Full text and comments »

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

44.
By Marzouk, history, 7 months ago, In English
Knapsack Optimizations ok so first of all I am doing this mostly to deepen my understanding and I might not have understood something so correct me if I am wrong We all know the famous knapsack problem but just to be sure ### Problem Statement given $N$ items each with a cost and value/gain, you have a bag with capacity $W$, what's the maximum value you can fit in that bag it's a standard dynamic programming problem I would assume you know how do it with 1 dimensional dp ### subset sums ### optimizing with bitsets first optimization, say you have $N$ items with values and you want to check whether there exists a subset which sum up to $S$ ~~~~~ ll sum = 0; for (ll x : vals) sum += x; vector<ll> dp(sum+1, 0); dp[0] = 1; for (ll i = 0; i < n; i++) { for (ll j = sum; j >= vals[i]; j--) { if (dp[j-vals[i]]) dp[j] = 1; } } ~~~~~ this would be the first code that comes to mind which runs in $O(N \cdot sums)$ and most of the time this would be enough, but it can be optimized a li...
-= take; } } ~~~~~ really nothing fancy we are just doing the splitting and the knapsack together, ; } } ~~~~~ really nothing fancy we are just doing the splitting and the knapsack together instead of

Full text and comments »

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

45.
By simonlindholm, history, 9 years ago, In English
Open sourcing KTH's Team Reference Document We just made KTH's ICPC team reference document [open source](https://github.com/kth-competitive-programming/kactl). It contains a few nice things that I haven't seen elsewhere: - Ergonomic API's for [SCC](https://github.com/kth-competitive-programming/kactl/blob/master/content/graph/SCC.h), [biconnected components](https://github.com/kth-competitive-programming/kactl/blob/master/content/graph/BiconnectedComponents.h), [2-SAT](https://github.com/kth-competitive-programming/kactl/blob/master/content/graph/2sat.h), [angle sweepings](https://github.com/kth-competitive-programming/kactl/blob/master/content/geometry/Angle.h), and [monotone function partitioning](https://github.com/kth-competitive-programming/kactl/blob/master/content/various/ConstantIntervals.h). - I don't recall seeing [tridiagonal linear equation solving](https://github.com/kth-competitive-programming/kactl/blob/master/content/numerical/Tridiagonal.h) or [tree compression](https://github.com/kth-competitive-programmi...
code with tight loops. - Fancy-looking 3-column layout!, loops. - Fancy-looking 3-column layout! For people with archaeological interest, we also have [our

Full text and comments »

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

46.
By Rubanenko, 11 years ago, In English
Overview of the Moscow International Workshop @MIPT Recently I returned from the Workshop and wanna share my impressions. The post will be divided into several parts depending on an aspect I am covering in it. [cut] <be/> ####**Place**<br/> The Workshop is held entirely in MIPT: contestants live in MIPT dorm and have the trainings&lectures at MIPT study buildings. The most distant points in this system are at most five minutes from each other and it was really nice, since one shouldn't care about getting up 30 minutes earlier in order to come to the contest in time. <br/> In CIS the word "dorm" itself is quite scary, because almost everybody has a vivid experience of coming to some competition to some city called N-vodsk and living in cold, stinky dorm with no water or something like this. However, all the contestants were settled in a new dorm, which was pretty nice and comfortable as for a dorm. I had four guys, including me, living in a two-rooms flat with kitchen and bath.<br/> Canteen... Well, as for CIS, it was OK, b...
is quite fancy and I guess most people would like it. After the excursion we had lunch at a cafe, . Afterwards we could play board games and have an excursion over Yandex HQ. The office is quitefancy and I

Full text and comments »

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

47.
By VeniVidiVici, 12 years ago, In English
Why do users make multiple accounts? I will attempt to explain why I think people do this, and hopefully start a serious examination of how to deal with the problem... ~~~~~ struct Warning{ long long story; }; ~~~~~ Label: Meet Bob. Bob has always been a pretty bright individual. Deciding that he should use his intelligence for good, Bob decided to put his skills to the test. As Bob knows, people use computers for programming. Because Bob owns a computer, he figures he must be a programmer as well. So Bob decided he was going to create the best game ever &mdash; one that would inspire a generation of children to waste their lives chasing pixels &mdash; solely with the power of his mind. Absolutely sure of how to continue, Bob promptly opened up the command prompt. This made sense to Bob because he once saw a monospaced screen in a movie where some dude hacked the government in 90 seconds. He proceeded to type in his masterpiece: ~~~~~ open a new window make the background look like trees put a guy w...
horns with tourist and Petr and all these other guys with fancy red names. This made sense to Bob, ready to lock horns with tourist and Petr and all these other guys with fancy red names. This made

Full text and comments »

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

48.
By Nickolas, 12 years ago, translation, In English
Problemsetter's Memoir Preparing a contest is not as popular a topic as the perennial question of "how to become red in three months", but still it stirs some interest in Codeforces community now and then. Earlier I've written about [preparing Surprise Language Round](http://codeforces.me/blog/entry/4290) and about [emotional aspect of problemsetting](http://codeforces.me/blog/entry/3857); now it's time to share some facts about running regular contests. ### Problems > How much time does it take to prepare, select, recall or find problem ideas? > How much experience solving competitive programming problems is necessary to be confident about inventing problems of your own? Idea generation is a long-term, nearly continuous process. A couple of years ago when I was still an active problemsetter I used to create ideas from literally everything (a squirrel running... hey, this could be a great problem! &mdash; seriously, the problem is still there in my drafts, and a pretty comp...
characters — no fancy restrictions) take at least an hour from creating the problem in Polygon to, or a string of certain characters — no fancy restrictions) take at least an hour from creating

Full text and comments »

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

49.
By sslotin, 6 years ago, In English
7x faster drop-in replacement for std::lower_bound http://algorithmica.org/en/b-tree Hi, it's me again. A couple of days ago I [published](https://codeforces.me/blog/entry/75421) a post about speeding up binary search by rearranging memory in a way that allows prefetching, which is basically a way of trading off memory bandwidth for latency. As noted in the comments, it had a noisy neighbors issue when tested on online judges, as different solutions evaluating on the same machine could compete for the same memory bandwidth. The speedup was like 2x-3x (and very volatile) on Codeforces while on my laptop and my dedicated server it was 4-5x, depending on the array sizes. And so I rewrited it using B-tree layout instead, and it worked, because it bluntly requires 4x less memory reads. It is still quite volatile on CF—compare [this](https://codeforces.me/contest/1327/submission/75228901) (6.6x) and [this](https://codeforces.me/contest/1327/submission/75232948) (5.1x)—but I've never seen it drop below 3x on adequate array sizing ...
implementations: 1. One is straightforward and uses nothing fancy 2. The other is compute, 1. One is straightforward and uses nothing fancy 2. The other is compute-optimized with AVX2

Full text and comments »

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

50.
By ParsaF, history, 3 years ago, In English
CodeForces Contest registering suggestion Hello CodeForces! I wanted to suggest a new registering policies/rules. Let's take a look at AtCoder, a competitive programming website that we all know and love. When you want to register for a contest, you have two options. The first one is Rated register and the second one Unrated register, You can't change these options at the middle of the contest. If you choose the Rated register option, then if you don't even participate in the contest, you will still be in the standing and have impact on other people's performance and rating changes. If you choose the Unrated register option, you can take part in the contest but your or other people's rating will not be affected at all. It's like doing a virtual contest. But in CodeForces we don't have any of these fancy options. Instead if the contest is rated for you, you have the option to just leave after reading some problems. But in AtCoder you are forced to participate in the contest no matter what. Now in today'...
all. It's like doing a virtual contest. But in CodeForces we don't have any of thesefancy options, But in CodeForces we don't have any of these fancy options. Instead if the contest is rated for you

Full text and comments »

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

51.
By bharsi, history, 10 years ago, In English
That statement in every contest announcement Everyone contest writer writes "thanks to [user:MikeMirzayanov,2016-08-15] for great Codeforces and Polygon platforms" in the contest announcement blog. At the onset it might look like [user:MikeMirzayanov,2016-08-15] runs a tight ship and people have to kiss his ass to continue writing contests! But as one spends more time on the platform, they will start appreciating the differencing factors of Codeforces. Though I don't know much about Polygon, I wanted to thank [user:MikeMirzayanov,2016-08-15] for Codeforces platform and thought I'll take some time to write why. In my opinion, here are the key things which makes Codeforces platform exceptional. 1. Ability to filter all the successful submissions for a problem (during and outside of contest) and ability to sort it by 'execution time' or 'submission time'. Sorting it by execution time helps analyze optimization techniques and sorting it by submission time helps to see what are the approach of quick solvers. 2. Ability to ...
. Simple text based pages. There are not many fancy buttons, images and animations on the web page

Full text and comments »

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

52.
By rising_sea, history, 6 years ago, In English
"Tricks" I learned while practicing Disclaimer: I personally don't find learning tricks to be all that interesting, not responsible for any rating drops LOLOLOL, also I'm a bit lazy so there are prob mistakes in here #### Translate (AKA immediate implementation problem) 1. The problem is obvious that it should just be some data structures e.g. Segment tree [problem:474F] 2. Just DP, e.g. [problem:489F] #### Converting from brute force 1. Sometimes it just works ??? this works especially well if you notice the input is extremely small 2. Meet in the middle to be square root smaller [problem: 525E], [problem: 1006F] 3. Backtracking to prune states 4. Memoization (this is just dp lol) #### Look at something in a new way 1. Remove what seems to be impossible, NO it’s not cause you don’t know some fancy technique, just try you best to convert the impossibility into something familiar!! 2. ROOT THE TREE, probably a third of random tree problems on cf can be solved with this, it’s pretty powerful, eithe...
don’t know some fancy technique, just try you best to convert the impossibility into something, something in a new way 1. Remove what seems to be impossible, NO it’s not cause you don’t know somefancy

Full text and comments »

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

53.
By UnemployedProgrammer, history, 5 months ago, In English
New updates to my CF duel app (chat + some changes) ## **New updates to my CF duel app (chat + some changes)** **Use it here:** [https://cf-1v1.vercel.app/dashboard](https://cf-1v1.vercel.app/dashboard) A small web app where you can do **1v1 duels with other CF users**. You can also **duel with friends** and even do **team battles using codes**. Built mainly to make practice a bit more interactive. I’ve been working on my duel app for a while and pushed a few updates recently. ### **Global chat** Added a simple global chat. Idea was just to make it easier to find people to duel instead of waiting or pinging randomly. You can: * talk to others * ask for duels * discuss problems (or anything tbh) Not super fancy, but works fine for now. --- ### **Routing change** Earlier it was more like a single page setup, now moved to proper routing. **Main reason:** * in SPA, when users swipe back, the whole site was getting closed * this was pretty annoying during usage Now navigation behaves more norma...
can: * talk to others * ask for duels * discuss problems (or anything tbh) Not superfancy, Not super fancy, but works fine for now.

Full text and comments »

54.
By Nickolas, 14 years ago, translation, In English
Programming contests and programming languages (in problems) A couple of days ago I wondered how many authors (except for me) write problems about programming languages. I was hoping to be not alone in my passion to this topic; but the reality exceeded all expectations. Of course, problems which feature programming languages are much scarcer than ones about computers, processors, microchips, parallel computing, databases and other IT things, but still much more frequent than ones about, say, dragons :-) #### 1. TopCoder #### The early years of TopCoder presented the participants with several programming-languages-featuring problems. [cut] Most of them (7/9) are pretty similar: given the source code written in C- or Pascal-like language, analyze it and report the result. | Problem | Task | |--|--| | [QuiningTopCoder](http://community.topcoder.com/stat?c=problem_statement&pm=1764) | Write an interpreter for Unefunge | | [ScriptLanguage](http://community.topcoder.com/stat?c=problem_statement&pm=1956) | Given source code in Visual...
for the last one) has a fancy problem featuring a programming language of some kind, either in the, , except for the last one) has a fancy problem featuring a programming language of some kind, either

Full text and comments »

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

55.
By Edvard, 14 years ago, In Russian
Вопросы по LaTeX Всем доброго времени суток! Сегодня достаточно долго возился с этой прекрасной системой верстки. Очень много гуглил, прочитал много интересного, но на несколько вопросов так и не смог найти ответы. Пишу их сюда в надежде, что кто-нибудь разбирающийся в LaTeX подскажет как правильно поступить. 1. При включении русского языка текст становится ужасно расплывчато-прозрачным и его совсем не видно (в сети вроде пишут про pscyr, но я его так и не смог установить его и не очень уверен, что он поможет). 2. С помощью библиотечки geometry я поставил пейзажный вид и кастомные отступы и теперь у меня съехал верхний колонтитул вправо (текст должен быть именно с таким отступом как сейчас). Как его подвинуть влево? 3. Хочется как-нибудь поставить поменьше отступ от колонтитула до текста. Выглядит это так: ![ ](http://img-fotki.yandex.ru/get/5645/43247443.0/0_a7946_477b2193_XL) ~~~~~ Вот весь исходник: \documentclass[12pt]{article} \usepackage[russian,english]{babel} \u...
\usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \fancyhead[L]{Left} \fancyhead[R]{Right, {fancyhdr} \pagestyle{fancy} \fancyhf{} \fancyhead[L]{Left} \fancyhead[R]{Right} \fancyheadoffset

Full text and comments »

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

56.
By pooty, history, 3 years ago, In English
Finally hit red! Since starting competitive programming on Nov 2020 (before that I just did the standard DS/A CS class in uni), I finally hit red after [contest:1819]! It has been a long 2.5 years. I actually hit orange pretty fast, but then orange to red seemed impossible. After doing CF for a while, I realized the trick to gaining rating is to solve "easy" problems fast. My most difficult solve in rated contests is only 2600 (and it only happened once), the rest are mostly <= 2300. However, I realized as long as you can solve <= 2300 fast and consistent enough, it's enough to hit/touch red. Also, questions at that rating don't require any fancy stuff/algorithm, and have at most 1-2 observations required. Thus, if the solution seemed to use fancy algos, its probably not intended. Actually, my main goal is to attend ICPC WF (I have one final chance before graduating), which is quite difficult because of the many IGMs in my school...
enough to hit/touch red. Also, questions at that rating don't require any fancy stuff/algorithm, , questions at that rating don't require any fancy stuff/algorithm, and have at most 1-2 observations

Full text and comments »

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

57.
By WillTheBill, history, 4 years ago, In English
What If... Virtual Contests were REAL? [cfscripts] Hey everyone! ![The What If? script simulating official/unofficial/virtual contest rating changes](/predownloaded/28/05/28056eb2c40af0aa2512903ba3270957cb6ad3f1.png) With inspiration from * the great [research](https://codeforces.me/blog/entry/86596) by [user:galen_colin,2022-06-25]. * [user:MiuraMiuMiu,2022-06-25]'s [Codeforces Anytime](https://codeforces.me/blog/entry/83122). * ... and of course the various Codeforces performance predictors! I proudly present **cfscripts**. *cfscripts* is a collection of scripts for Codeforces that uses the [cf-API](https://codeforces.me/apiHelp) to do different things. For instance, *cfscripts* includes a script named **What If?** (yes, very fancy), which allows you to **simulate Codeforces contest rating changes** over time, but **including virtual and unofficial contests**. You can choose to include only positive rating changes (this feature is dedicated to [user:galen_colin,2022-06-25]).<br/> &nbsp;&nbsp;&nbsp;You may ask: *...
?** (yes, very fancy), which allows you to **simulate Codeforces contest rating changes** over time, but, For instance, *cfscripts* includes a script named **What If?** (yes, very fancy ), which allows you

Full text and comments »

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

58.
By ADJA, history, 6 years ago, In English
Unofficial AtCoder Translations on GitHub Hello, hope you all are well and doing fine! Recently, I've been solving some old AtCoder problems that are only available in Japanese (with Google Translate and a lot of guessing). Problems are really nice, so I decided to put short English translations of them on GitHub. Nothing fancy, just several sentences describing the core part of each problem. There are 10 translated problems so far: [https://github.com/ADJA/AtCoderTranslations](https://github.com/ADJA/AtCoderTranslations#contribute) (current problems are in the 2100–2400 difficulty range) #### Contribute? **How you can help**: There are ~382 untranslated problems from the early AtCoder Beginner and Regular contests left, so I encourage you all to contribute! No Japanese required. It takes about 5-10 minutes for each problem (please solve the problem first if you don't speak Japanese), and can be done right from the GitHub web interface. Please see contributing section in the README for more information: ...
really nice, so I decided to put short English translations of them on GitHub. Nothingfancy, just, translations of them on GitHub. Nothing fancy, just several sentences describing the core part of each

Full text and comments »

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

59.
By Marinush, history, 4 years ago, In English
How to become Master. I see a lot of newbies trying to get better at cp. But working hard isn't enough. You need to have a goal in mind and follow it till the end (like becoming X till Y). Here I am gonna give some tips on how to become master. #### Participate in contests For master you need rating. To get rating you have to participate in contests. Nothing more needed to be said. #### Solve problems To get a good place in a contest, you have to solve problems. So, obviously, try to solve as many problems as you can. You might say that me saying this is useless and idiotic, but I disagree! I see a lot of people that give up after solving a certain amount of problems, but don't be like those people. They will never achieve anything meaningful in life. #### Have the correct mindset. Competitive programming is just as much about programming as it is about having a good mindset. It's all about competing, so you have to be in the right state of mind. You might ask me what it is, but I can'...
little harder like Divide and Conquer and Alien's Trick. If you wanna get fancy , you may want to study, fancy, you may want to study Rudy's Trick (Rudy's trick is not a DP optimization but it is an

Full text and comments »

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

60.
By usernameson, history, 8 years ago, In English
My 2018 Codejam adventure Introduction ------------------ This is the story of how I failed to qualify for round 2 to in the 2018 Google Codejam. Hopefully you find it interesting and learn some things you shouldn't do in Codejam. Qualification Round ------------------ Qualification was fairly easy due to the ample time of 24 hours. I managed to solve everything correctly apart from the large dataset for the last question. I tried to see if anyone had done mathematical analysis of Madison Cube garden from Futuruma since that seemed closely related to the last question but to no avail. Round 1A ------------------ The ideas to solve questions just did not come to me during this round. I only managed to solve the small set for question A. What I learnt: Eat a good breakfast before doing a competition in the morning. Round 1B ------------------ I looked at question A and could not think of a correct approach. Then I looked at B and decided to work on it since it seemed simpler. I saw a th...
considered using a prefix tree to be fancy and ensure a sufficiently low time complexity but my, thought. I considered using a prefix tree to be fancy and ensure a sufficiently low time complexity but

Full text and comments »

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

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

Full text and comments »

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

62.
By steveonalex, 3 years ago, In English
[Tutorial] Divide and Conquer Offline Query — A Niche Way to solve Static Range Query <br> Hi guys, this is my first blog on Codeforces. So if there were any mistakes or suggestions, feel free to correct me down in the comment section. Anyway, I discovered a nice way to solve static range query problems using "Divide and conquer", and I'm eager to share it with you guys. <p> Pre-requisites: <br> &bull; Prefix Sum. <h2>Problem 1:</h2> Given an array $A$ of $N (N \leq 10^{5})$ integers, your task is to answer $q (q \leq 10^{5})$ queries in the form: what is the minimum value in the range $[l, r]$? <p>For now, let's forget about Segment Tree, Square Decomposition, Sparse Table and such. There's a simple way to solve this problem without any use of these fancy data structure. <p> First, let's start with $L_{0} = 1$, $R_{0} = n$, and $M_{0} = \left\lfloor { \frac{L_{0} + R_{0}}{2} } \right\rfloor$. Let's just assume that every query satisfy $L_{0} \leq l \leq M_{0} < r \leq R_{0}$. We maintain two prefix sum arrays: <br> &bull; $X[i] = min(A[i], A[i+1], ..., A[M_{0...
Table and such. There's a simple way to solve this problem without any use of thesefancy data, to solve this problem without any use of these fancy data structure. First, let's start with

Full text and comments »

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

63.
By I_love_Hoang_Yen, 12 years ago, In English
Yet another blog post about cin vs scanf Hi, Today I tried to solve [problem:286C], which required to read & print $10^6$ ints. There are already many blog posts that compares performance of cin, cout (with `ios::sync_with_stdio(false)` of course) vs printf, scanf. And the test results shown that for ints, cin and cout are equally fast (and sometimes even faster) than scanf, printf. But my submissions do not agree: - scanf + printf: [submission:9881086] --> AC 966ms - scanf + cout: [submission:9881146] --> AC 1434ms - cin + printf: [submission:9881138] --> AC 1684ms - cin + cout: [submission:9882075] --> TLE Note: I used `cout << endl;` in my submissions, but it prints endl only twice, so that should not be a problem here. As you can see, except from input/output, my code is exactly the same. Am I doing anything wrong here? **UPD**: I found another problem that cin/cout failed: - My submission with cin/cout: [submission:9919391] - A previously accepted code that use cin/cout but now got TLE: [submissi...
doesn't use anything fancy, and also the printf/scanf version passed system test in 436ms (time limit, updated...", but the code doesn't use anything fancy, and also the printf/scanf version passed system

Full text and comments »

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

64.
By RodionGork, history, 3 years ago, In English
Jewels Challenge Hi Friends! I know you all are probably busy solving some ongoing contest or preparing to some upcoming. But in case you have half an hour to spend on funny problem without clear solution, I invite you to try [**Jewels**](https://www.codeabbey.com/index/task_view/jewels) at my site. You may know this game as "Match-3" or "Bejeweled". Now the question is to write small function to "auto-play" it - i.e. to suggest some good move. Code is accepted in `Python` or `Lua` (supposedly many of us know Python anyway &mdash; and who don't, I recommend investing 15 minutes in learning Lua &mdash; there is "intro" link included). Writing naive implementation of about dozen lines which iterates over the board and tries to find any valid move probably won't take more than another 15 minutes from you. However running time is limited to `1 second` so that it probably is not possible to carefully and slowly examine all possible moves at each step. This means you can try some fancy ideas o...
carefully and slowly examine all possible moves at each step. This means you can try somefancy ideas, possible moves at each step. This means you can try some fancy ideas of "inexact" solution.

Full text and comments »

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

65.
By Nickolas, 15 years ago, translation, In English
TCO11 as seen by a blogger, p.1 <p>TCO11 - is the second (and hopefully not the last) finals I've visited as a blogger. I hope that not everybody here followed <a href="http://community.topcoder.com/tco11/blog/">the official blog</a>, and thus my story of this trip will be read as an original art work :-) <br /><br /> </p><h3>Day -1. Arrival</h3> <br /> I arrived one day earlier than most of the finalists, on Friday evening local time. How does one do this? Long story short, you just don't rely on Barbara's choice, and (when filling travel info) write something like &quot;I like this flight, and I'm in SWISS mileage program, and I absolutely love Z&uuml;rich&quot;. Disclaimer: if everybody uses this hack, it might stop working, so beware. <br /><br />[cut] The flight to Florida was short (well, short compared to the flight to Las Vegas) and nice (a lot of movies to see and ice-cream). But most of my joy dissolved into nothing in Miami airport, when I didn't find the promised taxi. In the end my drive to the hotel ...
the admins and the breakfast easily, had a look at a fancy coffee machine which could also brew tea, the breakfast easily, had a look at a fancy coffee machine which could also brew tea, and then

Full text and comments »

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

66.
By bedirhan, 5 years ago, In English
The Relationship between CF Rating and WPM Hello Codeforces! Recently, there was a blog about [the relationship between IQ and Codeforces rating](https://codeforces.me/blog/entry/90996). And this blog inspired me to do a similar thing for typing speed. Unfortunately, I don't have any fancy research paper that proves the relationship between WPM and CF rating. To have an idea about it, I created this blog. When I reach about 50 responses, I'll post what I come up with. To take part in this, you need to take a 30 second English word typing test from [MonkeyType](https://monkeytype.com/). Further instructions are included in the form. As a note, I know that taking the test with punctuation and longer time may differ in WPM by a lot. But, to not bore you and take your time, I concluded that selecting the test only as 30 seconds and only with words would be better. Thank you for participating. [Take me to the form.](https://forms.gle/ZB9okemHZhCcWBDD6) Edit: Form is closed. Shout out to [user:dnaux,2021-06-01] and [us...
typing speed. Unfortunately, I don't have any fancy research paper that proves the relationship, Unfortunately, I don't have any fancy research paper that proves the relationship between WPM and

Full text and comments »

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

67.
By gealbermorales, history, 5 years ago, In English
Improving Golang input reading fmt.Scan family in Golang ------------------ Introduction ------------------ Reading input from stdin in Golang and in any other language is not a tricky thing to do, actually is quite easy. In Go you could achieve this by simple using one of these functions: - **fmt.Scan** - **fmt.Scanf** - **fmt.Scanln** These functions are the standard for reading from stdin, but for large inputs they don't perform too good, let's see why and what could use instead. Prerequisites ------------------ In order to follow this post, we will need to had Golang and Python on your machine The program ------------------ On a recent [post](https://codeforces.me/blog/entry/94135), I wrote about the issue that I was having related to **Time Limit Exceeded(TLE)** on my submissions written in Go. Even in a ridiculous way, given that an implementation of the same algorithm in Python were accepted, while my Go implementations were not. Almost all of my submissions written in Go faced *...
array. I won't do anything fancy with this input, I will just read them and see how fast Go can do, I won't do anything fancy with this input, I will just read them and see how fast Go can do this

Full text and comments »

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

68.
By zerocold, 13 years ago, In English
FaceBook Qualification Round Solutions 2014 **1. Square Detector (20 Points)** When facing a problem in a programming contest there are three main things to consider when planning your solution. In order of importance: **Is the algorithm correct.** **Is the algorithm fast enough.** **Is the algorithm easy to implement.** In this particular problem the first two points are rather straightforward, the task is conceptually simple and with the small input size efficiency is not a big concern. The third point however deserves some consideration, I'm sure you are well aware that it's easy to make bugs in any piece of code you write, and chances for having bugs increase sharply with the code lengths and complexity. That's why it's worth to spend couple extra minutes to think about an approach that yields the least complicated code. One clever way of solving this is to realize that if you take the bounding box of all the black cells all you need to check is that it's a square and that all the cells inside it are black. Si...
)** Similarly to the previous problem the solution doesn't require fancy algorithm, and the execution, Similarly to the previous problem the solution doesn't require fancy algorithm, and the execution

Full text and comments »

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

69.
By Haaland-Erling, history, 13 months ago, In English
Want to Gain Rating? Treat Codeforces like a Sport You want to gain rating, right? Well, you probably won't gain rating, because you never tried to gain rating in your life, "you expect all hard work to be done for you by someone else". Let's start! ### **Equipment Matters &mdash; But Only a Little** Your equipment such as your keyboard, monitor etc can help you perform better. A comfortable environment can reduce distractions, a fast keyboard can improve your typing speed, a bigger screen can help you read problems faster. But the thing is, fancy gear alone won't help you gain rating. Just like how footballers don't score more goals because of their football boots, sure, it makes a difference, but just because I bought Haaland's boots, does not make me Haaland. Appreciate the gear that you have, but terat it as helpful tools, not magic solutions. ### **Techniques Aren't Enough** There are various techniques used in competetive programming, learning to use different data structures and algorithms are essential to gaining rating...
to the match ready to perform. Your fancy keyboard? Nice. Your knowledge of segment trees? Cute, , fancy gear alone won't help you gain rating. Just like how footballers don't score more goals

Full text and comments »

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

70.
By OmarAfterMidnight, history, 6 months ago, In English
How I’m trying to study Number Theory (in a less random way) ### I’m not an expert in number theory, ### but I was tired of feeling lost. For a long time, I felt like I was studying in a very random way. I would learn an idea, solve a few problems, then move on. After a while, I’d forget most of it. So I decided to try something simple. Instead of solving randomly, I started **grouping problems by topic**. Nothing fancy, just trying to build some structure. --- #### For example, I made small sets around: * **Segmented Sieve** * **Prime Factorization & Divisors** * **Miller-Rabin & Pollard Rho** * **Arithmetic on Graphs** * **Some basic DP when needed** --- > The goal is not to solve as many problems as possible. > The goal is to understand the idea well enough so I don’t feel lost when I see it again. Right now, I have a set where I solved **22 out of 26 problems**, and I’m still stuck on some of them. But honestly, this way feels much better than random practice. I’m still learning, and I’m still add...
of solving randomly, I started **grouping problems by topic**. Nothing fancy, just trying to build, Instead of solving randomly, I started **grouping problems by topic**. Nothing fancy, just trying

Full text and comments »

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

71.
By tehqin, history, 10 years ago, In English
Algorithms Live! Episode 2 This week will be talk show format and will feature our first guest, Deon Nicholas ([user:dojiboy9,2017-01-06]). More info can be found here: [http://algorithms-live.blogspot.com/2017/01/episode-2-fancy-antiques.html](http://algorithms-live.blogspot.com/2017/01/episode-2-fancy-antiques.html) **Edit:** For those interested in implementations of the discussed solutions, those can be found on David Van Brackle's judging blog: http://serjudging.vanb.org/?p=924.
-fancy-antiques.html](http://algorithms-live.blogspot.com/2017/01/episode-2- fancy-antiques.html, More info can be found here: [http://algorithms-live.blogspot.com/2017/01/episode-2-fancy

Full text and comments »

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

72.
By kishoreganesh, history, 6 years ago, In English
Minimum distance to all coprime array Let's call a sequence of numbers b[1]...b[n] fancy if gcd(b[i], b[j]) = 1 for all 1 <= i < j <= n. (Meaning all the elements of the array are coprime to each other). Given a sequence of numbers a[1], a[2], ..., a[n], what is the minimum possible value of abs(a[1]-b[1]) + abs(a[2]-b[2]) + ... + abs(a[n]-b[n]), where b[1]...b[n] is a fancy sequence? EXAMPLE: Input &mdash; [1, 1, 1, 1, 1] Output &mdash; 0 Explanation: [1, 1, 1, 1, 1] itself is a "fancy" sequence, so the minimum possible distance is 0. Input &mdash; [1, 6, 4, 2, 8] Output &mdash; 3 Explanation &mdash; One of the optimal "fancy" sequences is [1, 5, 3, 1, 8]. distance([1, 6, 4, 2, 8], [1, 5, 3, 1, 8]) = |1-1| + |6-5| + |4-3| + |2-1| + |8-8| = 3. Input &mdash; [1, 2, 4] Output &mdash; 1 Explanation &mdash; Zero distance is impossible because [1, 2, 4] is not "fancy". One of the optimal "fancy" sequences is [1, 2, 3]. distance([1, 2, 4], [1, 2, 3]) = |1-1| + |2-2| + |4-3| = 1. Constraints 1 ≤ n ≤ ...
[1, 2, 4] is not "fancy". One of the optimal "fancy" sequences is [1, 2, 3]. distance([1, 2, 4, Input — [1, 1, 1, 1, 1] Output — 0 Explanation: [1, 1, 1, 1, 1] itself is a " fancy, Input — [1, 6, 4, 2, 8] Output — 3 Explanation — One of the optimal "fancy, Let's call a sequence of numbers b[1]...b[n] fancy if gcd(b[i], b[j]) = 1 for all 1 <= i < j <= n, [1]) + abs(a[2]-b[2]) + ... + abs(a[n]-b[n]), where b[1]...b[n] is a fancy sequence?

Full text and comments »

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

73.
By BiggEr., history, 5 years ago, In English
[FEATURE REQUEST] Because old is gold. I am regularly giving contests on codeforces for the last few months now, and I have started to see how problem setters always try to come up with something new which most of the people will see for the first time. It's a good thing but sometimes the problem actually goes far away from anything that would make sense due to the added complexities. Whereas some problems although they have appeared somewhere else, actually teach some serious stuff to the person who saw it for the first time. So, my request is to come up with some weekly/monthly(as you wish) old classic contest or practice gym which would feature problems that teach something to newcomers and would be a nice refresher for the old OGs. I know there are a bunch of platforms already doing this but codeforces has it's own legacy when it comes to anything around competetive programming, so this would be a nice thing. If these contests are made rated, I agree that rating or color will lose relevance as there will be...
initiative would help those who start CP, see fancy things like Segment tree beats, and what not, try, not have the pressure to be unique. This initiative would help those who start CP, seefancy things

Full text and comments »

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

74.
By ebanner, history, 10 years ago, In English
Tutorial: Simulating recursion with a stack *Fun fact: from beginning to end this blog post took me 16 months!* This will be a tutorial on simulating recursion with a stack. I developed this tutorial after using this technique to solve [problem:472b]. Consider the following recursive definition of the `factorial()` function. ``` def factorial(n): return n*factorial(n-1) if n>1 else 1 ``` This definition is compact, concise, and mirrors the definition that appears in math textbooks very closely. In many ways it is the most natural way to define `factorial()`. However, there is a problem. For very large values of `n`, you will see that we will get a `StackOverflowError`. To understand why this is the case, you must understand that recursion is implemented in Python (and most other languages) as growing and shrinking a [stack](https://en.wikipedia.org/wiki/Stack_%28abstract_data_type%29) in memory. For example, consider the following simulation of the computation of `factorial(3)`. ![ ](https://docs.g...

Full text and comments »

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

75.
By vjota035, history, 2 years ago, In English
My Story : From Village Bully Magnet to Daily Dough Maker Imagine this: me, just a scrappy kid trying to survive in the jungle known as school. But instead of recess and high fives, I was dodging bullies left and right. Why? 'Cause my pocket money was less than the price of a fancy pencil. Yeah, I'm talking less than 10 rupees, folks. Cue the sad trombone. But hey, life's a rollercoaster, and mine was about to take a wild turn. Enter Codeforces, stage left. Suddenly, I had a purpose, a reason to stare at a screen for hours on end. And you know what? I got pretty darn good at it. Coding became my escape from the schoolyard jungle. Then, just when I thought my luck couldn't get any better, I stumbled upon a secret society on Telegram. These folks were like the Avengers of coding, sharing solutions faster than you could say "bug." And me? I was right there with 'em, soaking up knowledge like a sponge. But here's the kicker: while those bullies were still counting their lunch money, I was out there making it rain... 20 rupees a day, to b...
having less than pocket change to making more than a fancy coffee in a day. Talk about a glow-up!, than the price of a fancy pencil. Yeah, I'm talking less than 10 rupees, folks. Cue the sad trombone

Full text and comments »

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

76.
By mercurist, history, 5 years ago, In English
Farewell to the past. Let’s put an end to this. <br> <br> Hi there! This blog is aimed particularly at people who plagiarise their codes, and people who raise their pitchforks at these “alleged cheaters”. Which is worse? <br> <br> Before you cheat, think about why you’re doing this. It’s all just virtual rating, my friend. I know things can be tough, especially with CP, it can be frustrating when you don’t see a visible rating improvement after hours of grinding those pesky algorithms. But that’s life. You don’t look at your life and try to think of hacks to avoid your life. You live it, and endure the hardships that life throws at you. Perseverance is vital for success. Hang in there. In due time, you’ll get the colour you always wished for, and when you do, you’ll feel euphoric and looking back on your years on this platform, you’d be grateful to your past self for not taking the easy way out. Also, for those of you who take such great pride in calling themselves “cheat busters”, “plag hunters”, a...
hunters”, and other fancy names, I have two things to say to you. Firstly, find a hobby. You’re wasting, ”, and other fancy names, I have two things to say to you. Firstly, find a hobby. You’re wasting your

Full text and comments »

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

77.
By rendon, 12 years ago, In English
Manage your tests with TestProgram Hey guys! How have you been? :) I wrote a little program to automate tests, specifically for programming contests, nothing fancy, but I think some of you might find it useful for your testing. The name of the tool is [TestProgram](https://github.com/rendon/test_program), I know, no one would ever occur that name :). Well, actually, I did choose that name because `tp` was the easiest to type compared with my other options. TestProgram is a command line program and was designed mainly for GNU/Linux but it also works in Windows using Cygwin (tested), I haven't tried with Mac. By the way, it has support for Codeforces, thanks to [user:johnathan79717,2014-11-17]'s Codeforces Parser, maybe you remember [this comment](http://codeforces.me/blog/entry/10416#comment-175092). Here you have two demos in video, the first one describes the [general use](https://www.youtube.com/watch?v=FldqcTG9zCQ) and the second shows how to use it with [Codeforces](https://www.youtube.com/watch?v=9...
programming contests, nothing fancy, but I think some of you might find it useful for your testing, I wrote a little program to automate tests, specifically for programming contests, nothingfancy

Full text and comments »

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

78.
By crazy_stardusts, history, 6 years ago, In English
Divide and Conquer : Open for All Hola Amigos!! We are back with a bang. TSoC and Inquizitive present to you Divide and Conquer(we couldn't think of a fancier name). After the success of 'Drink N Code', we have come up with yet another one of a kind competition where you get to code and quiz at the same time. Seems interesting, doesn't it? The event is scheduled from 6-8 pm on 30-Oct-2020 on codeforces. Contest Rules : 1. Divide and Conquer is a team based competition. Maximum team size is 3 members. Participants can also take part individually. 2. Teams have to solve some coding problems based on Data Structures and Algorithms. Each solved coding question unlocks a trivia question for all the teams. 3. The trivia questions have the same weightage as the coding questions !! 4. Competition is ICPC styled with each question having a certain score which keeps decreasing as the competition further progresses. Participation fees: Rs.30 per team and a will to learn new things. 1st prize : ₹500 + trophy ( T...

Full text and comments »

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

79.
By hetanhnandre, 3 years ago, In English
How to improve ? Hello there, I would like to share my personal experience on how I reached expert. Some people asked me regarding this so I decided to write a blog. Firstly, I am incredibly thankful to my friend [user:an1ket_62,2023-09-05] for introducing me to Codeforces. It has been a real game-changer in improving my competitive programming skills. <spoiler summary="Topics that I know"> - Maths - Greedy - Binary Search (Still learning) - Number Theory - Bitwise Operators - DP - DFS/BFS - Segment Trees </spoiler> <spoiler summary="Resources I have used"> - Competitive Programmer’s Handbook by Antti Laaksonen (For Theory) - CP-Algorithms Website ([Link](https://cp-algorithms.com/index.html)) - [user:Errichto,2023-09-05], [user:acraider,2023-09-05] and [user:galen_colin,2023-09-05]'s Youtube Channel - CSES Problem Set ([Here](https://cses.fi/problemset/)) - CF Problem Set for Practice ([Here](https://codeforces.me/problemset)) </spoiler> Sure thing! When you ask someone...
of it like this: if you're trying to bake a fancy cake, but you're not sure how, you might first, solutions of the simplified version". Think of it like this: if you're trying to bake afancy

Full text and comments »

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

80.
By harsh-apcr, history, 2 years ago, In English
Optimisation problem Given two arrays of integers $x$ and $y$, of length $n$, find a partition of indices $\{1, \ldots, n\}$ such that you minimise the score, where the score of a partition $S_1, S_2$ is defined as $\max(\sum \limits_{j \in S_1} x[j], \sum \limits_{j \in S_2} y[j])$ just find the minimum score that can be achieved, I fancy a dp approach, any help is appreciated, thanks EDIT : assume the sums of $x$ and $y$ are bounded above by $M$, then a solution with time complexity parametrised by $M$ might be good
can be achieved, I fancy a dp approach, any help is appreciated, thanks EDIT : assume the sums of, just find the minimum score that can be achieved, I fancy a dp approach, any help is appreciated

Full text and comments »

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

81.
By adaptatron, 2 years ago, In English
[Tutorial] : Quirks of Non Existent Map Elements I created a blog that talks about 3 quirks of maps/multisets. 1. Accessing non existent elements in maps keyed on characters may lead to WA. 2. Accessing non existent elements in maps keyed on integers may lead to TLE. 3. Using the fancy count operator in multisets may lead to TLE. There's no new/unique insights, I just documented my personal experience with these quirks, along with the problems link where I first encountered this issue. It might be helpful to beginners in competitive programming. https://cfstep.com/training/tutorials/general-techniques/quirks-of-non-existent-map-elements/
existent elements in maps keyed on integers may lead to TLE. 3. Using the fancy count operator in, integers may lead to TLE. 3. Using the fancy count operator in multisets may lead to TLE. There's

Full text and comments »

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

82.
By satyamjha91064, history, 4 weeks ago, In English
A small Codeforces filter I built after running into a tiny limitation so mini rant turned into a mini build. was on the ratings page trying to filter users by city AND organization at the same time, wanted something specific like "rated users from Surat who are at NIT Patna." turns out you literally can't do that on the site, it only lets you pick one at a time, city or org, never both. found out there's an old feature request for this too that just never went anywhere. so instead of waiting around I just built it myself. [cut] it's a small CLI tool that pulls the full rated user list from the official CF API and filters it locally by both fields at once, plus you can add a min/max rating if you want. no dependencies, nothing fancy, just run it. repo: [https://github.com/Rogue-strider/cf-city-org-filter](http://) usage is basically: ~~~~~ python cf_filter.py --city Surat --org "NIT Patna" ~~~~~ can export to csv/json too if you want to save the results instead of just reading them off the terminal. not a big project or any...
once, plus you can add a min/max rating if you want. no dependencies, nothing fancy, just run it, , nothing fancy, just run it.

Full text and comments »

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

83.
By antontrygubO_o, 4 years ago, In English
Problems that I authored so far **UPD 1 [May 17 2025]:** I added my problems from Ukrainian Olympiad in Informatics (among others). They are available here: [contest:105820] Hi everyone! I wanted to write such a blog for a long time, motivated by similar blogs [by](https://codeforces.me/blog/entry/108940) [user:adamant,2023-02-20] and [by](https://codeforces.me/blog/entry/108595) [user:tibinyte,2023-02-20]; I finally decided to do it after my Universal Cup contest. This is not a super-comprehensive list, I also set some problems for some local contests, but that's most of it. I want to encourage other setters to write such blogs. For me, it's very interesting to read about the backstories of some problems and also to see all the problems by some author gathered in one place (as most authors give problems to several platforms). One important point. As you will see from the comments, many of my problems were improved by other people, and I myself improved some problems by other people. I think that it's cruc...
://codeforces.com/gym/103469/problem/E) | GP of IMO | | | 59 | August 2021 | [ Fancy Formulas](https

Full text and comments »

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

84.
By Kuber, history, 3 years ago, In English
Suggestion regarding learning AI Hi everyone, I want to program computer to play games like connect 4, dots and squares and maybe eventually DoTA. I've started with applying algorithms like minimax etc to simple games. With the onset of AI, there are many ways to do this now like AlphaZero etc. I am fascinated by these. The fact that the computer is able to find solutions that humans were unable to find in centuries makes me want to jump into this revolution. However, I currently am just a pupil here. I need help in figuring out a roadmap that I must follow to be able to program AI. I am willing to learn anything, but I also don't want to waste my time in doing things that are fancy in the short term but don't stack up to my goals. I request the learned people here to guide me what path I can take.
anything, but I also don't want to waste my time in doing things that are fancy in the short term but, learn anything, but I also don't want to waste my time in doing things that are fancy in the short

Full text and comments »

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

85.
By touristplease, history, 9 years ago, In English
What is practice/How to practice? [Help] For the past 1.5 years, I've been solving problems in a not-so-regular fashion. I've improved (just a little). I can't solve any fancy problems tho. I can probably solve 2 problems in Div2. Most likely I won't solve C-Div2 within the contest but maybe some hour(s) after. What is considered practice? Just the exposure to a problem and thinking about a solution (even failure?). Like I will be honest, I enjoy the process and gosh I enjoy it even more when it pays off and you solve the problem. But considering how slow the progress is for me I started thinking two things:- - I am stupid af and this isn't for me. - I am doing something wrong or maybe practicing in a wrong way: - - _Taking too long in a problem that might just needs some technique or concept that I am yet not familiar with._ - - _Not tackling the problems the right way thus, taking too long to get through them._ **I strongly wish some of you write about how their process goes until they find a solution. How ...
a little). I can't solve any fancy problems tho. I can probably solve 2 problems in Div2. Most

Full text and comments »

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

86.
By Harsh_p, history, 3 years ago, In English
Dopamine Strike After Solving First Problem in Contest. In my newbie Codeforces adventure, solving that first problem felt like reaching the top of a beginner's mountain. I'm still learning, still figuring things out, but this little victory? It made me smile big. Hey fellow coding beginners! I want to share a super exciting moment from my early days on Codeforces. So, you know, I'm still a bit of a newbie, and this whole coding adventure has been a rollercoaster. But guess what? I had my first victory, and it felt like winning a mini coding trophy!. So, there's this thing called the Educational Round Div. 2 contest. It sounded kinda fancy, but I decided to give it a shot. Each problem felt like a puzzle, and I was nervous but excited. And you know what? I actually solved one of the problems! The screen said "Accepted," and I was like, "Whoa, did I just do that?". It might not be the fanciest problem ever, but for a newbie like me, it was a big deal .
trophy!. So, there's this thing called the Educational Round Div. 2 contest. It sounded kindafancy, , there's this thing called the Educational Round Div. 2 contest. It sounded kindafancy, but I decided

Full text and comments »

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

87.
By flyingbirdoverkill, 4 years ago, In English
stripprimes — my fancy erotic game Recently, I've created some sexy C++ erotic game called "stripprimes". This is my first game so don't expect too much, but I think it's quite funny. The game is simple so you gonna grasp it's rules easily. Here is the link from where you can download the game, and it's only 2 megabytes: https://drive.google.com/file/d/1GHBrc7pAiihRM_PcqV4gyeO27Cv-di0q/view?usp=sharing. There are 12 levels in total, with increasing difficulty and increasing quality of girls(+-). Write your thoughts in comments, if you like it and how much. Oh, and BTW don't open the txt file, it'll spoil you. It's just for the program, open stripprimes.exe instead.
stripprimes — my fancy erotic game

Full text and comments »

88.
By EvenImage, 4 years ago, In English
Problems that I authored so far Since competitive programming is dying, and I'm almost retired, so it's time to review the problems I authored. Hi everyone! I wanted to write such a blog for a long time, motivated by similar blogs, [by](https://codeforces.me/blog/entry/113093) [user:antontrygubO_o,2023-02-25], [by](https://codeforces.me/blog/entry/108940) [user:adamant,2023-02-25] and [by](https://codeforces.me/blog/entry/108595) [user:tibinyte,2023-02-25]. This is not a super-comprehensive list. I set many shit problems that I don't want to share for some local contests. It can be long, and I'm not sure if I have finished half of them yet. The number of asterisks after the label indicates the recommendation levels. One asterisk means this problem is worth reading. Two asterisks mean this problem is one of my favorite problems, Three asterisks mean this problem is one of my best problems. | # | Date | Problem | Contest | Comment | | ---- | ----------- | --------------------------------------------...
doesn't contain many fancy problems, but it's very balanced and has moderate difficulty. | | 2, perspective. It doesn't contain many fancy problems, but it's very balanced and has moderate difficulty

Full text and comments »

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

89.
By Pieck, history, 4 years ago, In English
What are you thoughts on CodeChef? What are you thoughts on CodeChef? ================== I recently reached 6 star on CodeChef (CC) and it made me think, why so many of the users which are 5 or 6 star on CC are less than 1700 on Codeforces (CF). For me, one of the reasons is that many of the CF questions don't need you to use fancy DSAs, they rely more on problem solving and using basic techniques while CC has some form of DSA question as you advance to the 3rd or 4th question even in Div 2 rounds. Also the number of people participating in CF is way more than that at CC which hits you like a rock even if you solve it 2 minutes too late. <spoiler summary="For Chess Fans"> I just feel sometimes that CC is like LiChess while CF is more like Chess.com </spoiler> What are your thoughts about this?
fancy DSAs, they rely more on problem solving and using basic techniques while CC has some form of DSA

Full text and comments »

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

90.
By code_warrior, history, 6 years ago, In English
An Interesting problem related to modulo arithmetic Hello, freinds recently i was confronted with a problem which goes like this-> Given a positive odd prime number p and another positive integer k (1<k<=p-1) find the minimum value of m such that pow(k,m)%p=1. One straight way of approaching this is to iterate untill we get what we need thus contributing a time complexity of O(p), but i fancy if there exists even a more efficient way to do so. Can anyone help me or give some clue of how to solve it in less than O(p) time complexity.
contributing a time complexity of O(p), but i fancy if there exists even a more efficient way to do, time complexity of O(p), but i fancy if there exists even a more efficient way to do so. Can anyone

Full text and comments »

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

91.
By RitikRSapat, history, 4 years ago, In English
Data Science Data science is not about: • Using the latest tools • Plotting the best graphs • Building the best ML model • Having the fancy title "Data Scientist" Data science is about: • Understanding the business problem • Being curious to understand the data • Getting insights from data to solve the problem • Convincing stakeholders to take action Remember, You're a problem solver, Get the foundation right.
best ML model • Having the fancy title "Data Scientist"

Full text and comments »

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

92.
By godlife7, 12 years ago, In English
no details are likely to n decide what, this is a knockout, no details are likely to determine the outcome, perhaps a goal can be a winner, everyone had to come up with 100% performance in 90 minutes time, players play more critical than a coach, I trust the players, This will allow me to keep a cool head. "Yesterday, Arsenal at the Emirates Stadium in the Premier League 36th round match, 3-0 victory over Newcastle United, consolidate fourth place standings.Arsenal<a href="http://www.airfreeshoes.es/nike-free-30-v5-c-7.html">nike free 3.0 v5 mujer</a> win this season is no longer possible to keep the top four Champions League qualification for next season to be the most realistic goal. After the game, they accumulated 73 points, and more than Everton in fifth place out of 4 points. Their last two opponents were West Brom and Norwich Petrovich, both teams fighting relegation.Arsenal took the lead in the 26th minute, Cazorla free kick in front of Koscielny Qiangdian Tongshe network. After scoring heat of the ...
played experience, and this one is just a fancy Ancelotti Guardiola has not let the ball mainly to, , Real Madrid face authentic "Tiki-Taka" football has played experience, and this one is just afancy

Full text and comments »

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

93.
By airdresses, 14 years ago, In English
plus size mother of the bride dresses Cover with your favorite icing! Amy's Baking Tips: (1) Always start with room temperature ingredients, specifically the butter. (2) If you can't find or don't have self rising cake flour, mix up a batch: a quick ratio is 1/4 tsp of baking powder and a pinch of salt per cup of <a href="http://www.airdresses.com/Cocktail-Dresses.html" title="sexy cocktail dresses">sexy cocktail dresses</a> flour. (3) Try to source <a href="http://www.stepdress.com/Sheath-Prom-Dresses.html" title="sheath prom dresses">sheath prom dresses</a> ingredients locally, especially the eggs and milk. You will be amazed at the difference in the quality of your <a href="http://www.dressesforprom2013.com/evening-dresses.html" title="evening gowns">evening gowns</a> results! If you want to see more of these beautiful sugar flowers, check out Sugar Flower Cake Shops'. You won't believe how pretty sugar flowers can be! All photos courtesy of Sugar Flower Cake Shop.Today's wedding invitations come in a dizzying array of ...
done! You can even go a step further by attaching them to a fancy paper backing and adding ribbons or

Full text and comments »

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