### flamestorm's blog

By flamestorm, 5 weeks ago,

As you may have seen, I've written a lot of problems.

In this post, I want to go over each of my problems and describe my thought process for how I created each problem. I got this idea from antontrygubO_o, but I was also inspired by McDic's editorials that included a "behind story" for each problem. Anyway, I thought it would be fun to give you all a glimpse into my thought process: where my ideas came from, the obstacles I encountered along the way, and any random tidbits that give a bit more pizzazz to the problems.

I think it's important to remember that problem-writing is a creative endeavor, so I hope you'll enjoy reading about the making of my problems as much as I enjoyed creating them. And who knows, maybe you'll even be inspired to write some problems of your own.

Also, spoilers for a lot of problems. Obviously.

ID Problem Rating Contest Comment
001 Domino Disaster 800 Codeforces Round #742 The first problem I ever wrote. I'm firmly in the camp that thinks Div. 2A problems should be more implementation-based rather than random constructions or math formulas, and this is the perfect type of problem to embody that spirit, I think. Easy enough for basically everyone to try and solve.
002 MEXor Mixup 1000 Codeforces Round #742 Actually, this was the first B problem I had seen involving the idea of "precompute answers between test cases", and it seemed to trip a few people up (including LGMs!). Luckily, I was aware of the idea when later problems with similar ideas came around.
003 Carrying Conundrum 1600 Codeforces Round #742 A nice idea, I think, but I wish I would've made the "answer extraction" a little cleaner.
004 Expression Evaluation Error 2000 Codeforces Round #742 This problem was originally proposed as C (and in my opinion, is easier than the above problem). If you want a free 2000, I recommend you do this problem.
005 One-Four Overload 2700 Codeforces Round #742 The first of my "sufficient = necessary" problems.
006 Chef and Pairwise Distances 2012 September Cook-Off 2021 Geometry problem, yay! And it's also the archetype of "large inputs fail".
007 Ones Guessing N/A Codechef SnackDown 2021 Final Round To say the least, I was quite thrilled to see my third contest problem be in Codechef SnackDown finals. It's a funny problem too. Something to think about: how can we write the interactor for this problem to fail every solution except the intended one?
008 Not Shading 800 Codeforces Round #766 Well it looks like I broke my rule about hard/stupid constructive D2A. In my defense, however, I proposed this as D2B, and it was moved down (because the original D2A proposal was... worse, let's just say).
009 Not Splitting 2700 Codeforces Round #766 I think this problem is quite easy, to be honest (I proposed it at E), but perhaps scary geometry terms threw people off. Or maybe it was slightly wrong but technically correct statement at the beginning of contest (because translators changed it like 10 minutes before). Oops.
010 Mango Market 2393 February Cook-Off 2022 Quite goofy problem. I thought of it while studying for an economics exam, hence the flavourtext (the original name was "Monopsonistic Market").
011 Magnet Sort 1804 February Lunchtime 2022 I don't know how to say it, but this is the most generic ad-hoc problem I've ever seen. Yes, that's an oxymoron.
012 Colorful Stamp 1100 Codeforces Round #784 And here come the Div. 4 problems! To be honest, I think it is quite hard to make a Div. 4D, because we're past the "just implement" problems, but it still needs to be easy... I think this problem is too hard for that slot, but somehow it managed to only be 1100.
013 Minimum Crossings (Easy Version) and Minimum Crossings (Hard Version) 1400/1500 Codeforces Round #790 Back when Div. 4 final problem was just "use standard idea". I somewhat regret putting harder version, but I'm a sucker for subtasks.
014 Where's the Bishop? 800 Codeforces Round #799 A simple but natural implementation problem. I'm happy with it.
015 Binary Deque 1200 Codeforces Round #799 Though process behind this problem: "wouldn't it be funny if we had deque in Div. 4?"
016 3SUM 1300 Codeforces Round #799 Very natural and nice problem, and perfect for Div. 4. I like it.
017 2^Sort 1400 Codeforces Round #799 Very unnatural and ugly problem, and not perfect for Div. 4. I still like it.
018 XOR Mixup 800 Codeforces Round #803 Ok so maybe I set goofy problems at D2A. In my defense, you literally can't get this one wrong. By the way, the déjà vu theme of this contest comes from the fact that the titles of each of these problems is a reference to some previous contest, which I don't think anyone saw (except Ari). This one's a reference to MEXor Mixup.
019 Rising Sand 800 Codeforces Round #803 This problem definitely exists, and is a reference to Falling Sand.
020 3SUM Closure 1300 Codeforces Round #803 This problem was added very late to the contest (like, literally, two days before), so unfortunately there were many FSTs because a lot of people used some casework bash(. Testers thought that problem D (which was originally C) was too hard, but I didn't think so. I think I would've been happier with the round without this problem, but hindsight is 20/20. A reference to 3SUM.
021 Fixed Point Guessing 1600 Codeforces Round #803 This would've been a really nice C, I think, but now it's just an easy D. Oh well. The idea is still cute. A reference to Fixed Point Removal.
022 PermutationForces II 2300 Codeforces Round #803 This version of the problem is essentially due to errorgorn, because my original version just had some easy cheese. Also, I don't know why it's 2300, I was worried it was too easy for E. A reference to PermutationForces, obviously.
023 Equal Reversal 2800 Codeforces Round #803 *The best problem I've made.* A surpising result where the obvious necessary condition is not in fact sufficient, and you have to think for a bit more what to do. I originally proposed it at D. Oops. I guess I was warned.
024 Long Binary String 2900 Codeforces Round #803 This problem definitely is one of the problems of all time. Some might call it a knowledge check, but I call it a skill issue. A (very oblique) reference to Long Colorful Strip.
025 YES or YES? 800 Codeforces Round #806 I didn't know what YES or YES was, until I saw it on one of v_Enhance's handouts. I still don't get K-Pop.
026 ICPC Balloons 800 Codeforces Round #806 The only way to make a goofy implementation problem is to write one about the king of goofy implementation problems themselves.
027 Yet Another Problem About Pairs Satisfying an Inequality 1300 Codeforces Round #806 I tried to make a problem with a title longer than the statement. I got close.
028 Colourblindness 800 Codeforces Round #817 I legitimately don't remember making this problem.
029 Word Game 800 Codeforces Round #817 Inspired by Scattergories, of course.
030 Line 1100 Codeforces Round #817 Some random goofy greedy problem to fill in the slot.
031 Seven-Segment Factoring 2675 Starters 59 A nice problem, because it looks super strange but you can get incremental observations that slowly make it more and more approachable. I wish there were subtasks. Sadly, since it was used in a Starters contest, barely anyone saw it(.
032 Sum 800 Codeforces Round #827 uh
033 Stripes 900 Codeforces Round #827 Div. 4C speedbump! More like a brake check actually...
034 Medium Number 800 Codeforces Round #835 ok i literally cannot provide meaningful commentary for D4A
035 Quests 1500 Codeforces Round #835 Another problem made backwards. I was wondering, "we have too many binary search on array problems in Div. 4, but no binary search on the answer..."
036 SSeeeeiinngg DDoouubbllee 800 Codeforces Round #836 Ok I have no excuse for this, but at least this is easier than "here is random formula that trivializes".
037 Almost All Multiples 1400 Codeforces Round #836 A random problem I came up with a few days before the contest to split the constructive problems up. It ended up being basically constructive. Darn.
038 Tick, Tock 2500 Codeforces Round #836 Blame manish.17 for the flavortext. Also, I'm not sure why this is 2500 either, because I originally proposed it at D. Oops.
039 Decent Division 3000 Codeforces Round #836 Cowritten with manish.17; I proposed an easier version where the ratio of ones to zeroes is between $0.5$ and $2$. Apparently the same solution could be adapted to this harder version. Somehow, it's the hardest problem I wrote, even though I wrote a harder problem that had to be removed from the contest because we found it elsewhere(.
040 Codeforces Checking 800 Codeforces Round #849 insert witty remark here
041 Following Directions 800 Codeforces Round #849 I'm quite happy with the double entendre of the problem title. The problem itself is a thing that exists.
042 Prepend and Append 800 Codeforces Round #849 I actually like the idea of having concepts like two pointers being given in these implementation problems.
043 Range Update Point Query 1500 Codeforces Round #849 i forgor how i made this problem, but I thought it was nice.
044 Teleporters (Easy Version) and Teleporters (Hard Version) 1100/1900 Codeforces Round #849 I thought of making a problem with sorting by $i + a_i$, and this popped out.

I do intend to keep this list live as I write more problems. Thanks for reading!

• +149

By flamestorm, 7 weeks ago,

We hope you enjoyed the contest!

1791A - Codeforces Checking

Idea: flamestorm

Tutorial
Solution

1791B - Following Directions

Idea: flamestorm

Tutorial
Solution

1791C - Prepend and Append

Idea: flamestorm

Tutorial
Solution

1791D - Distinct Split

Idea: SlavicG

Tutorial
Solution

1791E - Negatives and Positives

Idea: SlavicG

Tutorial
Solution

1791F - Range Update Point Query

Idea: flamestorm

Tutorial
Solution

1791G1 - Teleporters (Easy Version)

Idea: flamestorm

Tutorial
Solution

1791G2 - Teleporters (Hard Version)

Idea: flamestorm

Tutorial
Solution

• +77

By flamestorm, 4 months ago,

We hope you enjoyed the contest! Sorry for the late editorial.

1760A - Medium Number

Idea: flamestorm

Tutorial
Solution

1760B - Atilla's Favorite Problem

Idea: SlavicG

Tutorial
Solution

Idea: Errichto

Tutorial
Solution

1760D - Challenging Valleys

Idea: mesanu

Tutorial
Solution

1760E - Binary Inversions

Idea: SlavicG

Tutorial
Solution

1760F - Quests

Idea: flamestorm

Tutorial
Solution

1760G - SlavicG's Favorite Problem

Idea: SlavicG

Tutorial
Solution

• +50

By flamestorm, 5 months ago,

Thanks for participating!

1742A - Sum

Idea: flamestorm

Tutorial
Solution

1742B - Increasing

Idea: mesanu

Tutorial
Solution

1742C - Stripes

Idea: flamestorm

Tutorial
Bonus
Solution

1742D - Coprime

Tutorial
Solution

1742E - Scuza

Idea: mesanu

Tutorial
Solution

1742F - Smaller

Idea: SlavicG

Tutorial
Solution

1742G - Orray

Idea: SlavicG

Tutorial
Solution

• +58

By flamestorm, 7 months ago,

Thanks for participating!

1722A - Spell Check

Idea: mesanu, MikeMirzayanov

Tutorial
Solution

1722B - Colourblindness

Idea: flamestorm

Tutorial
Solution

1722C - Word Game

Idea: flamestorm

Tutorial
Solution

1722D - Line

Idea: flamestorm

Tutorial
Solution

1722E - Counting Rectangles

Idea: mesanu

Tutorial
Solution

1722F - L-shapes

Idea: MikeMirzayanov

Tutorial
Solution

1722G - Even-Odd XOR

Idea: mesanu

Tutorial
Alternate Tutorial Sketch
Solution

• +71

By flamestorm, 8 months ago,

Thanks for participating!

1703A - YES or YES?

Idea: flamestorm

Tutorial
Solution

1703B - ICPC Balloons

Idea: flamestorm

Tutorial
Solution

1703C - Cypher

Idea: mesanu

Tutorial
Solution

1703D - Double Strings

Idea: MikeMirzayanov

Tutorial
Solution

1703E - Mirror Grid

Idea: mesanu

Tutorial
Solution

1703F - Yet Another Problem About Pairs Satisfying an Inequality

Idea: flamestorm

Tutorial
Solution

1703G - Good Key, Bad Key

Idea: mesanu

Tutorial
Solution

• +72

By flamestorm, 9 months ago,

Thank you for participating in our contest! We hope you enjoyed it.

1698A - XOR Mixup

Hint
Solution
Implementation (C++)
Implementation (Python)

1698B - Rising Sand

Hint
Solution
Implementation (C++)
Implementation (Python)

1698C - 3SUM Closure

Hint
Solution
Implementation (C++)

1698D - Fixed Point Guessing

Hint
Solution
Implementation (C++)
Implementation (Python)

1698E - PermutationForces II

Hint 1
Hint 2
Hint 3
Solution
Implementation (C++)

1698F - Equal Reversal

Hint
Solution
Implementation (C++)

1698G - Long Binary String

Hint
Solution
Implementation (C++)

• +54

By flamestorm, 9 months ago,

Hi Codeforces!

ScarletS and I are glad to invite you to Codeforces Round 803 (Div. 2) which will be held on Jun/28/2022 17:35 (Moscow time). The round will be rated for participants with rating lower than 2100. The theme of the round will be déjà vu! (Wait, wasn't that already a theme before?)

Thanks to the people who made this round possible:

Thanks to NEAR for supporting this round, details can be found in this post.

You will have 135 minutes to work on (and solve!) 7 problems. At most one of the problems will be interactive. Make sure to read this blog and familiarize yourself with these types of problems before the round!

The scoring distribution is $250-500-1000-1500-2000-2500-3250$.

Good luck, and see you on the scoreboard!

UPD: Editorial is out!

• +494

By flamestorm, 9 months ago,

Thanks for participating!

1692A - Marathon

Idea: mesanu

Tutorial
Solution

1692B - All Distinct

Idea: mesanu

Tutorial
Solution

1692C - Where's the Bishop?

Idea: flamestorm

Tutorial
Solution

1692D - The Clock

Idea: SlavicG

Tutorial
Solution

1692E - Binary Deque

Idea: flamestorm

Tutorial
Solution

1692F - 3SUM

Idea: flamestorm

Tutorial
Solution

1692G - 2^Sort

Idea: flamestorm

Tutorial
Solution

1692H - Gambling

Idea: mesanu

Tutorial
Solution

• +48

By flamestorm, 11 months ago,

Hello Codeforces!

SlavicG, mesanu, MikeMirzayanov, Errichto, and I welcome you to Codeforces Round 790 (Div. 4). It starts on 10.05.2022 17:45 (Московское время).

The format of the event will be the same as before:

• ICPC rules with a penalty of 10 minutes for an incorrect submission;
• 12-hour phase of open hacks after the end of the round (hacks do not give additional points)
• after the end of the open hacking phase, all solutions will be tested on the updated set of tests, and the ratings recalculated
• by default, only "trusted" participants are shown in the results table (but the rating will be recalculated for all with initial ratings less than 1400 or you are an unrated participant/newcomer).

We urge participants whose rating is 1400+ not to register new accounts for the purpose of narcissism but to take part unofficially. Please do not spoil the contest for the official participants.

Only trusted participants of the fourth division will be included in the official standings table. This is a forced measure for combating unsporting behavior. To qualify as a trusted participant of the fourth division, you must:

• take part in at least five rated rounds (and solve at least one problem in each of them),
• do not have a point of 1400 or higher in the rating.

Regardless of whether you are a trusted participant of the fourth division or not, if your rating is less than 1400 (or you are a newcomer/unrated), then the round will be rated for you.

Many thanks to the testers: timreizin, magnus.hegdahl, Adam_GS, KrowSavcik, mister, pseudocoder10, jampm, Neophiliatic, Codula and of course _Vanilla_.

We suggest reading all of the problems and hope you will find them interesting!

Good luck!

UPD: the start of the round is delayed by 10 minutes.

UPD: Editorial is published!

• +240

By flamestorm, 11 months ago,

Thanks for participating!

1669A - Division?

Idea: SlavicG

Tutorial
Solution

1669B - Triple

Idea: Errichto

Tutorial
Solution

1669C - Odd/Even Increments

Idea: mesanu

Tutorial
Solution

1669D - Colorful Stamp

Idea: flamestorm

Tutorial
Solution

1669E - 2-Letter Strings

Idea: SlavicG

Tutorial
Solution

1669F - Eating Candies

Idea: MikeMirzayanov

Tutorial
Solution

1669G - Fall Down

Idea: MikeMirzayanov

Tutorial
Solution

1669H - Maximal AND

Idea: SlavicG

Tutorial
Solution

• +67

By flamestorm, 19 months ago,

Thank you for participating in our contest! We hope you enjoyed it. UPD: Implementations have been added.

1567A - Domino Disaster

Solution
Implementation (C++)
Video Solution

1567B - MEXor Mixup

Solution
Implementation (C++)
Video Solution

1567C - Carrying Conundrum

Solution (Observation)
Implementation (C++)
Video Solution
Solution (DP)
Implementation (C++)

1567D - Expression Evaluation Error

Solution
Implementation (C++)
Video Solution

1567E - Non-Decreasing Dilemma

Solution
Implementation (C++)
Video Solution

Solution
Implementation (C++)
Video Solution

• +237

By flamestorm, 21 month(s) ago,

Thank you for competing! I hope you had fun in the contest. UPD: Implementations have been added.

Short Solution
Editorial
Implementation

103150B - Arrowing Process

Short Solution
Editorial
Implementation

103150C - EZPC Sort

Short Solution
Editorial
Implementation

103150D - Moving Points

Short Solution
Editorial
Implementation

103150E - o

Short Solution
Editorial
Implementation

103150F - Palindromicity

Short Solution
Editorial
Implementation

103150G - Segmentation Fault

Short Solution
Editorial
Author's Note
Implementation

103150H - William Tell

Short Solution
Editorial
Implementation

103150I - X-OR XOR

Short Solution
Editorial
Implementation

• +100

By flamestorm, 21 month(s) ago,

### Hello, Codeforces!

I would like to invite you all to my first contest, EZ Programming Contest #1. It will be held on Jun/23/2021 18:35 (Moscow time). The round is not rated for anybody, since it is an unofficial contest.

The contest has $n$ problems, where $n$ is an integer satisfying $7 \leq n \leq 11$. You will have 2 hours and 30 minutes to solve the problems. The problems are meant to be about Div. 2 A, B, and C level, and they will not be sorted in order of difficulty. So, you can think of the problemset like if ICPC only went up to Div. 2 C.

A huge thanks to my testers wabadabakalakaboo, manish.17, and fishy15!

I know you all are filled with questions, so I'll try to answer them all now.

• Q: Is it rated?
• A: No.
• Q: Why did you write this contest?
• A: I have a lot of ideas for easy Div. 2 A, B, and C level problems, not all of which can get into a contest. I thought it would be fun to compile them all into one contest anyways, and hey, it might actually be good practice for beginners or just anyone who wants to practice solving these types of problems quickly!
• Q: Why didn't you propose the problems to other platforms?
• A: uuuuuuhhhhhh idk. I just thought it would be fun to give these problems to Codeforces, since that's where I do most of my competitive programming :P.
• Q: Do you think this will be good practice for beginners?
• A: Yeah! It's a long-form contest (2.5 hours), but I think all the problems are approachable by beginners.
• Q: Is there anything unusual about the format of the contest?
• A: The round is ICPC-style. I wanted to make it like ICPC but for early Div. 2 problems. This means that the problems won't be sorted in order of difficulty. So, I encourage you to read all the problems ;).
• Q: Is it rated?
• A: No.

Thank you all for reading this far. Good luck, have fun, and I hope to see you on the scoreboard!

UPD1: The editorial is out!

UPD2: Also, like most contests, I want to congratulate the winners, so here they are:

Overall winners (individual):

Div. 2 winners (individual):

Team winners:

1. Absalom: paramk, klexis, _webhub_

2. Sh00nya bata Sh00nya: dadboss, mexomerf, Athem

3. LeanMeanFightingMachines: KabirKanha, VAICR7BHAV, ProfessorChaos

4. Time Limit Defeated: Blitztage, a_manglani, suneet27

5. Bugged House: MvKaio, naniim

Thank you all so much for participating, and I hope to see you again soon!

Announcement of EZ Programming Contest #1

• +197