Блог пользователя adaptatron

Автор adaptatron, 7 месяцев назад, По-английски

Given an array, how do you efficiently find out the minimum xor pair. I've written a short blog discussing the idea behind it.

To help you solidify the concepts discussed, I've created 1 + 1 practice problems. You can access them here: https://codeforces.me/group/7Dn3ObOpau/contest/503551

https://cfstep.com/training/tutorials/bitwise-operations/xor-is-minimized-for-adjacent-sorted-elements/

The problems are untested. If you see any issues, please let me know.

If you need any help or hints for the practice problem, you can ask on my Discord Server. In case you are interested, you can also checkout my youtube channel

Полный текст и комментарии »

  • Проголосовать: нравится
  • +12
  • Проголосовать: не нравится

Автор adaptatron, 7 месяцев назад, По-английски

The editorial of ARC171C mentions that the sum of $$$\prod deg(u)!$$$ over all spanning subgraphs can be computed using DP but doesn't mention how. So I created a blog post that discusses how to compute:

  1. Number of spanning subgraphs where root vertex has degree $$$d$$$.
  2. Sum of $$$\prod deg(u)!$$$ over all spanning subgraphs
  3. Sum of $$$\sum deg(u)$$$ over all spanning subgraphs

To help you solidify the concepts discussed, I've created 2 + 1 practice problems. You can access them here: https://codeforces.me/group/7Dn3ObOpau/contest/503270

https://cfstep.com/training/tutorials/trees/dp-on-spanning-subgraphs-of-a-tree/

The problems are untested. If you see any issues, please let me know.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +42
  • Проголосовать: не нравится

Автор adaptatron, 8 месяцев назад, По-английски

I've written a short blog discussing the idea of extending Binary Strings with DP. It also discusses the solution to problem E: Counting Binary Strings from last Div 2 round.

To help you solidify the concepts discussed, I've created 5 + 1 practice problems. You can access them here: https://codeforces.me/group/7Dn3ObOpau/contest/498710

https://cfstep.com/training/tutorials/strings/extending-binary-strings/

The problems are untested. If you see any issues, please let me know.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +9
  • Проголосовать: не нравится

Автор adaptatron, 8 месяцев назад, По-английски

I've written a short blog discussing the applications of Dijkstra's Algorithm (to find shortest path, second shortest path, monochromatic shortest paths, etc).

Target Audience : You've used Dijkstra's algorithm as a black box in the past. Or you have some understanding but not the complete picture of why the algorithm works.

To help you solidify the concepts discussed, I've created 1 + 3 practice problems.You can access them here: https://codeforces.me/group/7Dn3ObOpau/contest/497900

Can you write/prove Dijkstra’s algorithm without referring to external sources? What about BFS? If your answer to the first question is NO, and to the second question is YES, this tutorial is for you.

https://cfstep.com/training/tutorials/graphs/dijkstra-is-bfs-in-disguise/

Полный текст и комментарии »

  • Проголосовать: нравится
  • +16
  • Проголосовать: не нравится

Автор adaptatron, 8 месяцев назад, По-английски

I made a video editorial discussing ABC335F : Hop Sugoroku. The video talks about how to use Distributing DP and optimize it using the square root trick.

Youtube Link

Easy version of the problems and practice problems can be found in this contest : https://codeforces.me/group/7Dn3ObOpau/contest/496787

Полный текст и комментарии »

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится

Автор adaptatron, 9 месяцев назад, По-английски

I've written a short blog discussing the applications of tracking time while performing DFS. It also discusses the (partial) solution to problem E: Happy Life in University from Good Bye 2023. To help you solidify the concepts discussed, I've created 4 + 1 practice problems.You can access them here: https://codeforces.me/group/7Dn3ObOpau/contest/496216

If you're familiar with DFS, but don't know what Euler Tour and Tree Flattening mean, this tutorial is for you.

https://cfstep.com/training/tutorials/trees/timer-on-trees/

Полный текст и комментарии »

  • Проголосовать: нравится
  • +12
  • Проголосовать: не нравится

Автор adaptatron, 9 месяцев назад, По-английски

I made a video editorial discussing ABC334F : Christmas Present 2. The video talks about how to use the sliding window technique to optimize DP transitions.

Youtube Link

I also created 1D version of the problem, with 3 versions so that you can submit your $$$O(N^3)$$$, $$$O(N^2)$$$ and $$$O(N * Log(N))$$$ solution and verify the correctness. You can access the group using this link https://codeforces.me/group/7Dn3ObOpau In the contests section, you'll see a contest by the name DP + Sliding Window.

The problems are untested, so if you spot any issues, please let me know.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +15
  • Проголосовать: не нравится

Автор adaptatron, 9 месяцев назад, По-английски

I made a video editorial discussing Edu 160D — Array Collapse . The video talks about how to use monotonic stacks to perform DP transitions faster.

Youtube Link

I also created some basic problems to help you practice the stuff covered in the video. You can access the group using this link https://codeforces.me/group/7Dn3ObOpau In the contests section, you'll see a contest by the name Monotonic Stack + DP. If you want me to add even more basic problems, like finding the previous smaller element or next greater element, please let me know. The problems are untested, so if you spot any issues, please let me know.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +50
  • Проголосовать: не нравится

Автор adaptatron, 9 месяцев назад, По-английски

I made a video editorial discussing ABC 333 F — Bomb Game 2 . The video covers a common technique used in Probability DP problems, and how to handle cycles between DP states.

Youtube Link

I would appreciate your feedback!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +14
  • Проголосовать: не нравится