arvindr9's blog

By arvindr9, history, 11 days 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!

Read more »

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

By arvindr9, history, 3 weeks 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

Read more »

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

By arvindr9, history, 4 weeks 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.com/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!

Read more »

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

By arvindr9, history, 5 weeks 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.com/contest/1341/problem/E https://codeforces.com/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!

Read more »

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

By arvindr9, history, 6 weeks 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!

Read more »

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

By arvindr9, history, 7 weeks 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!

Read more »

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

By arvindr9, history, 2 months 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.

Read more »

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

By arvindr9, history, 3 months 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

Read more »

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

By arvindr9, history, 9 months 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 mshiladityam 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.

Read more »

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

By arvindr9, history, 19 months 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.

Read more »

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

By arvindr9, history, 22 months 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.

Read more »

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

By arvindr9, history, 4 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!

Read more »

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