Codeforces may be unavailable between Sept. 29, 18:00 (UTC) to Sept. 29, 20:00 (UTC) due to a maintainence. ×

### mujtaba1747's blog

By mujtaba1747, history, 3 years ago,

I recently came to know about Small to Large trick from a blog.

It is useful technique and helps to improve O(N^2 * log(N)) to O(N*log^2(N))

Can someone please share links to few problems based on the same trick.

• +18

By mujtaba1747, history, 3 years ago,

I recently got to know about Tree Flattening using a DFS Traversal. Can someone suggest some nice problems on the same. Thanks!

• +8

By mujtaba1747, history, 3 years ago,

Hi, I was trying to solve the question 161D - Distance in Tree but I'm getting WA on test 11 and can't figure out what's wrong. And the editorial is a bit confusing to me.

Here is my submission : 85076026 Can anyone suggest what might've gone wrong. Thanks in advance !

• 0

By mujtaba1747, history, 3 years ago,

Hi, I was trying to solve this 102501H - Pseudo-Random Number Generator. I tried to find a pattern but couldn't due to the large constraints. The editorial claims that we need to find the Period of the sequence but I am unable to do so. Any help / suggestions are welcome.

• +1

By mujtaba1747, history, 3 years ago,

I came across this song while doing CP. It might've unintentionally mentioned the meet in the middle algorithm quite a few times which makes it fun to listen to. Do listen to it.

I hope everyone is fine and practicing social distancing.

• -29

By mujtaba1747, history, 4 years ago,

I am trying to solve 1284D - New Year and Conference I used a randomized approach involving hashes. I assigned random numbers to each lecture and then calculated for each lecture the xor of numbers assigned to lectures it intersects with. Now I checked that every lecture has same hashes in first location (a) and second location (b)

Take a look at my submission : 68617652 I am getting WA on test 6.

Any advice would be greatly appreciated.