Dynamic Paths
HackTheBox
Connection: `nc 154.57.164.65 30945`
$ ls tags/ techniques/
$ cat /etc/rate-limit
Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.
Dynamic Paths — HackTheBox
Description
"On your way to the vault, you decide to follow the underground tunnels, a vast and complicated network of paths used by early humans before the great war. From your previous hack, you already have a map of the tunnels, along with information like distances between sections of the tunnels. While you were studying it to figure your path, a wild super mutant behemoth came behind you and started attacking. Without a second thought, you run into the tunnel, but the behemoth came running inside as well. Can you use your extensive knowledge of the underground tunnels to reach your destination fast and outrun the behemoth?"
Connection: nc 154.57.164.65 30945
Analysis
Protocol Reconnaissance
Connecting to the server revealed the following protocol:
- 100 rounds (grids) to solve sequentially
- Each round provides dimensions
i x j(2 <= i,j <= 100) and a flat list of numbers representing the grid - Goal: find the minimum path sum from top-left to bottom-right, moving only right or down
- Server provides an example: 4x3 grid with answer 17 (path: 2 -> 5 -> 2 -> 1 -> 3 -> 4)
Key Insight
The challenge name "Dynamic Paths" directly hints at Dynamic Programming. This is a classic minimum path sum problem (equivalent to LeetCode #64):
- Given an
m x ngrid of non-negative integers - Find a path from top-left to bottom-right
- Can only move right or down at each step
- Minimize the total sum of values along the path
Algorithm
Classic 2D DP with recurrence:
...
$ grep --similar
Similar writeups
- [misc][free]Pivot Chain Challenge— hackthebox
- [reverse][free]TunnelMadness— hackthebox
- [misc][free]Chrono Mind— HackTheBox
- [misc][free]Cred Hunter— hackthebox
- [gamepwn][free]NoRadar— HackTheBox