72POLYNOMIAL
The task
X sends three numbers, a, b, and c, once at the start of each test.
For each Y, P must receive a times Y squared, plus b times Y, plus c.
cf is an SC-4, with registers C and D; ev is an SC-2D, where jumps take 3 cycles.
The board
Key idea
A setup phase: X sends a, b, and c once per test, so they are read before a loop that never goes back; then two rounds of ask and answer per point.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
X sends a, b, and c only once, so read them before the loop and never jump back there.
Hint 2Show
cf can hold a, b, and c, but then it has no room for Y. ev can keep Y in B.
Hint 3Show
a times Y plus b, times Y again, plus c, gives the same answer.
Solution
Reveal the Full SolutionThe complete program for POLYNOMIAL. 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.
cfSC-4 quad
IN P0
MOV B, A
IN P0
MOV C, A
IN P0
MOV D, A
L: IN P1
MUL B
ADD C
OUT P1
IN P1
ADD D
OUT P2
JMP LevSC-2D signal processor
IN P0
OUT P1
MOV B, A
IN P1
MUL B
OUT P1- CYCLES
- 474
- at par
- ENERGY
- 4257
- at par
- NODES
- 2
- at par
- INSTRUCTIONS
- 20
- at par