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

24
Models Tested
0.0%
Success Rate
2m 34s
Avg Duration
31s - 10m 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
86.7% openrouter/google/gemini-2.5-flash-preview-09-2025 39s 58.4
86.7% openrouter/openai/gpt-5 2m 30s 258.6
86.7% openrouter/google/gemini-3-pro-preview 2m 49s 67.9
86.7% openrouter/anthropic/claude-opus-4.5 1m 13s 63.5
86.7% openrouter/openai/gpt-oss-120b 2m 30s 270.3
86.7% openrouter/qwen/qwen3-coder 3m 31s 168.0
86.7% openrouter/google/gemini-2.5-pro 58s 40.4
86.7% openrouter/google/gemini-2.5-flash-lite-preview-09-2025 31s 50.4
86.7% openrouter/anthropic/claude-haiku-4.5 41s 58.7
86.7% openrouter/deepseek/deepseek-v3.1-terminus 2m 2s 76.2
86.7% openrouter/openai/gpt-5.2 58s 112.2
86.7% openrouter/anthropic/claude-sonnet-4.5 56s 47.0
86.7% openrouter/x-ai/grok-code-fast-1 42s 68.0
86.7% openrouter/openai/gpt-5-mini 1m 49s 191.4
86.7% openrouter/openai/gpt-4.1-mini 1m 1s 130.6
73.3% litellm/GLM-4.5-Air-FP8-dev 46s 121.0
60.0% openrouter/openai/gpt-4o-mini 41s 72.0
46.7% openrouter/x-ai/grok-3-mini 1m 36s 552.1
40.0% openrouter/openai/gpt-4.1-nano 4m 9s 1378.3
0.0% litellm/DeepSeek-V3.2-sandbox 10m 0s 0.0
0.0% openrouter/openai/gpt-5-nano 10m 0s 0.0
0.0% openrouter/openai/gpt-oss-20b 34s 123.8
0.0% openrouter/deepseek/deepseek-chat-v3-0324 60s 68.9
0.0% litellm/GLM-4.6-trtllm-sandbox 10m 0s 0.0