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
8.3%
Success Rate
2m 52s
Avg Duration
17s - 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
100.0% openrouter/anthropic/claude-opus-4.5 47s 53.7
100.0% openrouter/x-ai/grok-code-fast-1 2m 13s 880.8
93.3% openrouter/openai/gpt-5-mini 3m 32s 176.5
86.7% openrouter/openai/gpt-5 3m 5s 181.5
86.7% openrouter/google/gemini-3-pro-preview 7m 32s 39.5
86.7% openrouter/openai/gpt-5-nano 2m 29s 308.3
86.7% openrouter/qwen/qwen3-coder 59s 63.5
86.7% openrouter/google/gemini-2.5-pro 2m 9s 44.4
86.7% openrouter/google/gemini-2.5-flash-lite-preview-09-2025 1m 16s 122.3
86.7% openrouter/openai/gpt-oss-20b 50s 366.1
86.7% openrouter/deepseek/deepseek-v3.1-terminus 1m 57s 74.2
86.7% openrouter/openai/gpt-5.2 1m 4s 132.4
86.7% openrouter/anthropic/claude-sonnet-4.5 48s 49.8
86.7% openrouter/openai/gpt-4.1-mini 46s 102.1
73.3% openrouter/x-ai/grok-3-mini 2m 42s 1068.2
73.3% openrouter/anthropic/claude-haiku-4.5 27s 47.8
60.0% openrouter/openai/gpt-4o-mini 1m 5s 105.8
60.0% openrouter/openai/gpt-4.1-nano 50s 311.5
0.0% openrouter/google/gemini-2.5-flash-preview-09-2025 25s 37.2
0.0% litellm/DeepSeek-V3.2-sandbox 10m 0s 0.0
0.0% openrouter/openai/gpt-oss-120b 3m 47s 1117.8
0.0% litellm/GLM-4.5-Air-FP8-dev 10m 0s 0.0
0.0% openrouter/deepseek/deepseek-chat-v3-0324 17s 41.4
0.0% litellm/GLM-4.6-trtllm-sandbox 10m 0s 0.0