Adding eight numbers (divide and conquer)
Statement
Eight numbers have to be added, but the model is not given them all at once. They are split four ways and handed to four agents, two each, then two agents join those results two at a time, and a last one finishes the job. The model runs seven times.
Following the case where the eight numbers come in as 7 12 3 25 8 14 6 21 looks like this.
| Position | What it receives | What it sends up |
|---|---|---|
| the four leaves | 7 12 · 3 25 · 8 14 · 6 21 | 19 28 22 27 |
| the two merging | 19 28 · 22 27 | 47 49 |
| the one on top | 47 49 | 96 |
Grading looks only at the 96 the top one produced. If one leaf puts out 20 instead of 19, that discrepancy travels all the way up unchanged.
Input
The input arrives as 8 lines.
The whole input is between 19 and 22 characters long.
Output
Print the total of all eight numbers on the first line as an integer. The prompt you write receives two numbers at a time.
The output value is a natural number between 96 and 218.
Do not add any other characters.
Not a single character may differ from the expected value.
Requirements
- The input is two lines, one number per line.
- The output is the integer result of adding the two numbers.
- This is chat mode. The prompt is wrapped in a chat template, so the model becomes an assistant. You can write control tokens yourself to build a conversation of several turns.
- One case is split into eight pieces. Four agents take two pieces each, two merge those results, and one finishes up. The model runs seven times.
- The same prompt is used at every position. At a leaf it receives the two original pieces, and at a merging position it receives the two results from below. It has to work in both.
- Grading looks only at the output of the single agent at the top. If something goes wrong in the middle, it spreads straight upward.
- Only the last integer of the output is read. You may write the working before it.
- There are 16 cases, and 5 of them show the input together with the expected output. The rest show the input only.
- Model output is accepted up to 120 tokens.
- Passing 14 or more of the 16 cases solves this.
Examples
5 public cases. Judging also uses hidden cases. Passing 14 or more of the 16 cases solves this.
7 12 3 25 8 14 6 21
96
31 4 17 9 22 13 5 28
129
11 19 6 33 2 27 15 8
121
24 7 18 11 30 5 9 16
120
13 26 4 21 17 8 32 6
127
Notes
Background that helps with solving. The rules you have to follow are in the input and output specs and the requirements above.
What makes it hard is that the same prompt has to run in every spot. At a leaf it is handed two of the original numbers, but further up, what it is handed is two results produced below. Write it to fit the leaves alone and it falls apart at the top, write it to fit the top alone and it falls apart at the leaves.