#pragma once #include "common.h" #include // F4 . . . . . . . . . . . // F3 . . . . . . . HG HM RG RM // F2 . . . . PM . SM . . . . // F1 E TG TM PG . SG . . . . . // // F4 . . . . . // F3 . . . LG . // F2 . HG . . . // F1 E . HM . LM // // 0. // take everythong to the forth floor // // 1. // there is an elevator that can move between the four floors. // When you enter the containment area, you and the elevator will start on the first floor. // // 2. // Its capacity rating means it can carry at most yourself and two RTGs or microchips in any combination. // // 3. // As a security measure, the elevator will only function if it contains at least one RTG or microchip. // // 4. // The elevator always stops on each floor to recharge, // Each elevator stop counts as one step, even if nothing is added to or removed from it // // 5. // if a chip is ever left in the same area as another RTG, // and it's not connected to its own RTG, the chip will be fried. // namespace aoc2016 { struct ritem { int fs[2] = {0, 0}; // 0 Gen, 1 Chip, value floor ritem(int fg, int fc) { fs[0] = fg; fs[1] = fc; } }; std::pair day11(line_view); } // namespace aoc2016