94ROLL CALL
The task
a, b, c, and d share a bus. X arrives at a.
P on b, Q on c, and R on d must each receive every value of X.
The board
Key idea
Three readers want every value: a reader on the left must rest, or it takes the copy meant for one on its right.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
a sends each X three times, and each copy goes to the first core that reads it.
Hint 2Show
When b and d both read, b takes the copy: it is farther left.
Hint 3Show
A core that has its copy can wait before it reads again, and leave the bus to the others.
Solution
Reveal the Full SolutionThe complete program for ROLL CALL. 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.
aSC-2 standard
IN P0
OUT P1
OUT P1
OUT P1bSC-2 standard
IN P0
OUT P1
NOP
NOPcSC-2 standard
IN P0
OUT P1dSC-2 standard
IN P0
OUT P1- CYCLES
- 276
- at par
- ENERGY
- 2808
- at par
- NODES
- 4
- at par
- INSTRUCTIONS
- 12
- at par