Arpa's blog

By Arpa, history, 26 hours ago, In English

Hope you enjoyed the contest!

Text editorials will be published soon. I've created video editorials for all problems, except for problem M — Alternating Sum).

A - XO-OR

Link to video

Code

B - Birthdays

Link to video

Code

My solution is an overkill. Checkout the following code from Seal Breakers.

Code

C - Harmonic Grids

Link to video

Code

D - Guess the permutation

Link to video

Code

E - Easiest Problem

Link to video

Code

F - Permaban

Link to video

Code

G - Divine Powers

Link to video

Code

H - Klein Moretti's Riddle

Link to video

Code

I - Min Xor Subarray

Link to video

Code (Python)
Code (Translated to C++ using AI and minor fixes)

J - Alice and BOB

Link to video

Code

K - Land Distribution

Link to video

Code

L - Tree Harmony

Link to video

Code

M - Alternating Sum

Draft editorial

N - Maximize Minimum Mex

Link to video

Code

Please let me know how you prefer this kind of problem-solving videos.

  • Record from the beginning. Start reading the problem, think, solve, code (example). Shows complete journey of solving a problem. Very lengthy videos.
  • Record after theoretically solving (like what I did here). It can possibly lead to an incorrect solution and getting AC in next tries.
  • Solve and get AC, then record the video and describe the solution and implementation. Short and concise
  • Vote: I like it
  • +47
  • Vote: I do not like it

»
26 hours ago, # |
Rev. 2   Vote: I like it +26 Vote: I do not like it

Solution for M

Hint
code
»
25 hours ago, # |
Rev. 2   Vote: I like it +20 Vote: I do not like it

Felt the adrenaline rush after submtting I in last 30 seconds. (I used $$$O(n ^ 2 * n !)$$$ bruteforce to get the pattern)

  • »
    »
    15 hours ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    BiggestOtaku noice i thought about pattern recognition and was doing this before announcement in constraints like subaarays size >= 2 and after that i fell asleep..

    Congrats!!

»
16 hours ago, # |
  Vote: I like it +8 Vote: I do not like it

Arpa If i can see what thought process one goes through while solving problem and it can be in structured manner like you can solve the question and later explain in video that's what your thought process was throughout and various conceptual learning that may be involved in problem.

Thank you a lot for putting in so much efforts..

»
15 hours ago, # |
  Vote: I like it +3 Vote: I do not like it

L can also be solved via randomised solution, taking 30 random vertices is more than enough

  • »
    »
    15 hours ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    Yeah we were aware of that and was allowed to pass as well.

»
6 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Was trying E (easiest problem) for a very long time, still could not manage to solve it.

»
5 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Why is the time limit for G soo strict ??

Here is a solution using map, set 308680423 gives tle on tc 20.

Here is a solution using unorderd map, unordered set 308682809 gives tle on tc 45.

ac solution using vectors 308683343

»
83 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it

Hey can someone explain the idea given in editorial or any alternatively shorter way to solve this problem what i did was suppose the string is 10111011000111 whenever i find any segment whose size is 1 i used to remove the char because if it is == 2 it doesn't matter to remove it and if it is greater than 2 we will always include the segment because the number of s[i]==s[i+1] will be more..i made another string using this above algo and i counted the no of s[i]==s[i+1].