Task task14_graph_money_distribution

# Deterministic Money Distribution on a Directed Graph

You must compute the final money distribution on a directed graph following precise rules.

## Graph Structure

**CONDUCTOR nodes**: C1 through C10
**BENEFICIARY nodes**: B1 through B10 (each Ci has exactly one Bi)

**Directed edges between CONDUCTORs**:
```
C1 --> C2
C2 --> C3
C3 --> C4
C4 --> C2
C4 --> C5
C5 --> C6
C6 --> C7
C7 --> C5
C7 --> C8
C8 --> C9
C9 --> C10
C10 --> C6
```

## Initial Conditions

Solve for **three scenarios**:

1. **Scenario A**: C4 receives **5 cents**. All other nodes start with 0 cents.
2. **Scenario B**: C4 receives **50 cents**. All other nodes start with 0 cents.
3. **Scenario C**: C4 receives **100 cents**. All other nodes start with 0 cents.

## Distribution Rules

When a CONDUCTOR Ci receives N > 0 cents, it distributes ALL N cents in a single step to:
- Its BENEFICIARY Bi
- All CONDUCTORs it has outgoing edges to

**Split Rule**:
1. Divide money equally among all participants
2. Remaining cents (from integer division) are distributed one by one
3. **Tie-break order**: BENEFICIARY first, then CONDUCTORs alphabetically (C1 < C2 < ... < C10)

**Example**: 8 cents split among [B4, C2, C5]:
- 8 / 3 = 2 each, remainder = 2
- Distribution order: B4, C2, C5
- Final: B4=3, C2=3, C5=2

## Recursion

Any CONDUCTOR receiving positive money repeats the same distribution.
BENEFICIARY nodes absorb money and never redistribute.

## Termination

Process ends when no CONDUCTOR holds positive money.

## Your Task

Compute the final amount held by each BENEFICIARY after the process terminates, for all three scenarios.

## Required Output

Create three files:

**`result_5.json`** (for Scenario A - 5 cents):
```json
{
"B1": <cents>,
"B2": <cents>,
"B3": <cents>,
"B4": <cents>,
"B5": <cents>,
"B6": <cents>,
"B7": <cents>,
"B8": <cents>,
"B9": <cents>,
"B10": <cents>
}
```

**`result_50.json`** (for Scenario B - 50 cents):
```json
{
"B1": <cents>,
"B2": <cents>,
"B3": <cents>,
"B4": <cents>,
"B5": <cents>,
"B6": <cents>,
"B7": <cents>,
"B8": <cents>,
"B9": <cents>,
"B10": <cents>
}
```

**`result_100.json`** (for Scenario C - 100 cents):
```json
{
"B1": <cents>,
"B2": <cents>,
"B3": <cents>,
"B4": <cents>,
"B5": <cents>,
"B6": <cents>,
"B7": <cents>,
"B8": <cents>,
"B9": <cents>,
"B10": <cents>
}
```

PS: You are currently working in an automated system and cannot ask any question or have back and forth with a user.

Results

19
Models Tested
21.1%
Success Rate
1m 53s
Avg Duration
22s - 9m 0s
Duration Range

Details

Score Model Duration Session (KB) test_10_correct_distribution_50.sh test_11_file_exists_100.sh test_12_valid_json_100.sh test_13_json_structure_100.sh test_14_total_money_100.sh test_15_correct_distribution_100.sh test_1_file_exists.sh test_2_valid_json.sh test_3_json_structure.sh test_4_total_money.sh test_5_correct_distribution.sh test_6_file_exists_50.sh test_7_valid_json_50.sh test_8_json_structure_50.sh test_9_total_money_50.sh
100.0% openrouter/anthropic/claude-opus-4.5 1m 18s 74.8
100.0% openrouter/qwen/qwen3-coder 2m 58s 139.0
100.0% openrouter/anthropic/claude-haiku-4.5 48s 62.5
100.0% openrouter/anthropic/claude-sonnet-4.5 48s 45.6
86.7% openrouter/google/gemini-2.5-flash-preview-09-2025 30s 54.1
86.7% litellm/DeepSeek-V3.2-sandbox 3m 2s 159.0
86.7% openrouter/google/gemini-3-pro-preview 1m 32s 46.1
86.7% openrouter/google/gemini-2.5-pro 1m 27s 50.2
86.7% openrouter/google/gemini-2.5-flash-lite-preview-09-2025 41s 81.7
86.7% openrouter/deepseek/deepseek-v3.1-terminus 1m 21s 85.6
86.7% litellm/GLM-4.5-Air-FP8-dev 40s 100.8
86.7% openrouter/x-ai/grok-code-fast-1 1m 52s 85.8
86.7% litellm/GLM-4.7-FP8-sandbox 35s 84.0
73.3% openrouter/x-ai/grok-3-mini 2m 8s 896.4
60.0% openrouter/openai/gpt-4o-mini 41s 67.6
60.0% openrouter/openai/gpt-oss-20b 3m 36s 466.4
0.0% openrouter/openai/gpt-oss-120b 22s 127.3
0.0% openrouter/deepseek/deepseek-chat-v3-0324 2m 36s 241.1
0.0% litellm/GLM-4.6-trtllm-sandbox 9m 0s 2759.2