orz's blog

By orz, history, 12 months ago, translation, In English

Today I participated in Codeforces Round 887 (Div. 1). My experience was terrible (I wasn't able to solve 1852A - Ntarsis' Set during the contest, hope it tells you a lot), but it's still recorded, so hopefully it'll be useful for somebody. As usual, during the first half I participate while explaining aloud what and how I do, during the second part I explain more slowly the solutions of Div.1 problems A–D.

Note that the audio is quite high quality, and the high-quality video is coming in a couple of hours (Youtube is still processing it right now).

https://www.youtube.com/watch?v=2Dvi4WdFliM

UPD: The video now is high-quality.

Full text and comments »

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

By orz, history, 14 months ago, In English

Congratulations to Ormlis for taking the first place in a public Div. 1 Codeforces contest for the first time!

Full text and comments »

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

By orz, history, 16 months ago, In English
  • Vote: I like it
  • +46
  • Vote: I do not like it

By orz, history, 16 months ago, In English

Today I screencast and explained solutions of problems A–D and F. The video is uploaded to YouTube: https://youtu.be/B48ykX0NpUY

I have to inform that the round quality wasn't exceptionally high: the translation was noticeably Google translated from Russian (for example, представление has at least two meanings — representation or performance, and Google Translate wasn't able to discriminate between these two), the pretests were weak in B, C and F (many people were simply TL-hacked or had their solution fail during system testing). I will elaborate on problem F: there I wrote a square root decomposition with incorrect constants, but still got AC though my solution was incorrect on these simple tests:

2 3
2 2

and

4 24
5 5 5 5

With the first of these, I was able to uphack six accepted solutions, including my own.

Nevertheless I knew what to expect (I call such rounds contests for schoolchildren) and overall experience was satisfactory.

Full text and comments »

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

By orz, history, 19 months ago, In English

Good Bye 2022: 2023 is NEAR finished, and I participated in it with usual explanations of everything that I do and with editorial of A–E in the end. You're welcome to watch, the video is already on the channel!

https://youtu.be/VBOi99QMfTw

Full text and comments »

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

By orz, history, 19 months ago, In English

Two days ago Northern Eurasia Finals 2022 took place, mirror of which was on Codeforces: 2022-2023 ICPC, NERC, Northern Eurasia Onsite (Unrated, Online Mirror, ICPC Rules, Teams Preferred). In the next few hours the standings got unfrozen, thereby we know the list of the teams that qualified to the ICPC Finals this year:

1st place 🏆 MIPT: Yolki-palki (Pechalka, Kapt, Tikhon228)

2nd place 🥇 HSE: FFTilted (Kirill22, teraqqq, Ormlis)

3rd place 🥇 SPb SU: Urgant Team (sava-cska, 74TrAkToR, orz)

4th place 🥇 Belarusian SU: 1: Dungeon Thread (Septimelon, RED_INSIDE, programmer228)

4th place 🥇 SPb ITMO: pengzoo (iakovlev.zakhar, DishonoredRighteous, golikovnik)

12th place 🥉 Innopolis: U A (Farhod, Mprimus, Laggy)

14th place Kazakh-British TU: DeoxyriboNucleic Acid (amanbol, Na2a, DimmyT)

15th place SPb HSE: Just3Keks (Xrite, vmos1999, NeKpoT)

20th place Nazarbayev U: wf or gf? (dulatcodes, CMaster, krauch)

23rd place AITU: 1 (Muratov, Aliaidar, Kamzabek)

24th place Moscow SU: apes together strong (voyrus, Vladithur, revelcoS)

27th place BSUIR: #1: So stuffy (kartel, p3rfect, romarkovets)

Congratulations to everyone aforementioned!

Full text and comments »

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

By orz, history, 20 months ago, translation, In English

I started coding after I discovered LOUD Enough's cp journey, they showed me that all three barracks can fall simultaneously within first ten minutes of Survival Chaos round

so thank you, tranquility, nikgaevoy, Kaban-5 for your introduction to the CP world

In my deepest gratitude I've drawn all three some of you solving questions on Codeforces site

As Makoto Soejima said, never give up!

please don't down vote, it's my first blog post

Full text and comments »

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

By orz, history, 20 months ago, In English

After a bit of a pause I release a new video on my channel — screencast of explanation Codeforces Round 833 (Div. 2). Although my participation was not that successful, I solved five problems and explained all six problems in the video. Feel free to watch!

Full text and comments »

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

By orz, history, 20 months ago, In English

turmax orz on becoming an LGM recently!!!

Full text and comments »

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

By orz, history, 20 months ago, In English

Today demon1999 pleases us with a wonderful holiday — she turned 23 today. Thank her for this!

Full text and comments »

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

By orz, history, 22 months ago, In English

Today there were two nice contests in a row: AtCoder Regular Contest 149 and Codeforces Round 824 (Div. 2). I participated in both of them.

  1. My participation in AtCoder Regular Contest 149 was quite a failure, I neither speedforced nor solved any of the harder problems. The video is already on my channel: https://youtu.be/3D1IbPtrLWg

  2. My participation in Codeforces Round #824 (Div. 2) wasn't a failure, I even finished second! (And this is my by far the most successful participation in an unrated round.) The video is uploaded but still processing, so soon you will be able to watch it. As always, a nice bonus is a detailed editorial in the end of the video: https://youtu.be/fbFAg1th5oM

Subscriptions, comments, likes, watches and other ways of expressing feedback are welcome!

UPD. Now both videos are watchable. Enjoy!

Full text and comments »

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

By orz, history, 22 months ago, In English

Dear everyone,

As always, my screencast and detailed analysis of problems A–G of Codeforces Global Round 22 is already uploaded (but still processing for high-quality viewing) on the channel. This time the video is huge — over five hours!

Please watch, enjoy, learn, comment — anything you want!

UPD. The video is ready for viewing.

Full text and comments »

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

By orz, history, 22 months ago, translation, In English

Honestly, I don't really like contests carried out by giants like Google and Meta. While participating I feel some sort of permanent malaise, it seems like giants simply ignore all experience of how contests are run by Codeforces and AtCoder. But today I went as far as I have never gone before — I took 201st place at the Meta Hacker Cup 2022 Round 2 and advanced to Round 3 (preceding the final one). I do not hope that I will go to the finals, but for me participating in Round 3 is already as cool as in a final one!

A recording of my participation can be viewed here.

Full text and comments »

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

By orz, history, 22 months ago, In English

Today I participated in Codeforces Round 819 (Div. 1 + Div. 2) and Grimoire of Code Annual Contest 2022. At first glance, this was really a nice contest, and even though some problems were a bit too technical, they did contain some certain ideas (and as to whether these ideas were cool and beautiful, I guess there's no accounting for taste). However, the tests in the harder problems weren't strong enough. For example,

Nevertheless, I screencast the solving process (with my struggling to solve 1726F - Опоздать на работу (отправка решений запрещена)) and explanation of problems A–F, and I am now uploading it to YouTube, the video should appear here in several hours. Please leave your feedback (and other cases of high- or low-quality testing in this contest) in the comments!

UPD: While I was sleeping, two news have happened:

  1. The video uploaded successfully.

  2. The round became unrated because of the problem F, from which I suffered a lot during the contest. (By the way, the suffering had nothing to do with the quality of the tests in this problem or with this issue, I just made stupid bugs). You may read this and this blog to get to know the incident.

Full text and comments »

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

By orz, history, 23 months ago, In English

I got to the 41st place in Codeforces Round 814 (Div. 1), which quite surprised me because my last several contests were also pretty lucky, not to say in this contest I was extremely slow in solving the problem A. Still I followed the tenet from the never_giveup's handle and finished the contest, it happened to be not that bad. Moreover, I beat my personal best of rating. I screencast and explained 1718A2 - Burenka and Traditions (hard version), 1718B - Fibonacci Strings, 1718C - Tonya and Burenka-179 and partly 1718D - Permutation for Burenka from this contest here: https://youtu.be/6iaSJikYZ-o

Feel free to watch and leave your invaluable feedback!

Full text and comments »

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

By orz, history, 23 months ago, In English

Since there were not that many Div. 1 rounds last several days, I decided to compete in a Div. 2 round. This time my participation was quite poor, but still I solved and explained some of the problems in front of a camera, so I hope that my video will be useful for my adorable viewers: https://youtu.be/ZF42Y5cQhf4

As with my previous video, any sort of feedback is welcome in the comments.

Full text and comments »

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

By orz, history, 2 years ago, In English

Recently I started screencasting my contests, there are already several videos on my channel. They all are in Russian because I ponder in Russian.

Today, as an experiment, I decided to screencast CodeTON Round 2 and comment my actions in English. Yes, my reasoning is often fragmentary there (because under the pressure of time I cannot spend much time explaining a lot of things rather than start coding). Still, since I finished 24th I expect it to be rather entertaining content, thus I invite you to watch the process: https://youtu.be/ZK8vVVhoQXI

Since I am very new to exploring this niche, any sort of advice of improving the quality of my videos is highly welcome here in the comments, on the Youtube, or in my PM.

Full text and comments »

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

By orz, history, 2 years ago, translation, In English

Several days ago I published a table with first people to reach certain ratings. It featured only ratings above 1500, and adamant advised to do the same, but on achieving ratings below 1500. I found it quite interesting, and, after several days of collecting data about participations of 447911 Codeforces users, I finally made this table.

Full text and comments »

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

By orz, history, 2 years ago, translation, In English

Several days ago I published a table with first people to reach certain ratings. It was a bit raw because, firstly, it was based on top 20000 Codeforces users by rating, and, secondly, because it only gave information about ratings divisible by 50. Now I have prepared a table that is of more complex design, but both issues are resolved. Good luck understanding what is going on in it.

Full text and comments »

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

By orz, history, 2 years ago, In English

Hi there!

Recently after Codeforces Global Round 21 Um_nik noticed that he might be the ninth or tenth person to reach 3600 rating points, but still he did it earlier than Petr. I wondered whether Um_nik really was that attentive to know for sure how many people reached 3600 before him. As this is an objective truth or an objective misconception, I decided to simply check it.

Full text and comments »

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

By orz, history, 3 years ago, translation, In English

Consider the following problem: given three integers $$$x$$$, $$$y$$$ и $$$m$$$, $$$0 \leqslant x,y < m < 2^{32}$$$, calculate $$$xy\bmod m$$$. The easy way is just to multiply these numbers and apply the modulo operation:

uint32_t prod(const uint32_t x, const uint32_t y, const uint32_t m)
{
	return x * y % m;
}

As you might have guessed, this solution is wrong. The thing is that an overflow is possible in such a procedure: the operation x * y is performed in the typeuint32_t, and in fact the intermediate result of this operation will not be $$$xy$$$, but $$$xy\bmod2^{32}$$$. If after that we take the result modulo $$$m$$$, it may differ from the correct one:

$$$ \left(xy\bmod2^{32}\right)\bmod m\ne xy\bmod m. $$$

The way out is simple — you need to multiply in a larger type:

uint64_t prod_uint64(const uint64_t x, const uint64_t y, const uint64_t m)
{
	return x * y % m;
}

If you do this, then, since $$$xy<2^{64}$$$, this product will definitely not overflow, and after taking the result modulo, you will get the correct answer.

The question is: what if $$$x$$$, $$$y$$$ and $$$m$$$ can be greater than $$$2^{32}$$$?

Full text and comments »

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

By orz, history, 3 years ago, In English

IMO 2021 closing ceremony is taking place now.

Top countries were:

  1. People's Republic of China, 208 points
  2. Russian Federation, 183 points
  3. Republic of Korea, 172 points
  4. United States of America, 165 points
  5. Canada, 151 points

English: https://youtube.com/watch?v=LHi_xjvLEbI

Russian: https://youtube.com/watch?v=23cTkofxbq4

Full text and comments »

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

By orz, history, 3 years ago, In English

IMO 2021

IMO 2021 opening ceremony takes place right now. Join the chat!

Russian: https://www.youtube.com/watch?v=c3APd3bCrFI

English: https://www.youtube.com/watch?v=DpZnQuUI27Y

Full text and comments »

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