arvindr9's blog

By arvindr9, history, 8 months ago, In English

Hello, Codeforces!

Since I've recently been doing contests more frequently, I'm going to stream myself doing think-cell Round 1 this Tuesday!

The stream will be on Tuesday March 25 at 9am Eastern Time. You can watch the stream in my Twitch channel. See you soon!

Full text and comments »

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

By arvindr9, history, 17 months ago, In English

Hello, Codeforces!

I'm going to stream myself doing a past Educational Codeforces round Educational Codeforces Round 147 in under 12 hours from now!

The stream will be on Saturday June 10 at 7:30am Pacific Time You can watch the stream in my Twitch channel. See you soon!

Full text and comments »

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

By arvindr9, history, 20 months ago, In English

Hello Codeforces!

I will be streaming myself doing a virtual contest of Codeforces Round 858 (Div 2) on Saturday March 18, at 7:30am Pacific Time. This is 25 min after the end of the contest, so most likely (fingers crossed) the systests will be done by then.

I will be streaming this on Twitch. See you then!

Full text and comments »

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

By arvindr9, history, 22 months ago, In English

Hello Codeforces, and happy new year!

I have decided to resume streaming myself doing virtual contests, after a gap in 2022. I will stream myself doing Educational Codeforces Round 141. The stream will take place tomorrow January 9 at 9am Eastern, and will run on my Twitch channel.

See you then!

Full text and comments »

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

By arvindr9, history, 3 years ago, In English

Hello everyone! I will be streaming myself doing Educational Codeforces Round 17 on Tuesday November 30 from 6:30 — 8:30 am EST. You will be able to watch the stream on my Twitch page

I have included recordings to some of my past streams in my YouTube channel. Smash the subscribe button!

See you then!

Full text and comments »

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

By arvindr9, history, 3 years ago, In English

Hi everyone,

I will be streaming myself doing a virtual for Codeforces Round #752 Div1 from 6:30 — 8:30 AM EST on November 19 (< 8 hours from now!).

You can see the stream at my Twitch page

Full text and comments »

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

By arvindr9, history, 3 years ago, In English

Hi everyone!

I will be streaming myself upsolving some problems. I am planning on trying some Opencup problems (I’ve been working on trying to upsolve https://codeforces.me/gym/102994/ ).

The stream will be on November 11 from 6 — 8:30 AM EST, and will be run from my Twitch channel

See you there!

Full text and comments »

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

By arvindr9, history, 3 years ago, In English

Hello everyone!

I will be streaming myself upsolving a few problems that I’ve been meaning to for a while.

Some of the problems I plan to look at (graph-related problems) are https://codeforces.me/contest/1341/problem/E https://codeforces.me/problemset/problem/1064/D

The above problems are maybe not particularly difficult for some, but they are problems that I remember struggling at when I saw them.

The stream will be on November 4 from 6:30 — 8:30 EST (12 hours from now!). It will take place in my Twitch channel

See you soon!

Full text and comments »

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

By arvindr9, history, 3 years ago, In English

Hi everyone!

I’m glad to say that I have just regained Master! In order to motivate myself to practice further, I will be running another stream, where I will be doing Codeforces Round 751 Div 1 on Thursday October 28 from 6:30 — 8:30 AM EST.

You will be able to watch it on my Twitch page.

See you then!

Full text and comments »

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

By arvindr9, history, 3 years ago, In English

Hi everyone!

I will be streaming myself upsolving Educational Codeforces Round 115 on Tuesday 10/19 from 6:30 — 8:30 AM EST at my Twitch page.

I had 64 unique viewers (and a max of 7 simultaneous users) my last stream, which was fantastic! Seems like I figured out how to configure the video and audio settings during my last stream, so hopefully things should run more smoothly this time.

This will be recorded (I also have the recording of stream 2, and will make that accessible soon).

See you then!

Full text and comments »

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

By arvindr9, history, 3 years ago, In English

Hi everyone!

I will be streaming myself doing Educational Codeforces Round 115 on Thursday 10/14 from 6:30 — 8:30 AM EST at my Twitch page

My goal this time is to have more than 5 viewers! (My previous stream had 5 viewers). I’ll comment in this blog right before I start to remind people about the stream. I’m relatively new to OBS, but I will try to have some kind of recording of this stream.

Full text and comments »

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

By arvindr9, history, 3 years ago, In English

Hi Codeforces!

I’ve decided to try streaming. Given that I was very active in competitive programming last year during Covid and have recently been inactive during the start of the new school year (and have gotten very rusty :p ), I have decided to revive my involvement in competitive programming by trying streaming.

I will be streaming myself doing Codeforces Global Round 16 tomorrow Sept 14 from 6:30 — 9 am EST. In order to free up the rest of my day to do other work / destress, I will be streaming early in the morning in my timezone (EST).

You will be able to find the stream at my Twitch profile https://www.twitch.tv/arvindr9

Full text and comments »

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

By arvindr9, history, 4 years ago, In English

I was in the process of upsolving Codeforces Round 707. I'm not quite sure how to do 1C, and the editorial seems a bit difficult to understand.

It seems like I'm not the only one who is having difficulty understanding the editorial 1C. Thanks to towrist for posting a comment asking about why the $$$O(nm^2)$$$ solution works (here), which received 16 upvotes (many of whom I'm presuming also are unsure about that portion of the editorial).

I'm afraid there is not any clear solution that anyone has access to (one can only read accepted codes and watch ecnerwala's stream. On another note, I thank NiceClock for sending a link to code though, which seems rather elegant (here)). I would like there to be a clear explanation to on how to solve the problem though.

Most of the comments in the editorial blog post are about Div2 A — D, and I am thus creating a separate blog post for us to have a clutter-free area to discuss this problem. I personally feel that this seems like an interesting problem, and many people will hopefully be benefited by having a place to discuss the solution to it.

Full text and comments »

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

By arvindr9, history, 5 years ago, In English

;tldr requesting practice problems with clever solutions (warning: spoilers ahead!)

When I was doing this problem, one of my first observations (and probably many others') was that if $$$n$$$ is in the form $$$2^k - 1$$$ then you can greedily keep doubling the number of bacteria. Then, I proceeded to finding when I should stop doubling and seeing how many bacteria I should split in the next one or two steps. Finding the last one to two splits was quite inelegant, as can be seen here. This actually took me several hours to get AC (I spent a lot of time doing work on paper to get the inequalities to compute delta correctly).

Then, I read the editorial, and it was much more elegant! It was based on my observation that you can double in the beginning, but rather than adding one to two elements at the end, it adds $$$n - s$$$ (where $$$s$$$ is the total mass after doubling) such that the list is in sorted order.

I think that one of the reasons I had such a complicated solution was that I might have not had sufficient practice with problems that involve making an observation and making a clever step that makes it trivial.

Another example is the following GCJ 2020 Round 1a problem. I had the observation that each row of the Pascal's triangle has sum $$$2^k$$$ but wasn't sure how to get rid of the extra $$$1$$$'s when constructing the binary representation -- the editorial gives a clever way to get around this.

Feel free to include practice problems where you can make a clever step to trivialize / simplify the problem in the comments below! Problems of different difficulty levels are welcome.

Full text and comments »

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

By arvindr9, history, 5 years ago, In English

I was doing the following problem: https://csacademy.com/contest/ioi-2016-training-round-5/task/balanced-string/

Basically, given a string $$$S$$$ of $$$A$$$'s and $$$B$$$'s, you want to determine whether for any two circular substrings of $$$S$$$ of the same length $$$l$$$ ( $$$1 \leq l \leq N, 1 ≤l≤N$$$ ) the number of As in the first substring and the number of As in the second substring differ by at most 1. (A circular substring is basically a substring that can wrap around S, such as $$$[S_n, S_1, S_2]$$$).

The solution in the editorial seems elegant, but I'm not sure how to prove its correctness.

Any comments about why the solution is correct are appreciated.

Full text and comments »

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

By arvindr9, history, 7 years ago, In English

The link to the problem can be seen here: http://naipc.uchicago.edu/2017/_static/naipc2017.pdf

Basically the problem gives a list of strings of parentheses (not necessarily valid) and asks to find the length of the longest valid string of parentheses by concatenating some of the strings from the list.

I was looking at the solution here: http://www.cs.ucf.edu/~dmarino/progcontests/mysols/northamerica/2017/pieces.java

The solution involves placing the strings into a vector and then ordering them based on low (the min value of open minus closed over all intermediary characters) then diff (open minus closed) then length. Then, DP is used to find the longest length that results when concatenating a subsequence from the vector into a valid string of parentheses.

What I am confused about is why the vector can be sorted that way. This seems to imply that any set of strings that form a valid string of parentheses can be rearranged in the sorting order explained above and still form a valid set of parentheses. This seems intuitive (of course you want to have a nonnegative low value for the first string and you want a positive diff value for more open parentheses at the beginning of the string), but why does this work?

If anything I said was unclear, please let me know. Thanks!

Full text and comments »

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