8ECHO
The task
P must receive each value from X doubled.
Only the other core can double it, and it shares a single two way wire with you.
The board
Key idea
A bi wire: send, then read the reply; HEAD ON.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
A two way pin can read or write. Your P1 is the shared wire.
Hint 2Show
Send the value up on P1, then read the reply on P1.
Hint 3Show
If both ends write at once, neither reads. That is a HEAD ON.
Solution
Reveal the Full SolutionThe complete program for ECHO. 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.
c0SC-2 standard
IN P0
OUT P1
IN P1
OUT P2c1SC-2 standard
IN P0
ADD A
OUT P0- CYCLES
- 313
- at par
- ENERGY
- 1638
- at par
- NODES
- 2
- at par
- INSTRUCTIONS
- 7
- at par