Strange Elevator Problem (P1135) - BFS Solution
Problem Description
A dream once led to an unusual elevator that operates differently from typical ones. Each floor has a number K_i (0 ≤ K_i ≤ N), and the elevator can move up or down by exactly K_i floors when the corresponding button is pressed. The elevator has four buttons: open, close, go up, and go down.
Given a building with N floors, e ...
Posted on Sat, 09 May 2026 02:44:26 +0000 by cmp241