AkiLotus's blog

By AkiLotus, history, 6 weeks ago, In English

As far as I noted, Codeforces has had a guide for interactive problem since 2016.

I started Codeforces from middle 2017, and met my first interactive problem on August of that same year (843B - Interactive LowerBound). Honestly, it was a fun experience, though the solution was a bit out of expected convention for interactives.

Ever since, interactive to me has growth in its own way, even appearing in some more local contests as well. Yet, it seems to me that there were still a considerable portion of people having problems with those things even from their mind.

Ever from my first round in early 2019, someone already asked this.

first congrats on your first round second why interactive?

Umm...

Yep, along with that is a major lengthy discussion/prediction on the interactive problem (let's not talk about what happened after that).

Still, at those days, I simply gave them the benefits of a doubt. After all, the problem type is still novel, and there are a quadzillion ways to make an interactive problem function (other than the classic binsearch-simulation).

But that should be a thing back in 2019, right?

Well...

Then I saw this just a few days ago on announcement of Codeforces Round 988 (Div. 3).

...Really?

Okay, okay, but let's just put down my own personal hate on that comment and discuss seriously. If it's just a "new kind of fun", isn't it the same analogy towards the more advanced topics in lower rated participants' eyes? (i.e. flow, 2-SAT; though I honestly won't encourage raw implementations of such in a div3, of course). What is the problem with interactives that give many people an immediate frown even before seeing the problem itself?

The year is 2024 (no it's almost 2025 even what the heck) already, and why are interactives still uniquely discriminated?

(insert some funny propagating hashtags for interactive rights here, I'm a lame guy I can't make up one on the spot XD)

(the discussion I want to raise is still serious though)

Full text and comments »

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

By AkiLotus, history, 2 months ago, In English

Disclaimer: I only prepared ABCD and a little bit of F. For materials from other setters, please reach them and ask politely for permissions first.

All codes in this blog were initially written by me, and got standardized by Artyom123 (thank a ton!).

I will later attach a link with all the source codes below ready for download (I don't have access to my PC right now for this). Arguments used in problems is not available — I don't think mine was ever perfect, and you're free to experiment yourself.

2032A - Circuit

Briefings
thresholds.h
validator.cpp
generator_exhaustive.cpp (TC#2)
generator_generic.cpp (TC#3)
generator_maxima.cpp (TC#4)

2032B - Medians

Briefings
thresholds.h
validator.cpp
checker.cpp
generator_generic.cpp (TC#3)
generator_echo.cpp (TC#4-#10)

2032C - Trinity

Briefings
thresholds.cpp
validator.cpp
generator_exhaustive.cpp (TC#2-#7)
generator_generic.cpp (TC#8,#9,#12-#16)
generator_fibonacci.cpp (TC#10)
generator_fibonacci_stress.cpp (TC#11)

2032D - Genokraken

Briefings
genokraken.cpp
thresholds.cpp
validator.cpp
checker.cpp
interactor.cpp
generator_exhaustive.cpp (TC#2,#3)
generator_generic.cpp (TC#4,#7,#16)
generator_path.cpp (TC#30)
generator_tentacle_specified.cpp (TC#5,#6,#8,#9,#17,#18,#19)
generator_tentacle_weighted.cpp (TC#10-#15,#20-#29)

2032F - Peanuts

Briefings
thresholds.cpp
validator.cpp
generator_exhaustive.cpp (TC#2-#7)

Full text and comments »

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

By AkiLotus, history, 2 months ago, In English
README: Notice about solutions

2032A - Circuit

Author: AkiLotus
Development: AkiLotus
Hinter: AkiLotus
Editorialist: AkiLotus, Kuroni

Hint #1
Hint #2A
Hint #2B
Tutorial
Solution (C++)
Solution (Python 3)
Feedback

2032B - Medians

Author: Kuroni
Development: AkiLotus
Hinter: Kuroni
Editorialist: AkiLotus, Kuroni

Hint #1
Hint #2A
Hint #2B
Tutorial
Solution (C++)
Solution (Python 3)
Feedback

2032C - Trinity

Author: AkiLotus
Development: AkiLotus
Hinter: AkiLotus
Editorialist: AkiLotus, Kuroni

Hint #1
Hint #2A
Hint #2B
Hint #2C
Hint #3
Hint #4
Hint #5
Tutorial
Solution (C++)
Solution (Python 3)
Feedback

2032D - Genokraken

Author: AkiLotus
Development: AkiLotus
Hinter: AkiLotus
Editorialist: AkiLotus, Kuroni

Hint #1
Hint #2
Hint #3A
Hint #3B
Hint #4
Hint #5
Tutorial
Solution (C++)
Solution (Python 3)
Feedback

2032E - Balanced

Author: thanhchauns2
Development: thanhchauns2, Sagita_Phoenix
Hinter: AkiLotus
Editorialist: Kuroni, AkiLotus

Hint #1
Hint #2
Hint #3
Hint #4
Hint #5
Hint #6
Hint #7
Hint #8
Tutorial
Solution (C++)
Solution (Python 3)
Alternative tutorial (Kuroni, rephrased by AkiLotus)
Feedback

2032F - Peanuts

Author: MofK
Development: MofK, AkiLotus
Hinter: AkiLotus
Editorialist: MofK, AkiLotus

Hint #1
Hint #2
Hint #3
Hint #4
Tutorial
Solution (C++)
Solution (Python 3)
Feedback

Full text and comments »

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

By AkiLotus, history, 2 months ago, In English

I just feel like doing it, despite knowing that official one should come in less than a day after this blog post...

We might miss some proofs here and there (I only wrote this in half an hour, for quickie's sake), so we'd love to see your proofs contributing in the comments.

Special thanks to iristran911 for coding with me during the VC.

2033A - Sakurako and Kosuke

Tutorial

2033B - Sakurako and Water

Tutorial

2033C - Sakurako's Field Trip

Tutorial

2033D - Kousuke's Assignment

Tutorial

2033E - Sakurako, Kosuke, and the Permutation

Tutorial

2033F - Kosuke's Sloth

Tutorial

2033G - Sakurako and Chefir

Tutorial

Full text and comments »

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

By AkiLotus, history, 17 months ago, In English

Hello Codeforces!

This is not a round announcement, however.

I realize it's around 4 years since my last rated participation, and 3 years since my last problemsetting contribution. I think I have never said a proper goodbye to competitive programming since then.

I know, I know, this is not an airport, thus my departure is not mandatory. But after all, this is a free space of my blog entries after all. Besides, today is my 25th cake day, and I just feel nostalgic reflecting everything I have gone through. Thus, rather than just saying farewell, I'd like to, in an absolutely styled late attempt, jump on the trend and reflect on the past programming problems that I have authored.

My format would be a bit different though. I prefer to write in my own style and convey my thoughts the way I feel comfortable. ;)

Okay, first and foremost, I'll only consider those available in official Codeforces rounds. I've done quite a myriad of work in various local platforms that I couldn't even recall, so, yeah, pardon my goldfish memory.

1. Codeforces Round 538 (Div. 2) (Feb 2019)

Ah yes. The beginning of everything. I still remember working with cdkrot that day. They denied a whole bunch of simpleton ideas I've made back then. It was a struggle. At the end, I still somehow managed to pull out a proper Div.2 round. Would be cool enough.

Also, for a bonus, being able to cooperate with guys like GreenGrape and majk was a huge pleasure. And I can't thank you both enough.

# Problem Comments
1 1114A - Got Any Grapes? A classic Div2A problem. Nothing much.

The problem was crafted on the move, and the theme quickly followed with the might of our grape master here.

Also, who included the duck song here again? I can't recall, but yeah, this is the final touch for a good meme.

On a bonus note, I love that a full-fledged mincost maxflow solution actually passed this problem nicely.
2 1114C - Trailing Loves (or L'oeufs?) I honestly didn't realize this problem was well-known enough before that contest.

No, really. Nobody in the team warned me either, so I would assume this was safe to go.

The inspiration? Just my immense addiction with number theory and messing up with bases, that's it.

For a funny thing, I love the fact that people actually messed up the actual 0 digit with imaginary "0" one from character equivalent to a decimal value of "10"/"20"/etc.. Kek.
3 1114E - Arithmetic Progression The climax of the controversy in this round. Hehe.

This is kinda the most confusing problem to look back for me. It's simultaneously one of my proudest and worst work. We'll get through both.

For the "worst" aspect, the solution of this one seemed really, really discrete. Two sections of the interactions didn't even connect that well, it was like I tried to merge two problems into one.

But the best part... yes. The pretest fails. For a bit of context, at the beginning, the array would only have at most $$$10^5$$$ elements. However, I sensed some oddities in the randomization. I can't remember if it was from my script-generated input or my past model solution, but something didn't randomize properly in the range, slightly shifted to the left. At that point, I started digging into the GNU C++ library, and figured out the issue with rand(). From that moment, everything checked out. I started raising the size limit to $$$10^6$$$, and carefully tested to make sure I would generate a bunch of tests that would properly punish unwarranted randomization — which, you knew it, ended up as pretest 12 (and a bunch of other pretests after that). Honestly I felt really proud seeing you guys failing there a lot, I knew my doubt was on-point and I delivered quite a way to prevent this contest into a hackfest... or so I thought.

One last thing, the hacks on randomizers with timestamp-based seeds were not my doings. At all. I would never do something like that.
4 1114F - Please, another Queries on Array? This one isn't even fully original — I took the idea from a practice problem I'd encountered during my training. If I remember correctly, the original problem asked for segment product, here I asked for the totient value of that product. Should spice things up a bit for those not yet knowing the totient function's property, and that would be it. Quite a generic segment-tree D1C/D2E if you asked me.

2. Codeforces Round 554 (Div. 2) (April 2019)

The sequel. I have mixed feelings on it though. The problems were fine and safe enough, but I felt something was lacking. The breakthrough euphoria of the problemset wasn't really there this time, and I didn't really feel quite well. But at the end, it was a round going smoothly, and perhaps I couldn't have asked for more.

Funny that I only did one problem here despite being the representative again. But it can't really help, I was a bit overwhelmed (note that the two rounds are in pretty dense time span, and not to mention many of my ideas were also rejected as well).

# Problem Comments
1 1152B - Neko Performs Cat Furrier Transform At first I intended this as a pseudo-graph problem which required a very simple BFS traversal. At least, that was the safest solution there. To be frank, the operation limit is so lenient here that you can use your imagination to come up with anything, as long as it's proven correct. That's it. Perhaps my fun with this problem was with the long cat more than with the code.

3. Codeforces Round 614 (Div. 1)/Codeforces Round 614 (Div. 2) (Jan 2020)

Next hit. I actually got more time to prepare for this one, and even getting some new friends a long to cooperate with. Like, for obvious reasons, this should be my proudest work of all, despite there were still issues here and there. I felt like I really broke my limit that day.

For a bonus, trying to cooperate my favorite rhythm game into the theme was an unique experience. Although, seeing them again, many of the stories written (mainly D2A+D2B) were so horrible that the actual game's story writers would beat me to hell if they figured out. XD

# Problem Comments
1 1293B - JOE is on TV! I don't like how I wrote the backstory for this problem. XD

That aside, the inspiration coming to it was pretty neat to me, at the day I used to think of an old TV gameshow named "1 vs. 100" (or at least that was the English transliterated name? I don't remember the original Dutch one). The strategy going for this problem would also be simple by itself, so nothing special here.
2 1292B - Aroma's Search Maths. Again.

The thing with my math problems is, there would always be something indirect about the solution that forced people to look a bit deeper to find out. This was one of them, and the effort of investigating that indirect clue was really just "a bit" deep. I just loved this one however, it really put to show how powerful power functions could grow.

Now to the part I hate about it — the limits. Yes, I was really infuriated at people accusing me of weak testsets on this problem, and I swore to myself I have looked over everything I could. Until I saw one such solution that failed, to realize something I had swept away thinking "only a troll would do that". I was, either arrogant, or overestimating the lowest points. If I had actually lowered the limits, that would have helped quite a bit, but I didn't in the end. I felt like anything lower would make the test variety lost itself a bit, and might actually open up loopholes for pseudo/quasi-bruteforce solution that I hadn't realized.

Tch, what a dilemma.
3 1292D - Chaotic V. This is it. The pinnacle of my problemsetting career.

It went back a little bit with the theme of 1114E - Arithmetic Progression, which is throwing a mixture of aspects in a problem to make the hybrid end-result a harder one. This time, it worked better.

The pattern with my math-related problems wasn't that hard to figure out honestly, one would immediately suspect prime numbers and such the moment they saw my name on the author list (and as if that "lowest prime divisor" keyword wasn't obvious enough). From then, the situation would be simple:
- Figure out the whole network was a tree (this should be easy for anyone really thriving for Div1D hehe).
- Figure out how the tree is structured (if a subtree exists, what characteristics will its root have over all its descendants. In this case, it's the largest prime divisor).

Analyzing the core requirements would be enough to solve it, and this is the next part I loved in it. The solution would be really, really clean and neat, no need some complex copypasta libraries, just do your work. Heck, even my model solution in the editorial (the C++ one) just had about 70 lines, and that was counting all the declarations and such.

On a side note, it's cute to see this problem rated as 2700. I was initially afraid that it might be too easy, since after all, I was just a newcomer orange. But hey, it finally worked out way better than I expected!

4. Ozon Tech Challenge 2020 (Div.1 + Div.2, Rated, T-shirts + prizes!) (Mar 2020, collaborative work)

My last dance. Just some leftover ideas from the last one finding themselves places to shine.

# Problem Comments
1 1305D - Kuroni and the Celebration Glad that this interactive problem didn't cause any controversy.

I have a tendency of thinking on random problem ideas while sitting in a bus going either from home to campus and vice versa. This problem was the one using most of those moments in late 2019 and early 2020.

I just couldn't ask better here. The query structure and query limit surely hinted towards the solution, but not too obvious. Implementation might take a larger toll this time, but hey, that would worth a D-level (and a 1900). Heh, and to think 1114E - Arithmetic Progression was 2200 rated... XD

And that's it, my Codeforces portfolio fully recalled. Not too much in regular standards, but for a latecomer like me, this might just be enough.

For some final note, better have my thanks for neko_nyaaaaaaaaaaaaaaaaa for everything thus far in competitive programming. You have always been a thorn in my side in competitive days, and a true friend in real life, for both of those, I am really appreciated.

So, it's time to say goodbye. At least from Codeforces.

This profile would not be going anywhere, but I don't think I would resume to CP anytime too soon. I have my own life to clean up, and this sure will take a while.

Until next time.

Or perhaps, to my good friends, may we still see each other in the afterlife.

Full text and comments »

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

By AkiLotus, 5 years ago, In English

We apologize for the huge gap from F to G.
In the meantime, you can join the Discord server of AC — a competitive programming forum — here.

1305A - Kuroni and the Gifts

Author: Ari
Development: Ari, dorijanlendvaj
Editorialist: Ari

Tutorial
Solution (Ari, C++)
Solution (Akikaze, Java 8)
Solution (Akikaze, Python 3)

1305B - Kuroni and Simple Strings

Author: xuanquang1999 (remixed by antontrygubO_o)
Development: Ari, Kuroni, xuanquang1999
Editorialist: antontrygubO_o

Tutorial
Solution (Ari, C++)
Solution (Akikaze, Java 8)
Solution (Akikaze, Python 3)

1305C - Kuroni and Impossible Calculation

Author: antontrygubO_o
Development: antontrygubO_o, dorijanlendvaj, Kuroni, Ari
Editorialist: antontrygubO_o

Tutorial
Solution (antontrygubO_o, C++)
Solution (Akikaze, Java 8)
Solution (Akikaze, Python 3)

1305D - Kuroni and the Celebration

Author: AkiLotus
Development: AkiLotus, dorijanlendvaj
Editorialist: Kuroni

Tutorial
Solution (Akikaze, C++)
Solution (Akikaze, Java 8)
Solution (Akikaze, Python 3)

1305E - Kuroni and the Score Distribution

Author: antontrygubO_o
Development: xuanquang1999
Editorialist: antontrygubO_o

Tutorial
Solution (xuanquang1999, C++)
Solution (Akikaze, Java 8)
Solution (Akikaze, Python 3)

1305F - Kuroni and the Punishment

Author: Kuroni
Development: Ari, 265918, Kuroni, dorijanlendvaj, xuanquang1999
Editorialist: Ari

Tutorial
Solution (Kuroni, C++)
Solution (Akikaze, Java 8)
Solution (Akikaze, PyPy 3)

1305G - Kuroni and Antihype

Author: antontrygubO_o
Development: antontrygubO_o, Kuroni
Editorialist: antontrygubO_o

Tutorial
Solution (Approach #1) (kefaa2, C++)
Solution (Approach #2) (Kuroni, C++)
Solution (Approach #2) (pajenegod, PyPy2)

1305H - Kuroni the Private Tutor

Author: zscoder
Development: zscoder, ngfam, Kuroni, antontrygubO_o
Editorialist: zscoder

Tutorial
Solution (zscoder, C++)

Full text and comments »

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

By AkiLotus, 5 years ago, In English

"Can you hear me?"

"Vanessa...?"

Hello Codeforces!

We are here to invite you to Codeforces Round #614 (Div. 1) and Codeforces Round #614 (Div. 2), which will take place at Jan/19/2020 16:35 (Moscow time). The round is rated for both divisions.

This is our first round including Div.1 parts, hopefully you'll find the problems interesting. ;)

This round is themed based on the Rayark Inc.'s rhythm game, "Cytus II". You are about to help our characters in various problems, whether inside or outside of the virtual Internet! Also, feel free to listen to the music tracks I've chosen from the game for each problem (and later, editorial!). ;)

Each division will be given 6 problems to solve in 2 hours. The round's problems were prepared by Xuan-Quang xuanquang1999 D. Nguyen, Duy-Bach AkiLotus Le and Tuan-Dung low_ To.

Interactive problem(s) might be found in this round. Learn about them here.

We also want to thanks our friends for helping this contest being possible:

  • Our dear Codeforces coordinator Dmitry cdkrot Sayutin for reviewing our problems, and roasting a whole bunch of them as well. :D
  • Grigory vintage_Vlad_Makeev Reznikov, Quang-Minh MofK D. Nguyen, Yufan ouuan You and furry for helping us in preparing and adjusting difficulties of a few problems.
  • Anton antontrygubO_o Trygub, Duc-Trung Kuroni D. Dang and Duy-Thuc leduythuc Le for being our testers.

Last but not least, I want to give a huge appreciation to MikeMirzayanov for the awesome Codeforces and Polygon platform, which makes this contest possible.

Wish everyone good luck and high rating!

UPD1: Editorial is available here.

UPD2: Many more testers helped us in this round! Huge thanks to Kevin ksun48 Sun, Andrew ecnerwala He, Aydar aid Sayranov, Nikolay KAN Kalinin, Oleg Mustang98 Vallas, Mohammed mohammedehab2002 Ehab, Artem Rox Plotkin, Mingming Nero Zhang, Darko Aleksic, Ilya IlyaCk Porublyov, NatInTheHat and NIWIS!

UPD3: Score distribution:

  • Div. 1: 500-750-1250-1750-2250-2750
  • Div. 2: 500-750-1250-1500-2000-2500

UPD4: True editorial is available here!

UPD5: The contest is over. Thanks for participating, and here are the winners:

  • Div. 1:
  1. Um_nik (first to solve F)
  2. tourist (first to solve A, B, D and E)
  3. Benq
  4. HIR180
  5. jiangly
  6. TLE
  7. AprilGrimoire
  8. Golovanov399
  9. cz_xuyixuan
  10. fateice
  • Div. 2:
  1. DestinyFucker9000 (solved all Div.2 problems!)
  2. about
  3. Isaunoya
  4. espr1t
  5. Nephren
  6. the_happy_camel
  7. changruinian2020
  8. Agarifighter
  9. Small_Pax
  10. TaeHo0o00o0N

Also, as the direct setter of Div1B/Div2D, I sincerely apologized for the weak testsets. I must admit, I underperformed this time, and might cause some of you inconvenience. Hope to see you guys another time with a better contest.

Full text and comments »

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

By AkiLotus, 5 years ago, In English

All themes written by AkiLotus (I am the only one in the team playing Cytus II anyway :D).

1293A - КоннеР и A.R.C. Markland-N

Author: xuanquang1999
Development: xuanquang1999, AkiLotus
Editorialist: xuanquang1999, AkiLotus

Tutorial
Solution (Akikaze, C++)
Solution (Akikaze, Java 8)
Solution (Akikaze, Python 3)

1293B - JOE на телевидении!

Author: AkiLotus
Development: AkiLotus
Editorialist: AkiLotus

Tutorial
Solution (Akikaze, C++)
Solution (Akikaze, Java 8)
Solution (Akikaze, Python 3)

1292A - Игровой лабиринт Неко

Author: xuanquang1999
Development: xuanquang1999, AkiLotus
Editorialist: AkiLotus

Tutorial
Solution (Akikaze, C++)
Solution (Akikaze, Java 8)
Solution (Akikaze, Python 3)

1292B - Арома и её поиск

Author: AkiLotus feat. xuanquang1999
Development: xuanquang1999, AkiLotus
Editorialist: AkiLotus

Tutorial
Solution (Akikaze, C++)
Solution (Akikaze, Java 8)
Solution (Akikaze, Python 3)

1292C - Атака Ксенона

Author: xuanquang1999
Development: xuanquang1999
Editorialist: xuanquang1999

Tutorial
Solution (xuanquang1999, C++)
Solution (xuanquang1999, Java 8)
Solution (pajenegod, PyPy3)

1292D - Хаотичная В.

Author: AkiLotus
Development: AkiLotus
Editorialist: AkiLotus

Tutorial
Solution (Akikaze, C++)
Solution (Akikaze, Java 8)
Solution (Akikaze, PyPy 3)

1292E - Рин и неизвестный цветок

Author: low_ (furry Remix)
Development: low_, furry, AkiLotus
Editorialist: low_

Tutorial
Solution (Akikaze, C++)
Solution (Akikaze, Java 8)
Solution (Akikaze, Python 3)

1292F - Игрушки Норы

Author: xuanquang1999 × MofK
Development: xuanquang1999
Editorialist: xuanquang1999

Tutorial
Solution (xuanquang1999, C++)
Solution (xuanquang1999, Java 8)
Solution (xuanquang1999, PyPy 3)

Full text and comments »

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

By AkiLotus, history, 6 years ago, In English

1152A - Neko Finds Grapes

Author: xuanquang1999
Development: xuanquang1999, AkiLotus, GreenGrape
Theme development: AkiLotus, GreenGrape
Editorialist: xuanquang1999

Tutorial
Solution (xuanquang1999)

1152B - Neko Performs Cat Furrier Transform

Author: AkiLotus
Development: AkiLotus, xuanquang1999
Theme development: AkiLotus
Editorialist: AkiLotus

Tutorial
Solution 1 - Greedy (Akikaze)
Solution 2 - BFS (Akikaze)

1152C - Neko does Maths

Author: stefdasca
Development: stefdasca, AkiLotus
Theme development: xuanquang1999, neko_nyaaaaaaaaaaaaaaaaa
Editorialist: stefdasca

Tutorial
Solution (implemented by stefdasca)
Solution (implemented by Akikaze)

1152D - Neko and Aki's Prank

Author: cdkrot
Development: cdkrot
Theme development: xuanquang1999
Editorialist: cdkrot

Tutorial
Solution (_kun_)

1152E - Neko and Flashback

Author: xuanquang1999
Development: xuanquang1999
Theme development: xuanquang1999
Editorialist: xuanquang1999

Tutorial
Solution (xuanquang1999)

1152F1 - Neko Rules the Catniverse (Small Version)

1152F2 - Neko Rules the Catniverse (Large Version)

Author: MofK
Development: MofK, xuanquang1999, AkiLotus
Theme development: xuanquang1999, AkiLotus
Editorialist: MofK, AkiLotus

Tutorial - F1 (Small version)
Tutorial - F2 (Large version)
Solution F1 (xuanquang1999)
Solution F2 (xuanquang1999)
Solution F2 (veryheckingfast by MofK)
Bonus

Authors' logs (miscellaneous things during our preparations)

Full text and comments »

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

By AkiLotus, history, 6 years ago, In English

Once again, TREMBLE BEFORE THE MIGHTY OMEGALULRIPGRAPE.

(He last walked the Earth in round 538 btw.)

Hello Codeforces!

We are here to invite you to Codeforces Round #554 (Div. 2), which will take place at Apr/24/2019 17:35 (Moscow time).

The round will be rated for all Division 2 participants (with rating less than 2100), yet any Division 1 participants are welcome to join us out of competition.

The round will be cat themed. Raise your paws and prepare your catnips!

(Or even cat memes, while you're at it).

You will be given 6+1 problems ( 6 problems, one of them has 2 subtasks ) to solve in 2 hours. The round's problems were prepared by Xuan-Quang xuanquang1999 D. Nguyen, Duy-Bach AkiLotus Le, Stefan stefdasca Dascalescu, Quang-Minh MofK D. Nguyen and our dear Codeforces coordinator Dmitry cdkrot Sayutin.

Gladly (or sadly), no interactive problem tonight!

Also, the tribute should be given to everyone within the team — we all make it possible:

  • Andrew GreenGrape Rayskiy for various problem suggestions and the infamous OMEGALULRIP influence. ;)
  • Xuan-Tung neko_nyaaaaaaaaaaaaaaaaa Nguyen for testing the rounds and various suggestions in the core theme idea. Nya~.

Last but not least, I want to give a huge appreciation to MikeMirzayanov for the awesome Codeforces and Polygon platform, which makes this contest possible.

P/s: I will be at the Discord CP Community to discuss the problems after the coding phase. However, please follow the rules and don't discuss the problems during the contest by any means.

Wish everyone good luck and high rating!

P/s(2): Commies united!

P/s(3): A dear thank-you to Grigory vintage_Vlad_Makeev Reznikov for the last-minute complete testing as well! ;)

UPD1a: Another comrade, Quang-Minh MofK D. Nguyen joined the fun! Kudos for the problem suggestion! ;)

UPD1b: The problemset contains 6+1 problems ( 6 problems, one of them has 2 subtasks ).

UPD2: Score distribution: 500-1000-1500-2000-2000-(2250+750).

UPD3: Editorial will be available tomorrow. Sorry for the waiting, we have quite a lot of things to polish. ;)

UPD4: The contest is finished. I hope that you're satisfied. And here come our winners ;)

Official participants:

  1. hamzzq
  2. davidHernandes
  3. oiyoayao
  4. abandonedw1
  5. OnionGod
  6. IPL
  7. memset_inf
  8. dsgsjk
  9. FluffyT (the only official participants solved F1+F2, too bad she didn't solve E :<)
  10. _wxw_

Div.1 + Div.2 participants:

  1. dreamoon_love_AA (solved all problems!)
  2. pwild
  3. Sugar_fan
  4. hamzzq
  5. natsugiri
  6. kmjp
  7. davidHernandes
  8. Jeffrey
  9. betrue12
  10. KrK

UPD5: Editorial blog post is available.

Full text and comments »

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

By AkiLotus, 6 years ago, In English

Model solutions are now available.
GreenGrape and I will write more about problem F, including an alternative data structures (still quite tight on time limit) ;)

1114A - Got Any Grapes?

Author: AkiLotus, GreenGrape
Development: AkiLotus, GreenGrape, neko_nyaaaaaaaaaaaaaaaaa
Editorialist: AkiLotus

Tutorial
Solution (Akikaze)

1114B - Yet Another Array Partitioning Task

Author: xuanquang1999
Development: AkiLotus, xuanquang1999
Editorialist: xuanquang1999, neko_nyaaaaaaaaaaaaaaaaa

Tutorial
Solution (xuanquang1999)

1114C - Trailing Loves (or L'oeufs?)

Author: AkiLotus
Development: AkiLotus, majk, cdkrot
Editorialist: AkiLotus

Tutorial
Solution (Akikaze)

1114D - Flood Fill

Author: neko_nyaaaaaaaaaaaaaaaaa
Development: AkiLotus, neko_nyaaaaaaaaaaaaaaaaa, cdkrot
Editorialist: neko_nyaaaaaaaaaaaaaaaaa, cdkrot

Tutorial
Solution 1 (_kun_)
Solution 2 (neko_nyaa)

1114E - Arithmetic Progression

Author: AkiLotus
Development: AkiLotus, GreenGrape
Editorialist: AkiLotus, xuanquang1999

Tutorial
Solution (Akikaze)

1114F - Please, another Queries on Array?

Author: AkiLotus, cdkrot
Development: AkiLotus, GreenGrape, cdkrot
Editorialist: AkiLotus, GreenGrape, cdkrot

Tutorial
Solution 1a (_kun_)
Solution 1b (Akikaze) [literally kun's solution, yet shorter, and a bit uglier :P]
Solution 2 (GreenGrape)

Full text and comments »

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

By AkiLotus, history, 6 years ago, In English

TREMBLE BEFORE THE MIGHTY OMEGALULGRAPE

Hello Codeforces!

We are honored to invite you to Codeforces Round #538 (Div. 2), which will take place at Feb/10/2019 17:05 (Moscow time). The round will be rated for all Division 2 participants (with rating less than 2100). Still, we warmly welcome Division 1 participants to join us out of competition.

You will be given 6 problems to solve in 2 hours. The round's problems were initially prepared by Duy-Bach AkiLotus Le, Xuan-Tung neko_nyaaaaaaaaaaaaaaaaa Nguyen and Xuan-Quang xuanquang1999 D. Nguyen.

There will be an interactive problem in this round. Learn more about interactive problems here.

This is our first attempt in making a Codeforces round, so suggestions are much welcome to help us improve ourselves. ;)

We also want to thanks many friends for making this round possible:

  • Dmitry cdkrot Sayutin for coordinating the round, providing a neat idea on one problem and some Russian translations.
  • Andrew GreenGrape Rayskiy for various suggestions on the problems, some other Russian translations, and most importantly, peacefully submitted himself to be quarantined from pretests. ;)
  • Michal majk Svagerka for testing the round.
  • And last but not least, Mike MikeMirzayanov Mirzayanov for the amazing Codeforces and Polygon platform, without which this round would never be possible :D

P/s: I will be at the Discord CP Community to discuss the problems after the coding phase. However, please follow the rules and don't discuss the problems during the contest by any means.

Wish everyone good luck and high rating!

UPD1: Score distribution: 500-1250-1500-2000-2000-2750

UPD2: Editorial is published.

UPD3: The contest is finished. I apologized for the "somewhat" weak pretests at here and there. Anyway, time to celebrate our winners ;)

Official participants:

  1. xlk200
  2. vasilescu_mihai
  3. Cirno_9baka
  4. africamonkey
  5. 2019_BecameMaster
  6. cdsfcesf
  7. yww_AFO
  8. hr_tian_xia_di_2
  9. JZmster
  10. chinmay0906

Div.1 + Div.2 participants:

  1. Hazyknight
  2. tfg
  3. tempura0224
  4. xlk200
  5. sava-cska
  6. mango_lassi
  7. I_love_Tanya_Romanova
  8. ec24
  9. vasilescu_mihai
  10. Cirno_9baka

Full text and comments »

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

By AkiLotus, history, 6 years ago, In English

Since the original data has been lost during the dark days of Codeforces, no version of the editorial has been re-released, and I feel the round itself is quite educational, so I decided to give a try.

390A - Inna and Alarm Clock

Approach
Solution 1 (Map)
Solution 2 (Array)

390B - Inna, Dima and Song

Approach
Solution

390C - Inna and Candy Boxes

Approach
Solution

390D - Inna and Sweet Matrix

Approach
Solution

390E - Inna and Large Sweet Matrix

Approach
Solution

Full text and comments »

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

By AkiLotus, history, 6 years ago, In English

First note: All observations are from my computer screen with the resolution of 1366 × 768. OS is Windows 10, browsing Codeforces using Google Chrome and coding using Code::Blocks 17.12. People with high-end computers/monitors or different software usages might experience differently or less inconvenient, yet the problem itself is still there.

TL;DR: The source codes presented through the "block code" format in Codeforces blog post should be made slightly smaller in terms of font size, and with less line spacing. A suggestion might be making it similar to the source code presented in the submission pages.

Many problem setters prefer showcasing model solutions on spoilers and direct sourcecode-formatting on blog posts (most notable ones are PikMike and Vovuh). I myself particularly enjoy this design, since the source code is collapsible and you won't lose the editorial tab you're watching (clicking any external links normally will not open it in a new tab, so sometimes it'd be annoying). However, the way the source codes are formatted seems to discourage some people (including me) from reading it.

I know reading source codes should be the last resort, if the editorial texts failed to explain things to you or the implementation intended in some parts was too complex that words couldn't make it. However, there has to be some times for some people to rely on this feature, and if that time comes, it should be made right.

Let's take the editorial blog post of Codeforces Round #515 for example.

Our target is problem D's solution by Vovuh.

Let's assume that I'm a newcomer intending to read the model solution. And this should be how the webpage is positioned when I open the source code (even this one is quite optimal):

Doesn't seem right. I can't even read the main function yet (the I/O optimization doesn't make up anything of the solution, and the find() function above is obviously not the total solution).

And by my estimation, the full solution takes up 1.5 screens. For anyone that have solved 1066D - Boxes Packing, the model solution can't be that tremendously long right?

So I copy-pasted the solution and submitted it to some random problem (I don't want to get another AC, just to test the source code representation). And this is what I have (submission link here):

It fits in just right. Difference in the very same platform.

Let's take another example. The target is the editorial blog post of Educational Codeforces Round 53 — to be specific, problem G and its model solution by adedalic.

And I have this:

Oh great. Now I can't even read anything further than macros and constant declarations.

To be honest, this one is a long solution indeed (compared to model solutions for casual problems). Let's diagnose deeper.

I copied the source code into my IDE. The source code is 175 lines long, and a screen in my IDE can show 39 lines:

Previewing it in Codeforces' submission page results in this (the link is here):

54 lines of source code visible. Technically it's similar to my IDE, just the full screen makes the result better a bit.

And in the blog post:

36 lines. 33.33% fewer than the submission pages. The rate is incredibly high.

Then what causes such differences?

Looking into the two screenshots again, we can see two points:

  1. The font size in the blog post is slightly bigger than in the submission pages. This one might be neglected in some extents, since smaller fonts might affect people with low visibility. Still, if the submission pages work right, then why can't the blog post be the same?
  2. This one is much more significant. The line spacings in the blog post is way wider and unnecessary. In the submission pages, the line spacing's width is from about to that of the line itself, while it's about the size in the blog posts.

Why am I complaining about this? How could the codes being presented in more spaces discourage people from reading it?

Let's make it simple. The model solution, hence its name, is something people would look at, not just to learn about the algorithms for the problem, but also coding experience from the problem setter himself/herself.

Let's assume every setter has for oneself model solutions which are nice, short and clean (as far as he/she can achieves). The short quality is ruined critically by the formatting. Imagine it, the source code is made one-third longer than usual, causing the hallucinogenic effect that makes people more prone to give up reading (since we all naturally feel tired within ourselves to read something long, at some extents depending on each individual). Therefore, the effect and purpose of publishing the source code is halved, and of course, the good efforts created by the setters are poorly wasted.

A solution for this issue can be simple. As I might have stated implicitly throughout the post, there exists two types of formatting source codes, one is worse in terms of UX than another — so why can't we replace it with the better one?

These are my analysis and opinions. I hope the administrators/moderators of the platform will look into this and provide some solutions to improve the satisfaction for both the users and the setters/solution writers.

Best regards.

Full text and comments »

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