{
  "id": "cb-08",
  "name": "water_per_index",
  "passed": true,
  "grade_detail": "all asserts passed",
  "wall_s": 14.8,
  "usage": {
    "completion_tokens": 420,
    "prompt_tokens": 134,
    "total_tokens": 554,
    "completion_tokens_details": null,
    "prompt_tokens_details": null,
    "reasoning_tokens": 233
  },
  "answer": "\n\n```python\ndef water_per_index(height):\n    n = len(height)\n    if n == 0:\n        return []\n\n    left_max = [0] * n\n    current_max = 0\n    for i in range(n):\n        current_max = max(current_max, height[i])\n        left_max[i] = current_max\n\n    right_max = [0] * n\n    current_max = 0\n    for i in range(n - 1, -1, -1):\n        current_max = max(current_max, height[i])\n        right_max[i] = current_max\n\n    w = []\n    for i in range(n):\n        level = min(left_max[i], right_max[i])\n        trapped = level - height[i]\n        w.append(trapped if trapped > 0 else 0)\n\n    return w\n```",
  "finish_reason": "stop"
}