41UPSIDE DOWN
The task
Each locked core sends on the larger of the two values it gets.
P must receive the smallest of X, Y, and Z.
The board
Key idea
Locked max cores give the min if the signs are flipped on the way in and out.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
The locked cores can only find a largest value.
Hint 2Show
The largest of some negatives is the negative of the smallest.
Hint 3Show
Flip the sign once on the way in and once on the way out.
Solution
Reveal the Full SolutionThe complete program for UPSIDE DOWN. Open it only when you want the answer.
The reference program
The game's own solution. It passes every test and scores exactly par on every benchmark.
laSC-2 standard
IN P0
NEG
OUT P1lbSC-2 standard
IN P0
NEG
OUT P1lcSC-2 standard
IN P0
NEG
OUT P1endSC-2 standard
IN P0
NEG
OUT P1- CYCLES
- 363
- at par
- ENERGY
- 2808
- at par
- NODES
- 4
- at par
- INSTRUCTIONS
- 12
- at par