Skip to content

towering

bradendubois edited this page Nov 24, 2021 · 8 revisions

A Towering Problem

ID: towering

Difficulty: 2.2

CPU Time: 1 second

Memory: 2048 MB

Solution

For this, take in all 6 boxes, and h1 and h2. Iterate through all permutations of the boxes, and if the first 3 sum to h1 and the last 3 sum to h2, then sort these subsets and output them.

Clone this wiki locally