{
  "generated_at": "2026-11-19T15:01:56Z",
  "demo": false,
  "question": {
    "item_id": "coding-010",
    "category": "coding",
    "battery_version": "v1",
    "system_prompt": null,
    "prompt": "Write a function that counts islands in a grid of `0`s (water) and `1`s\n(land), where an island is a maximal group of `1`s connected\n4-directionally (up/down/left/right only — NOT diagonally).\n\nSignature: `def count_islands(grid: list) -> int:`\n\nExamples:\ncount_islands([[1,1,0],[0,1,0],[0,0,1]]) -> 2\ncount_islands([[0,0],[0,0]]) -> 0\n\nReturn only one Python code block containing the function. No explanation.\n",
    "prompt_truncated": false,
    "messages": null
  },
  "ranked_models": {
    "run_id": "r20261102-bv1-5246ab",
    "n_models": 33,
    "answered_correctly": 30,
    "share": 0.9091
  },
  "count": 228,
  "n_withheld": 8,
  "answers": [
    {
      "slug": "aya-8b-23",
      "display_name": "Aya 8B 23",
      "model_version_id": 70,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    def dfs(x, y):\n        if x < 0 or x >= len(grid) or y < 0 or y >= len(grid[0]) or grid[x][y] == 0:\n            return\n        grid[x][y] = 0\n        dfs(x + 1, y)\n        dfs(x - 1, y)\n        dfs(x, y + 1)\n        dfs(x, y - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[i])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "aya-expanse-32b",
      "display_name": "Aya Expanse 32B",
      "model_version_id": 196,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    count = 0\n\n    def dfs(i, j):\n        if i < 0 or j < 0 or i >= rows or j >= cols or grid[i][j] != 1:\n            return\n        grid[i][j] = \"#\"\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "aya-expanse-8b",
      "display_name": "Aya Expanse 8B",
      "model_version_id": 71,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "Python solution:\n```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if (\n            i < 0\n            or j < 0\n            or i >= len(grid)\n            or j >= len(grid[0])\n            or grid[i][j] != 1\n        ):\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "codegeex4-9b-all",
      "display_name": "Codegeex4 9B All",
      "model_version_id": 72,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(i, j)\n    return count\n```\n",
      "output_truncated": false
    },
    {
      "slug": "codeqwen-7b-chat-v1-5",
      "display_name": "Codeqwen 7B Chat V1.5",
      "model_version_id": 77,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i-1, j)\n        dfs(i+1, j)\n        dfs(i, j-1)\n        dfs(i, j+1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "codestral-22b-v0-1",
      "display_name": "Codestral 22B V0.1",
      "model_version_id": 200,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": " def count_islands(grid: list) -> int:\n       def dfs(i, j):\n           if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n               return\n           grid[i][j] = 0\n           dfs(i + 1, j)\n           dfs(i - 1, j)\n           dfs(i, j + 1)\n           dfs(i, j - 1)\n\n       if not grid:\n           return 0\n\n       count = 0\n       for i in range(len(grid)):\n           for j in range(len(grid[0])):\n               if grid[i][j] == 1:\n                   dfs(i, j)\n                   count += 1\n       return count",
      "output_truncated": false
    },
    {
      "slug": "cogito-14b-v1-preview-qwen",
      "display_name": "Cogito 14B V1 Preview Qwen",
      "model_version_id": 78,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n        \n    rows, cols = len(grid), len(grid[0])\n    count = 0\n    \n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0:\n            return\n        grid[r][c] = 0\n        dfs(r+1, c)\n        dfs(r-1, c)\n        dfs(r, c+1)\n        dfs(r, c-1)\n    \n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                dfs(r, c)\n                count += 1\n                \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "cogito-8b-v1-preview-llama",
      "display_name": "Cogito 8B V1 Preview Llama",
      "model_version_id": 80,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 10
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    islands = 0\n    visited = [[False]*cols for _ in range(rows)]\n    \n    def dfs(r, c):\n        if (r < 0 or r >= rows or c < 0 or c >= cols or \n            grid[r][c] == 0 or visited[r][c]):\n            return\n        visited[r][c] = True\n        dfs(r+1, c)\n        dfs(r-1, c)\n        dfs(r, c+1)\n        dfs(r, c-1)\n    \n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(i, j)\n                islands += 1\n    return islands\n```",
      "output_truncated": false
    },
    {
      "slug": "command-r-35b-08-2024",
      "display_name": "Command R 35B 08 2024",
      "model_version_id": 201,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    count = 0\n\n    def dfs(i, j):\n        if i < 0 or j < 0 or i >= rows or j >= cols or grid[i][j] != 1:\n            return\n        grid[i][j] = '#'\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "coherelabs-c4ai-command-r7b-12-2024",
      "display_name": "Command R7B (12-2024)",
      "model_version_id": 2,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "Here is the Python solution that solves the problem:\n```python\ndef count_islands(grid: list[list[int]]) -> int:\n    if not grid:\n        return 0\n\n    def dfs(r, c):\n        if (\n            r < 0\n            or r >= len(grid)\n            or c < 0\n            or c >= len(grid[0])\n            or grid[r][c] == 0\n            or visited[r][c]\n        ):\n            return\n        visited[r][c] = True\n        dfs(r - 1, c)  # Up\n        dfs(r + 1, c)  # Down\n        dfs(r, c - 1)  # Left\n        dfs(r, c + 1)  # Right\n\n    count = 0\n    visited = [[False] * len(grid[0]) for _ in range(len(grid))]\n\n    for r in range(len(grid)):\n        for c in range(len(grid[0])):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                count += 1\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "command-r7b-arabic-7b-02-2025",
      "display_name": "Command R7B Arabic 7B 02 2025",
      "model_version_id": 81,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "Here is the Python solution that solves the problem:\n```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    def dfs(grid, i, j):\n        if (\n            i < 0\n            or i >= len(grid)\n            or j < 0\n            or j >= len(grid[0])\n            or grid[i][j] == 0\n            or visited[i][j]\n        ):\n            return\n        visited[i][j] = True\n        dfs(grid, i + 1, j)\n        dfs(grid, i - 1, j)\n        dfs(grid, i, j + 1)\n        dfs(grid, i, j - 1)\n\n    visited = [[False] * len(grid[0]) for _ in range(len(grid))]\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(grid, i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "deepcoder-14b-preview",
      "display_name": "Deepcoder 14B Preview",
      "model_version_id": 83,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "\n\nTo solve this problem, we need to count the number of islands in a grid where islands are defined as groups of `1`s connected 4-directionally (up, down, left, right). The solution involves using Depth-First Search (DFS) to explore each island and mark all its connected cells as visited to avoid counting them again.\n\n### Approach\n1. **Initialization**: Start by checking if the grid is empty. If it is, return 0 as there are no islands.\n2. **Iterate through each cell**: Loop through each cell in the grid. When a cell with a value of `1` is found, it indicates the start of a new island.\n3. **DFS Exploration**: For each new island found, use DFS to explore all connected cells. During the DFS, mark each visited cell by setting its value to `0` to avoid revisiting it.\n4. **Count Islands**: Each time a new island is found (i.e., a cell with value `1` is encountered), increment the island count and initiate the DFS to mark all connected cells as visited.\n\n### Solution Code\n```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    rows = len(grid)\n    cols = len(grid[0])\n    count = 0\n\n    def dfs(i, j):\n        if i < 0 or i >= rows or j < 0 or j >= cols:\n            return\n        if grid[i][j] != 1:\n            return\n        grid[i][j] = 0  # mark as visited\n        dfs(i - 1, j)\n        dfs(i + 1, j)\n        dfs(i, j - 1)\n        dfs(i, j + 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(i, j)\n    return count\n```\n\n### Explanation\n- **Initialization**: The function starts by checking if the grid is empty. If it is, the function immediately returns 0.\n- **DFS Function**: The nested `dfs` function is defined to recursively explore all cells connected to the current cell. It marks each visited cell by setting its value to `0` to avoid revisiting.\n- **Main Loop**: The outer loop iterates over each cell in the grid. When a cell with a value of `1` is found,",
      "output_truncated": true
    },
    {
      "slug": "deepseek-coder-1-3b-instruct",
      "display_name": "Deepseek Coder 1.3B Instruct",
      "model_version_id": 85,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "Here is a Python code block that defines the function:\n\n```python\ndef count_islands(grid):\n    def dfs(i, j):\n        if i<0 or j<0 or i>=len(grid) or j>=len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(i-1, j)\n        dfs(i+1, j)\n        dfs(i, j-1)\n        dfs(i, j+1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```\n\nThis function uses Depth-First Search (DFS) to traverse the grid and mark all connected `1`s as `0`s. It starts from each `1` and explores all its 4-directional neighbors. When it reaches the end of the grid, it increments the count.\n",
      "output_truncated": false
    },
    {
      "slug": "deepseek-coder-33b-instruct",
      "display_name": "Deepseek Coder 33B Instruct",
      "model_version_id": 202,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "def count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(grid, i, j)\n                count += 1\n    return count\n\ndef dfs(grid, i, j):\n    if i<0 or j<0 or i>=len(grid) or j>=len(grid[0]) or grid[i][j] != 1:\n        return\n    grid[i][j] = '#'\n    dfs(grid, i+1, j)\n    dfs(grid, i-1, j)\n    dfs(grid, i, j+1)\n    dfs(grid, i, j-1)\n",
      "output_truncated": false
    },
    {
      "slug": "deepseek-coder-6-7b-instruct",
      "display_name": "Deepseek Coder 6.7B Instruct",
      "model_version_id": 86,
      "run_id": "r20261022-bv1-54a19b",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    def dfs(i, j):\n        if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(i-1, j)\n        dfs(i+1, j)\n        dfs(i, j-1)\n        dfs(i, j+1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```\n",
      "output_truncated": false
    },
    {
      "slug": "deepseek-llm-7b-chat",
      "display_name": "Deepseek Llm 7B Chat",
      "model_version_id": 87,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    def dfs(i, j):\n        if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i+1, j)\n        dfs(i-1, j)\n        dfs(i, j+1)\n        dfs(i, j-1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "deepseek-r1-8b-llama-distill",
      "display_name": "Deepseek R1 8B Llama Distill",
      "model_version_id": 89,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 6
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "\n\nTo solve this problem, we need to count the number of islands in a grid where an island is defined as a maximal group of `1`s (land) connected 4-directionally (up, down, left, right). The solution involves using a breadth-first search (BFS) approach to explore and mark all connected `1`s starting from each unvisited `1` cell.\n\n### Approach\n1. **Check for Empty Grid**: If the grid is empty, return 0 as there are no islands.\n2. **Initialize Variables**: Determine the number of rows and columns in the grid. If there are no rows or columns, return 0.\n3. **Create Visited Matrix**: Use a 2D list to keep track of visited cells to avoid counting the same cell multiple times.\n4. **Iterate Through Each Cell**: For each cell in the grid, if it contains a `1` and has not been visited, it indicates the start of a new island.\n5. **BFS Exploration**: From the starting cell, use a queue to explore all 4-directionally connected `1`s, marking them as visited.\n6. **Count Islands**: Increment the island count each time a new island is found.\n\n### Solution Code\n```python\nfrom collections import deque\n\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    rows = len(grid)\n    cols = len(grid[0]) if rows > 0 else 0\n    if cols == 0:\n        return 0\n    visited = [[False for _ in range(cols)] for _ in range(rows)]\n    count = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                count += 1\n                queue = deque()\n                queue.append((i, j))\n                visited[i][j] = True\n                while queue:\n                    x, y = queue.popleft()\n                    for dx, dy in [(-1, 0), (1, 0), (0, -1), (0, 1)]:\n                        nx = x + dx\n                        ny = y + dy\n                        if 0 <= nx < rows and 0 <= ny < cols:\n                            if grid[nx][ny] == 1 and not visited[nx][ny]:\n                                visited[nx][ny] = True\n ",
      "output_truncated": true
    },
    {
      "slug": "deepseek-v2-16b-lite-chat",
      "display_name": "Deepseek V2 16B Lite Chat",
      "model_version_id": 90,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": " ```python\ndef count_islands(grid: list) -> int:\n    def dfs(i: int, j: int):\n        if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i+1, j)\n        dfs(i-1, j)\n        dfs(i, j+1)\n        dfs(i, j-1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "deepseek-ai-deepseek-coder-v2-lite-instruct",
      "display_name": "DeepSeek-Coder-V2-Lite-Instruct",
      "model_version_id": 3,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 10
        }
      ],
      "output_text": " ```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = set()\n\n    def dfs(r, c):\n        if (r < 0 or c < 0 or r >= rows or c >= cols or grid[r][c] == 0 or (r, c) in visited):\n            return\n        visited.add((r, c))\n        directions = [(1, 0), (-1, 0), (0, 1), (0, -1)]\n        for dr, dc in directions:\n            dfs(r + dr, c + dc)\n\n    islands = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and (r, c) not in visited:\n                islands += 1\n                dfs(r, c)\n    return islands\n```",
      "output_truncated": false
    },
    {
      "slug": "deepseek-ai-deepseek-r1-0528-qwen3-8b",
      "display_name": "DeepSeek-R1-0528-Qwen3-8B",
      "model_version_id": 230,
      "run_id": "r20261105-bv1-2abe78",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 6
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "\nTo solve this problem, we need to count the number of islands in a grid where islands are defined as maximal groups of '1's connected 4-directionally (up, down, left, right). The solution involves traversing the grid and using a depth-first search (DFS) approach to mark all connected '1's as visited, thereby counting each distinct group only once.\n\n### Approach\nThe approach involves iterating through each cell in the grid. Whenever a '1' is encountered that hasn't been visited, we initiate a DFS to explore all connected '1's starting from that cell. During the DFS, we mark each visited cell to avoid reprocessing. The number of times we start a DFS corresponds to the number of islands in the grid.\n\n### Solution Code\n```python\ndef count_islands(grid):\n    if not grid:\n        return 0\n    rows = len(grid)\n    cols = len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    count = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                count += 1\n                stack = [(i, j)]\n                visited[i][j] = True\n                while stack:\n                    x, y = stack.pop()\n                    for dx, dy in [(1,0), (-1,0), (0,1), (0,-1)]:\n                        nx, ny = x + dx, y + dy\n                        if 0 <= nx < rows and 0 <= ny < cols and grid[nx][ny] == 1 and not visited[nx][ny]:\n                            visited[nx][ny] = True\n                            stack.append((nx, ny))\n    return count\n```\n\n### Explanation\n1. **Initialization**: The function starts by checking if the grid is empty. If it is, the function returns 0 since there are no islands.\n2. **Grid Dimensions**: The dimensions of the grid (rows and columns) are determined to set up the visited matrix.\n3. **Visited Matrix**: A matrix of the same dimensions as the grid is created to keep track of visited cells, initialized with False.\n4. **Iteration and DFS**: The code iterates through each cell in the g",
      "output_truncated": true
    },
    {
      "slug": "deepseek-ai-deepseek-r1-distill-qwen-14b",
      "display_name": "DeepSeek-R1-Distill-Qwen-14B",
      "model_version_id": 231,
      "run_id": "r20261105-bv1-2abe78",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 6
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "\n\nTo solve this problem, we need to count the number of islands in a grid where each cell is either water (0) or land (1). An island is defined as a maximal group of 1s connected 4-directionally (up, down, left, right).\n\n### Approach\nThe approach to solve this problem involves using Depth-First Search (DFS) to explore each island. The steps are as follows:\n\n1. **Iterate through each cell in the grid**: For each cell, if it contains a 1, it indicates the start of a new island.\n2. **DFS Exploration**: When a new island is found, use DFS to mark all connected 1s as visited. This is done by converting visited 1s to 0s to avoid revisiting them.\n3. **Count Islands**: Each time a new island is encountered, increment the count.\n\nThe DFS function will recursively check all four possible directions (up, down, left, right) from the current cell. If any of these directions contain a 1, it will continue the DFS from that cell, effectively marking all connected 1s as part of the same island.\n\n### Solution Code\n```python\ndef count_islands(grid: list) -> int:\n    rows = len(grid)\n    if rows == 0:\n        return 0\n    cols = len(grid[0])\n    count = 0\n\n    def dfs(i, j):\n        if i < 0 or i >= rows or j < 0 or j >= cols:\n            return\n        if grid[i][j] != 1:\n            return\n        grid[i][j] = 0  # mark as visited\n        dfs(i - 1, j)   # up\n        dfs(i + 1, j)   # down\n        dfs(i, j - 1)   # left\n        dfs(i, j + 1)   # right\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(i, j)\n    return count\n```\n\n### Explanation\n- **Initialization**: The function starts by determining the number of rows and columns in the grid. If the grid is empty, it returns 0.\n- **DFS Helper Function**: The nested `dfs` function marks the current cell as visited by setting it to 0 and recursively explores all four possible directions.\n- **Main Loop**: The outer loop iterates through each cell in th",
      "output_truncated": true
    },
    {
      "slug": "deepseek-ai-deepseek-r1-distill-qwen-7b",
      "display_name": "DeepSeek-R1-Distill-Qwen-7B",
      "model_version_id": 233,
      "run_id": "r20261105-bv1-2abe78",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 6
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "\n\nTo solve this problem, we need to count the number of islands in a grid where an island is defined as a maximal group of `1`s connected 4-directionally (up, down, left, right). The approach involves using a Breadth-First Search (BFS) algorithm to explore each island starting from each unvisited `1` cell.\n\n### Approach\n1. **Iterate through each cell**: Traverse each cell in the grid. If a cell contains a `1`, it indicates the start of a new island.\n2. **BFS for island exploration**: For each unvisited `1` cell, initiate a BFS to explore all connected `1` cells. During this exploration, mark each visited cell by setting it to `0` to avoid revisiting.\n3. **Count islands**: Each time we start a BFS from a new `1` cell, we increment the island count by 1.\n\n### Solution Code\n```python\nimport collections\n\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    rows = len(grid)\n    cols = len(grid[0])\n    count = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                count += 1\n                # BFS to mark all connected 1s as visited\n                queue = collections.deque()\n                queue.append((i, j))\n                grid[i][j] = 0  # mark as visited\n                while queue:\n                    x, y = queue.popleft()\n                    # Check all four directions\n                    for dx, dy in [(-1, 0), (1, 0), (0, -1), (0, 1)]:\n                        nx = x + dx\n                        ny = y + dy\n                        if 0 <= nx < rows and 0 <= ny < cols and grid[nx][ny] == 1:\n                            queue.append((nx, ny))\n                            grid[nx][ny] = 0  # mark as visited\n    return count\n```\n\n### Explanation\n- **Initialization**: Check if the grid is empty. If it is, return 0 as there are no islands.\n- **Grid Traversal**: Loop through each cell in the grid. For each cell with a `1`, increment the island count and start a BFS.\n- **BFS Implement",
      "output_truncated": true
    },
    {
      "slug": "devstral-24b-small-2505",
      "display_name": "Devstral 24B Small 2505",
      "model_version_id": 203,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0 or visited[r][c]:\n            return\n        visited[r][c] = True\n        for dr, dc in [(-1, 0), (1, 0), (0, -1), (0, 1)]:\n            dfs(r + dr, c + dc)\n\n    island_count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                island_count += 1\n\n    return island_count\n```",
      "output_truncated": false
    },
    {
      "slug": "mistralai-devstral-small-2-24b-instruct-2512",
      "display_name": "Devstral Small 2 24B Instruct (2512)",
      "model_version_id": 25,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows = len(grid)\n    cols = len(grid[0])\n    count = 0\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                count += 1\n                stack = [(i, j)]\n                grid[i][j] = 0\n                while stack:\n                    x, y = stack.pop()\n                    for dx, dy in [(-1, 0), (1, 0), (0, -1), (0, 1)]:\n                        nx, ny = x + dx, y + dy\n                        if 0 <= nx < rows and 0 <= ny < cols and grid[nx][ny] == 1:\n                            grid[nx][ny] = 0\n                            stack.append((nx, ny))\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "dphn-dolphin-2-9-1-yi-1-5-34b",
      "display_name": "dolphin-2.9.1-yi-1.5-34b",
      "model_version_id": 4,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "def count_islands(grid):\n    def dfs(grid, i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(grid, i + 1, j)\n        dfs(grid, i - 1, j)\n        dfs(grid, i, j + 1)\n        dfs(grid, i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(grid, i, j)\n                count += 1\n    return count",
      "output_truncated": false
    },
    {
      "slug": "exaone-deep-2-4b",
      "display_name": "Exaone Deep 2.4B",
      "model_version_id": 92,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 4
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "<thought>\nOkay, I need to write a function called count_islands that takes a grid and returns the number of islands. Hmm, islands are groups of 1s connected horizontally or vertically. So the problem is similar to the classic number of islands problem. Let me think about how to approach this.\n\nFirst, the standard approach for such grid problems is to use either BFS or DFS to explore each island once it's found. The idea is to iterate through each cell in the grid. When a cell with value 1 is found that hasn't been visited yet, we increment the count and then mark all the connected 1s as visited (or change them to 0 to avoid using extra space).\n\nWait, right. To avoid using a separate visited structure, we can modify the grid in place. So whenever we find a 1, we start a DFS or BFS to turn all connected 1s into 0s, effectively marking them as part of the current island. That way, we don't process them again.\n\nSo the steps would be:\n\n1. Iterate over each cell in the grid.\n2. For each cell, if it's a 1, increment the count and then perform DFS/BFS to mark all connected land as visited (by setting them to 0).\n3. Continue until all cells are processed.\n\nNow, which method is better here? Since the grid can be modified, either approach works. Let's think about the code structure.\n\nThe function will loop through each row and column. For each cell (i,j), if grid[i][j] is 1, then we need to trigger a search. Let's pick DFS first. But recursion depth could be an issue for very large grids, but maybe the problem expects the standard solution.\n\nAlternatively, BFS using a queue might be better to avoid stack overflow for large islands. Hmm, but in Python, recursion depth is limited. For example, if the grid is 10^4 x 10^4, recursion would hit maximum depth. But given that the problem examples are small, perhaps the intended solution is the standard DFS approach.\n\nAlternatively, maybe the problem expects an iterative approach. Let's think of writing the DFS iteratively to avoid sta",
      "output_truncated": true
    },
    {
      "slug": "exaone-deep-7-8b",
      "display_name": "Exaone Deep 7.8B",
      "model_version_id": 93,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 6
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "<thought>\nOkay, I need to write a function called count_islands that takes a grid and returns the number of islands. An island is a group of 1's connected horizontally or vertically. So, the problem is similar to the classic number of islands problem. Let me think about how to approach this.\n\nFirst, the grid is a list of lists. Each element is either 0 or 1. The islands are formed by adjacent 1's (up, down, left, right). So the standard approach here is to use either BFS or DFS to explore each island once and mark visited cells to avoid counting them again.\n\nHmm, right. So the steps would be:\n\n1. Iterate through each cell in the grid.\n2. When a cell with value 1 is found that hasn't been visited yet, it's the start of a new island.\n3. Perform a BFS or DFS to mark all connected 1's as visited.\n4. Increment the island count each time this happens.\n\nBut how do I track visited cells? Since modifying the input grid is allowed (assuming that's acceptable), I can just change the 1's to 0's once they are visited. That way, the next time we encounter a 1, it's part of a new island. This avoids using extra space for a visited matrix.\n\nYes, that's a common optimization. So the plan is:\n\nLoop over each row and column. For each cell (i,j):\n- If grid[i][j] is 1, then we found a new island. Increment count.\n- Then perform BFS/DFS to mark all connected 1's as 0's.\n\nSo for the BFS approach, when we find a 1, we add it to a queue, then for each element in the queue, we check all four directions. For each direction, if it's within bounds and is 1, we set it to 0 and add to the queue. This way, the entire island is marked as visited (by turning to 0) and won't be counted again.\n\nAlternatively, using DFS recursively. But for large grids, recursion depth might be an issue. But given that the problem constraints probably allow it, either approach is okay.\n\nLet me think about the code structure.\n\nThe function will take the grid as input. But since lists are mutable, modifying the grid in p",
      "output_truncated": true
    },
    {
      "slug": "lgai-exaone-exaone-3-5-7-8b-instruct",
      "display_name": "EXAONE-3.5-7.8B-Instruct",
      "model_version_id": 16,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    \n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0 or visited[r][c]:\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    \n    island_count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                island_count += 1\n                \n    return island_count\n```",
      "output_truncated": false
    },
    {
      "slug": "exaone3-5-2-4b-instruct",
      "display_name": "Exaone3.5 2.4B Instruct",
      "model_version_id": 94,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    count = 0\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0:\n            return\n        grid[r][c] = 0  # Mark as visited\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                count += 1\n                dfs(r, c)\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "exaone3-5-32b-instruct",
      "display_name": "Exaone3.5 32B Instruct",
      "model_version_id": 204,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = set()\n\n    def dfs(r, c):\n        if (r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0 or (r, c) in visited):\n            return\n        visited.add((r, c))\n        directions = [(1, 0), (-1, 0), (0, 1), (0, -1)]\n        for dr, dc in directions:\n            dfs(r + dr, c + dc)\n\n    island_count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and (r, c) not in visited:\n                dfs(r, c)\n                island_count += 1\n\n    return island_count\n```",
      "output_truncated": false
    },
    {
      "slug": "falcon3-10b-instruct",
      "display_name": "Falcon3 10B Instruct",
      "model_version_id": 189,
      "run_id": "r20261028-bv1-7ce712",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if 0 <= i < len(grid) and 0 <= j < len(grid[0]) and grid[i][j] == 1:\n            grid[i][j] = 0\n            dfs(i+1, j)\n            dfs(i-1, j)\n            dfs(i, j+1)\n            dfs(i, j-1)\n    \n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "falcon3-3b-instruct",
      "display_name": "Falcon3 3B Instruct",
      "model_version_id": 191,
      "run_id": "r20261028-bv1-7ce712",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "falcon3-7b-instruct",
      "display_name": "Falcon3 7B Instruct",
      "model_version_id": 192,
      "run_id": "r20261028-bv1-7ce712",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```\n",
      "output_truncated": false
    },
    {
      "slug": "flint-40b-a2b",
      "display_name": "Flint 40B A2B",
      "model_version_id": 205,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    count = 0\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols:\n            return\n        if visited[r][c] or grid[r][c] == 0:\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                count += 1\n                dfs(r, c)\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "google-gemma-3n-e4b-it",
      "display_name": "Gemma 3n E4B IT",
      "model_version_id": 9,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n▁▁▁▁if not grid:\n▁▁▁▁▁▁▁▁return 0\n\n▁▁▁▁rows, cols = len(grid), len(grid[0])\n▁▁▁▁num_islands = 0\n\n▁▁▁▁def dfs(row, col):\n▁▁▁▁▁▁▁▁if row < 0 or row >= rows or col < 0 or col >= cols or grid[row][col] == 0:\n▁▁▁▁▁▁▁▁▁▁▁▁return\n▁▁▁▁▁▁▁▁grid[row][col] = 0▁▁# Mark as visited (water)\n▁▁▁▁▁▁▁▁dfs(row + 1, col)\n▁▁▁▁▁▁▁▁dfs(row - 1, col)\n▁▁▁▁▁▁▁▁dfs(row, col + 1)\n▁▁▁▁▁▁▁▁dfs(row, col - 1)\n\n▁▁▁▁for i in range(rows):\n▁▁▁▁▁▁▁▁for j in range(cols):\n▁▁▁▁▁▁▁▁▁▁▁▁if grid[i][j] == 1:\n▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁num_islands += 1\n▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁dfs(i, j)\n\n▁▁▁▁return num_islands\n```",
      "output_truncated": false
    },
    {
      "slug": "google-gemma-4-12b-it",
      "display_name": "Gemma 4 12B IT",
      "model_version_id": 10,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows = len(grid)\n    cols = len(grid[0])\n    visited = set()\n    count = 0\n    \n    def dfs(r, c):\n        # Check boundaries, if it's water, or if already visited\n        if (r < 0 or r >= rows or \n            c < 0 or c >= cols or \n            grid[r][c] == 0 or \n            (r, c) in visited):\n            return\n        \n        visited.add((r, c))\n        \n        # Explore 4-directional neighbors\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and (r, c) not in visited:\n                count += 1\n                dfs(r, c)\n                \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "gemma-7b-instruct-v1-1",
      "display_name": "Gemma 7B Instruct V1.1",
      "model_version_id": 101,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    count = 0\n    for row in range(len(grid)):\n        for col in range(len(grid[0])):\n            if grid[row][col] == 1:\n                count += 1\n                dfs(grid, row, col)\n    return count\n\ndef dfs(grid, row, col):\n    grid[row][col] = 0\n    for row_delta, col_delta in [(0, 1), (0, -1), (1, 0), (-1, 0)]:\n        new_row, new_col = row + row_delta, col + col_delta\n        if 0 <= new_row < len(grid) and 0 <= new_col < len(grid[0]) and grid[new_row][new_col] == 1:\n            dfs(grid, new_row, new_col)\n```",
      "output_truncated": false
    },
    {
      "slug": "google-gemma-2-9b-it",
      "display_name": "gemma-2-9b-it",
      "model_version_id": 5,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    num_islands = 0\n\n    def dfs(row, col):\n        if row < 0 or row >= rows or col < 0 or col >= cols or grid[row][col] == 0:\n            return\n        grid[row][col] = 0\n        dfs(row + 1, col)\n        dfs(row - 1, col)\n        dfs(row, col + 1)\n        dfs(row, col - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                num_islands += 1\n                dfs(i, j)\n    return num_islands \n```",
      "output_truncated": false
    },
    {
      "slug": "google-gemma-3-12b-it",
      "display_name": "gemma-3-12b-it",
      "model_version_id": 6,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    num_islands = 0\n\n    def dfs(row, col):\n        if row < 0 or row >= rows or col < 0 or col >= cols or grid[row][col] == 0:\n            return\n\n        grid[row][col] = 0  # Mark as visited\n\n        # Explore adjacent cells\n        dfs(row + 1, col)\n        dfs(row - 1, col)\n        dfs(row, col + 1)\n        dfs(row, col - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                num_islands += 1\n                dfs(i, j)\n\n    return num_islands\n```",
      "output_truncated": false
    },
    {
      "slug": "google-gemma-3-27b-it",
      "display_name": "gemma-3-27b-it",
      "model_version_id": 7,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    num_islands = 0\n\n    def dfs(row, col):\n        if row < 0 or row >= rows or col < 0 or col >= cols or grid[row][col] == 0:\n            return\n\n        grid[row][col] = 0  # Mark as visited (sink the island)\n\n        # Explore adjacent cells\n        dfs(row + 1, col)\n        dfs(row - 1, col)\n        dfs(row, col + 1)\n        dfs(row, col - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                num_islands += 1\n                dfs(i, j)\n\n    return num_islands\n```",
      "output_truncated": false
    },
    {
      "slug": "google-gemma-3-4b-it",
      "display_name": "gemma-3-4b-it",
      "model_version_id": 8,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    \"\"\"\n    Counts islands in a grid of 0s (water) and 1s (land), where an island is a maximal group of 1s connected\n    4-directionally (up/down/left/right only — NOT diagonally).\n    \"\"\"\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    num_islands = 0\n\n    def dfs(row, col):\n        if row < 0 or row >= rows or col < 0 or col >= cols or grid[row][col] == 0:\n            return\n        grid[row][col] = 0  # Mark as visited\n        dfs(row + 1, col)\n        dfs(row - 1, col)\n        dfs(row, col + 1)\n        dfs(row, col - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                num_islands += 1\n                dfs(i, j)\n\n    return num_islands\n```",
      "output_truncated": false
    },
    {
      "slug": "google-gemma-4-26b-a4b-it",
      "display_name": "gemma-4-26B-A4B-it",
      "model_version_id": 11,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows = len(grid)\n    cols = len(grid[0])\n    visited = set()\n    island_count = 0\n\n    def dfs(r, c):\n        if (r < 0 or r >= rows or \n            c < 0 or c >= cols or \n            grid[r][c] == 0 or \n            (r, c) in visited):\n            return\n\n        visited.add((r, c))\n        \n        # Explore 4-directional neighbors\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and (r, c) not in visited:\n                island_count += 1\n                dfs(r, c)\n\n    return island_count\n```",
      "output_truncated": false
    },
    {
      "slug": "google-gemma-4-31b-it",
      "display_name": "gemma-4-31B-it",
      "model_version_id": 12,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 10
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = set()\n    count = 0\n    \n    def dfs(r, c):\n        if (r < 0 or r >= rows or c < 0 or c >= cols or \n            grid[r][c] == 0 or (r, c) in visited):\n            return\n        \n        visited.add((r, c))\n        # Check 4-directional neighbors\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and (r, c) not in visited:\n                count += 1\n                dfs(r, c)\n                \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "gemma2-27b-instruct",
      "display_name": "Gemma2 27B Instruct",
      "model_version_id": 206,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    num_islands = 0\n\n    def dfs(row, col):\n        if row < 0 or row >= rows or col < 0 or col >= cols or grid[row][col] == 0:\n            return\n        grid[row][col] = 0\n        dfs(row + 1, col)\n        dfs(row - 1, col)\n        dfs(row, col + 1)\n        dfs(row, col - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                num_islands += 1\n                dfs(i, j)\n    return num_islands \n```",
      "output_truncated": false
    },
    {
      "slug": "gemma2-2b-instruct",
      "display_name": "Gemma2 2B Instruct",
      "model_version_id": 102,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    num_islands = 0\n\n    def dfs(row, col):\n        if row < 0 or row >= rows or col < 0 or col >= cols or grid[row][col] == 0:\n            return\n        grid[row][col] = 0  # Mark the current cell as visited\n        dfs(row + 1, col)\n        dfs(row - 1, col)\n        dfs(row, col + 1)\n        dfs(row, col - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                num_islands += 1\n                dfs(i, j)\n\n    return num_islands\n```",
      "output_truncated": false
    },
    {
      "slug": "gemma3-1b-it",
      "display_name": "Gemma3 1B IT",
      "model_version_id": 103,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    \"\"\"\n    Counts the number of islands in a grid of 0s and 1s.\n\n    An island is a maximal group of 1s connected 4-directionally (up/down/left/right).\n\n    Args:\n        grid: A list of lists representing the grid.\n\n    Returns:\n        The number of islands in the grid.\n    \"\"\"\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    num_islands = 0\n\n    def dfs(row, col):\n        if row < 0 or row >= rows or col < 0 or col >= cols or grid[row][col] == 0:\n            return\n\n        grid[row][col] = 0  # Mark as visited\n\n        dfs(row + 1, col)\n        dfs(row - 1, col)\n        dfs(row, col + 1)\n        dfs(row, col - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                num_islands += 1\n                dfs(i, j)\n\n    return num_islands\n```",
      "output_truncated": false
    },
    {
      "slug": "gemma3n-e2b-it",
      "display_name": "Gemma3n E2B IT",
      "model_version_id": 104,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    num_islands = 0\n\n    def dfs(row, col):\n        if row < 0 or row >= rows or col < 0 or col >= cols or grid[row][col] == 0:\n            return\n        grid[row][col] = 0  # Mark as visited\n        dfs(row + 1, col)\n        dfs(row - 1, col)\n        dfs(row, col + 1)\n        dfs(row, col - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                num_islands += 1\n                dfs(i, j)\n\n    return num_islands\n```",
      "output_truncated": false
    },
    {
      "slug": "gemma4-e2b-it",
      "display_name": "Gemma4 E2B IT",
      "model_version_id": 105,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n\n    rows = len(grid)\n    cols = len(grid[0])\n    num_islands = 0\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0:\n            return\n        \n        # Mark as visited by sinking the land (changing 1 to 0)\n        grid[r][c] = 0\n        \n        # Explore neighbors\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    # Create a mutable copy if the input grid should not be modified, \n    # but for this problem structure, modifying the input grid is a common approach.\n    # If modification is forbidden, use a separate 'visited' set.\n    # Assuming modification of the input grid is acceptable for simplicity:\n    \n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                num_islands += 1\n                dfs(r, c)\n                \n    return num_islands\n```",
      "output_truncated": false
    },
    {
      "slug": "gemma4-e4b-it",
      "display_name": "Gemma4 E4B IT",
      "model_version_id": 106,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    \"\"\"\n    Counts the number of islands in a 2D grid of 0s (water) and 1s (land).\n    An island is a maximal group of 1s connected 4-directionally.\n    \"\"\"\n    if not grid or not grid[0]:\n        return 0\n\n    rows = len(grid)\n    cols = len(grid[0])\n    island_count = 0\n\n    def dfs(r, c):\n        # Check boundaries and if the cell is water or already visited (marked as 0)\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0:\n            return\n\n        # Mark the current land cell as visited by turning it into water (0)\n        grid[r][c] = 0\n\n        # Explore neighbors (up, down, left, right)\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    # Iterate through every cell in the grid\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                # Found the start of a new island\n                island_count += 1\n                # Use DFS to sink (mark as visited) the entire island\n                dfs(r, c)\n\n    return island_count\n```",
      "output_truncated": false
    },
    {
      "slug": "zai-org-glm-4-5-air",
      "display_name": "GLM-4.5-Air",
      "model_version_id": 69,
      "run_id": "r20261015-bv1-5ac997",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    \"\"\"\n    Counts the number of islands in a 2D grid.\n\n    An island is a group of '1's (land) connected 4-directionally (up, down, left, right).\n    The grid is represented as a list of lists of integers (0 for water, 1 for land).\n\n    Args:\n        grid: A 2D list of integers representing the map.\n\n    Returns:\n        The total number of islands found in the grid.\n    \"\"\"\n    if not grid or not grid[0]:\n        return 0\n\n    rows = len(grid)\n    cols = len(grid[0])\n    island_count = 0\n\n    def dfs(r, c):\n        \"\"\"\n        Depth-First Search to mark all connected land as visited.\n        It changes the value of the grid cell from 1 to 0 to mark it as visited.\n        \"\"\"\n        # Base case: if out of bounds or the cell is water, stop the search.\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0:\n            return\n        \n        # Mark the current cell as visited by setting it to water.\n        grid[r][c] = 0\n        \n        # Recursively visit all 4-directionally adjacent land cells.\n        dfs(r + 1, c)  # Down\n        dfs(r - 1, c)  # Up\n        dfs(r, c + 1)  # Right\n        dfs(r, c - 1)  # Left\n\n    # Iterate through every cell in the grid.\n    for r in range(rows):\n        for c in range(cols):\n            # If we find a land cell, it's the start of a new island.\n            if grid[r][c] == 1:\n                island_count += 1\n                # Perform DFS to mark all connected land as visited.\n                dfs(r, c)\n                \n    return island_count\n```",
      "output_truncated": false
    },
    {
      "slug": "zai-org-glm-4-7-flash",
      "display_name": "GLM-4.7-Flash",
      "model_version_id": 64,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    \n    rows = len(grid)\n    cols = len(grid[0])\n    count = 0\n    \n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] != 1:\n            return\n        grid[r][c] = 0\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    \n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(i, j)\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "glm4-9b-chat",
      "display_name": "Glm4 9B Chat",
      "model_version_id": 107,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "\n```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "openai-gpt-oss-120b",
      "display_name": "gpt-oss-120b",
      "model_version_id": 67,
      "run_id": "r20261012-bv1-6a1291",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "deepseek/deepseek-v4.1-flash",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n\n    def dfs(r: int, c: int) -> None:\n        stack = [(r, c)]\n        while stack:\n            x, y = stack.pop()\n            if visited[x][y]:\n                continue\n            visited[x][y] = True\n            for dx, dy in ((1, 0), (-1, 0), (0, 1), (0, -1)):\n                nx, ny = x + dx, y + dy\n                if 0 <= nx < rows and 0 <= ny < cols:\n                    if grid[nx][ny] == 1 and not visited[nx][ny]:\n                        stack.append((nx, ny))\n\n    islands = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                islands += 1\n                dfs(i, j)\n\n    return islands\n```",
      "output_truncated": false
    },
    {
      "slug": "openai-gpt-oss-20b",
      "display_name": "gpt-oss-20b",
      "model_version_id": 237,
      "run_id": "r20261105-bv1-2abe78",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "deepseek/deepseek-v4.1-flash",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    def dfs(r, c):\n        stack = [(r, c)]\n        while stack:\n            x, y = stack.pop()\n            if visited[x][y]:\n                continue\n            visited[x][y] = True\n            for dx, dy in ((1,0),(-1,0),(0,1),(0,-1)):\n                nx, ny = x + dx, y + dy\n                if 0 <= nx < rows and 0 <= ny < cols and not visited[nx][ny] and grid[nx][ny] == 1:\n                    stack.append((nx, ny))\n    islands = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(i, j)\n                islands += 1\n    return islands\n```",
      "output_truncated": false
    },
    {
      "slug": "granite-code-8b-instruct",
      "display_name": "Granite Code 8B Instruct",
      "model_version_id": 109,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "Here's how you can implement this:\n\n```python\ndef count_islands(grid):\n    if not grid or not grid[0]:\n        return 0\n\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n\n        grid[i][j] = 0\n\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "ibm-granite-granite-4-1-3b",
      "display_name": "granite-4.1-3b",
      "model_version_id": 15,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "def count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = set()\n    directions = [(0, 1), (1, 0), (0, -1), (-1, 0)]\n\n    def dfs(r, c):\n        if (r, c) in visited or r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0:\n            return\n        visited.add((r, c))\n        for dr, dc in directions:\n            dfs(r + dr, c + dc)\n\n    island_count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and (r, c) not in visited:\n                dfs(r, c)\n                island_count += 1\n\n    return island_count",
      "output_truncated": false
    },
    {
      "slug": "granite3-dense-2b-instruct",
      "display_name": "Granite3 Dense 2B Instruct",
      "model_version_id": 118,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    if not grid or not grid[0]:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    islands = 0\n\n    def dfs(i, j):\n        if i < 0 or i >= rows or j < 0 or j >= cols or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i-1, j)\n        dfs(i+1, j)\n        dfs(i, j-1)\n        dfs(i, j+1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                islands += 1\n\n    return islands\n```",
      "output_truncated": false
    },
    {
      "slug": "granite3-dense-8b-instruct",
      "display_name": "Granite3 Dense 8B Instruct",
      "model_version_id": 119,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "Here is the Python function that counts the number of islands in a given grid:\n\n```python\ndef count_islands(grid):\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(grid, i, j)\n    return count\n\ndef dfs(grid, i, j):\n    if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] == 0:\n        return\n    grid[i][j] = 0\n    dfs(grid, i+1, j)\n    dfs(grid, i-1, j)\n    dfs(grid, i, j+1)\n    dfs(grid, i, j-1)\n```\n\nThis function uses Depth-First Search (DFS) to traverse the grid and mark visited cells as `0`. The `count_islands` function iterates through the grid and calls the `dfs` function for each cell containing `1`. The `dfs` function marks the current cell as visited and recursively calls itself for the neighboring cells.",
      "output_truncated": false
    },
    {
      "slug": "granite3-moe-3b-instruct",
      "display_name": "Granite3 Moe 3B Instruct",
      "model_version_id": 121,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(i, j)\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite3-1-dense-2b-instruct",
      "display_name": "Granite3.1 Dense 2B Instruct",
      "model_version_id": 110,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n\n    def dfs(r, c):\n        if r < 0 or c < 0 or r >= rows or c >= cols or grid[r][c] != 1 or visited[r][c]:\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    island_count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                island_count += 1\n\n    return island_count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite3-1-dense-8b-instruct",
      "display_name": "Granite3.1 Dense 8B Instruct",
      "model_version_id": 111,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    if not grid:\n        return 0\n\n    def dfs(i, j):\n        if i<0 or j<0 or i>=len(grid) or j>=len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0  # Mark as visited\n        dfs(i+1, j)  # Down\n        dfs(i-1, j)  # Up\n        dfs(i, j+1)  # Right\n        dfs(i, j-1)  # Left\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite3-1-moe-1b-instruct",
      "display_name": "Granite3.1 Moe 1B Instruct",
      "model_version_id": 112,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    def dfs(x, y, visited, grid):\n        if x < 0 or y < 0 or x >= len(grid) or y >= len(grid[0]) or grid[x][y] == 0 or visited[x][y]:\n            return\n        visited[x][y] = True\n        dfs(x + 1, y, visited, grid)\n        dfs(x - 1, y, visited, grid)\n        dfs(x, y + 1, visited, grid)\n        dfs(x, y - 1, visited, grid)\n\n    visited = [[False for _ in range(len(grid[0]))] for _ in range(len(grid))]\n    islands = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(i, j, visited, grid)\n                islands += 1\n    return islands\n```",
      "output_truncated": false
    },
    {
      "slug": "granite3-1-moe-3b-instruct",
      "display_name": "Granite3.1 Moe 3B Instruct",
      "model_version_id": 113,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    def dfs(i, j):\n        if i<0 or j<0 or i>=len(grid) or j>=len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0  # Mark the cell as visited\n        dfs(i+1, j)\n        dfs(i-1, j)\n        dfs(i, j+1)\n        dfs(i, j-1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite3-2-2b-instruct",
      "display_name": "Granite3.2 2B Instruct",
      "model_version_id": 114,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n\n    def dfs(r, c):\n        if r < 0 or c < 0 or r >= rows or c >= cols or grid[r][c] != 1 or visited[r][c]:\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    island_count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                island_count += 1\n\n    return island_count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite3-2-8b-instruct",
      "display_name": "Granite3.2 8B Instruct",
      "model_version_id": 115,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    if not grid:\n        return 0\n\n    def dfs(i, j):\n        if i<0 or j<0 or i>=len(grid) or j>=len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0  # Mark as visited\n        dfs(i+1, j)  # Down\n        dfs(i-1, j)  # Up\n        dfs(i, j+1)  # Right\n        dfs(i, j-1)  # Left\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite3-3-2b",
      "display_name": "Granite3.3 2B",
      "model_version_id": 116,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    if not grid:\n        return 0\n\n    def dfs(i, j):\n        if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(i, j)\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite3-3-8b",
      "display_name": "Granite3.3 8B",
      "model_version_id": 117,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    def dfs(i, j):\n        if i<0 or j<0 or i>=len(grid) or j>=len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i+1, j)\n        dfs(i-1, j)\n        dfs(i, j+1)\n        dfs(i, j-1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite4-1b-h",
      "display_name": "Granite4 1B H",
      "model_version_id": 123,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "def count_islands(grid):\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count",
      "output_truncated": false
    },
    {
      "slug": "granite4-350m-h",
      "display_name": "Granite4 350M H",
      "model_version_id": 124,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "def count_islands(grid):\n    islands = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                islands += 1\n                dfs(grid, i, j)\n    return islands\n\ndef dfs(grid, i, j):\n    if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n        return\n    grid[i][j] = 0\n    dfs(grid, i + 1, j)\n    dfs(grid, i - 1, j)\n    dfs(grid, i, j + 1)\n    dfs(grid, i, j - 1)",
      "output_truncated": false
    },
    {
      "slug": "granite4-3b",
      "display_name": "Granite4 3B",
      "model_version_id": 125,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    count = 0\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0:\n            return\n        grid[r][c] = 0  # mark as visited\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                count += 1\n                dfs(r, c)\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite4-micro-h",
      "display_name": "Granite4 Micro H",
      "model_version_id": 126,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i: int, j: int):\n        if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(i+1, j)\n        dfs(i-1, j)\n        dfs(i, j+1)\n        dfs(i, j-1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite4-small-h",
      "display_name": "Granite4 Small H",
      "model_version_id": 211,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    if not grid:\n        return 0\n\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite4-tiny-h",
      "display_name": "Granite4 Tiny H",
      "model_version_id": 127,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite4-1-30b",
      "display_name": "Granite4.1 30B",
      "model_version_id": 207,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    island_count = 0\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] != 1:\n            return\n        grid[r][c] = -1  # Mark as visited\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                island_count += 1\n                dfs(r, c)\n\n    return island_count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite4-1-8b",
      "display_name": "Granite4.1 8B",
      "model_version_id": 122,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    if not grid:\n        return 0\n\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite4-2-30b",
      "display_name": "Granite4.2 30B",
      "model_version_id": 208,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 10
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    count = 0\n    \n    def dfs(r, c):\n        if (r < 0 or r >= rows or c < 0 or c >= cols or\n            visited[r][c] or grid[r][c] == 0):\n            return\n        visited[r][c] = True\n        dfs(r - 1, c)\n        dfs(r + 1, c)\n        dfs(r, c - 1)\n        dfs(r, c + 1)\n    \n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                count += 1\n                dfs(r, c)\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite4-2-3b",
      "display_name": "Granite4.2 3B",
      "model_version_id": 209,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    directions = [(1, 0), (-1, 0), (0, 1), (0, -1)]\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0 or visited[r][c]:\n            return\n        visited[r][c] = True\n        for dr, dc in directions:\n            dfs(r + dr, c + dc)\n\n    count = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(i, j)\n                count += 1\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite4-2-8b",
      "display_name": "Granite4.2 8B",
      "model_version_id": 210,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    \n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or visited[r][c] or grid[r][c] == 0:\n            return\n        visited[r][c] = True\n        dfs(r-1, c)\n        dfs(r+1, c)\n        dfs(r, c-1)\n        dfs(r, c+1)\n    \n    count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "nousresearch-hermes-3-llama-3-1-8b",
      "display_name": "Hermes-3-Llama-3.1-8B",
      "model_version_id": 29,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "def count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i-1, j)\n        dfs(i+1, j)\n        dfs(i, j-1)\n        dfs(i, j+1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(i, j)\n    return count",
      "output_truncated": false
    },
    {
      "slug": "internlm2-1-8b-chat-v2-5",
      "display_name": "Internlm2 1.8B Chat V2.5",
      "model_version_id": 188,
      "run_id": "r20261028-bv1-2e24cd",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    def dfs(grid, i, j):\n        if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(grid, i + 1, j)\n        dfs(grid, i - 1, j)\n        dfs(grid, i, j + 1)\n        dfs(grid, i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(grid, i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "internlm2-7b-chat-v2-5",
      "display_name": "Internlm2 7B Chat V2.5",
      "model_version_id": 130,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    def dfs(grid, i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(grid, i + 1, j)\n        dfs(grid, i - 1, j)\n        dfs(grid, i, j + 1)\n        dfs(grid, i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(grid, i, j)\n                count += 1\n    return count\n```[UNUSED_TOKEN_145]",
      "output_truncated": false
    },
    {
      "slug": "laguna-xs-2-1",
      "display_name": "Laguna XS 2.1",
      "model_version_id": 213,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    rows = len(grid)\n    cols = len(grid[0])\n    count = 0\n\n    def dfs(i, j):\n        if i < 0 or i >= rows or j < 0 or j >= cols or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(i, j)\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "lfm2-24b",
      "display_name": "Lfm2 24B",
      "model_version_id": 214,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0:\n            return\n        grid[r][c] = 0\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                dfs(r, c)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "lfm2-5-8b-a1b",
      "display_name": "Lfm2.5 8B A1B",
      "model_version_id": 131,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "<think>\nWe need to write a function count_islands that counts islands in a grid of 0s and 1s, with islands defined as maximal group of 1s connected 4-directionally.\n\nThe problem is straightforward: perform DFS or BFS to find all connected components of 1s. Return number of such components.\n\nWe need to produce only one Python code block containing the function. No explanation. So we output something like:\n\n```python\ndef count_islands(grid):\n    if not grid:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False for _ in range(cols)] for _ in range(rows)]\n    def dfs(r, c):\n        stack = [(r,c)]\n        visited[r][c] = True\n        while stack:\n            x,y = stack.pop()\n            for dx,dy in ((1,0),(-1,0),(0,1),(0,-1)):\n                nx, ny = x+dx, y+dy\n                if 0 <= nx < rows and 0 <= ny < cols and grid[nx][ny]==1 and not visited[nx][ny]:\n                    visited[nx][ny] = True\n                    stack.append((nx,ny))\n    count = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j]==1 and not visited[i][j]:\n                dfs(i,j)\n                count += 1\n    return count\n```\n\nThat's fine. Could also use BFS with deque, but DFS is okay.\n\nMake sure to handle empty grid: if not grid or len(grid)==0 returns 0. Also ensure that we treat grid as list of lists; each row length may vary? Usually rectangular. We'll assume uniform width.\n\nThus final answer: a code block with the function.\n\nWe must output only one Python code block containing the function, no extra text. So:\n\n```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False for _ in range(cols)] for _ in range(rows)]\n    def dfs(r, c):\n        stack = [(r, c)]\n        visited[r][c] = True\n        while stack:\n            x, y = stack.pop()\n            for dx, dy in ((1,0), (-1,0), (0,1), (0,-1)):\n                nx, ny = x + dx, y + dy\n              ",
      "output_truncated": true
    },
    {
      "slug": "lfm2-5-thinking-1-2b",
      "display_name": "Lfm2.5 Thinking 1.2B",
      "model_version_id": 132,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\nfrom collections import deque\n\ndef count_islands(grid: list) -> int:\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[i])):\n            if grid[i][j] == 1:\n                count += 1\n                queue = deque()\n                queue.append((i, j))\n                grid[i][j] = 0\n                while queue:\n                    x, y = queue.popleft()\n                    for dx, dy in [(-1,0),(1,0),(0,-1),(0,1)]:\n                        nx, ny = x + dx, y + dy\n                        if 0 <= nx < len(grid) and 0 <= ny < len(grid[0]) and grid[nx][ny] == 1:\n                            grid[nx][ny] = 0\n                            queue.append((nx, ny))\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "lfm3-1-7b",
      "display_name": "Lfm3 1.7B",
      "model_version_id": 215,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    if not grid:\n        return 0\n    \n    count = 0\n    rows = len(grid)\n    cols = len(grid[0]) if rows > 0 else 0\n    \n    def dfs(r, c):\n        stack = [(r, c)]\n        while stack:\n            x, y = stack.pop()\n            for dx, dy in [(-1, 0), (1, 0), (0, -1), (0, 1)]:\n                nx, ny = x + dx, y + dy\n                if 0 <= nx < rows and 0 <= ny < cols and grid[nx][ny] == 1:\n                    stack.append((nx, ny))\n                    grid[nx][ny] = 0  # mark visited\n        return\n    \n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(i, j)\n                grid[i][j] = 0  # mark as visited after DFS\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "meta-llama-llama-4-scout-17b-16e-instruct",
      "display_name": "Llama 4 Scout 17B-16E Instruct",
      "model_version_id": 66,
      "run_id": "r20261012-bv1-6a1291",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    count = 0\n    rows, cols = len(grid), len(grid[0])\n\n    def dfs(r, c):\n        if 0 <= r < rows and 0 <= c < cols and grid[r][c] == 1:\n            grid[r][c] = 0\n            dfs(r - 1, c)\n            dfs(r + 1, c)\n            dfs(r, c - 1)\n            dfs(r, c + 1)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                dfs(r, c)\n                count += 1\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "meta-llama-llama-3-1-8b-instruct",
      "display_name": "Llama-3.1-8B-Instruct",
      "model_version_id": 18,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    islands = 0\n\n    def dfs(r, c):\n        if 0 <= r < rows and 0 <= c < cols and grid[r][c] == 1:\n            grid[r][c] = 0\n            dfs(r-1, c)\n            dfs(r+1, c)\n            dfs(r, c-1)\n            dfs(r, c+1)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                dfs(r, c)\n                islands += 1\n\n    return islands\n```",
      "output_truncated": false
    },
    {
      "slug": "meta-llama-llama-3-2-3b-instruct",
      "display_name": "Llama-3.2-3B-Instruct",
      "model_version_id": 19,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "def count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(grid, i, j)\n                count += 1\n    return count\n\ndef dfs(grid: list, i: int, j: int):\n    if i<0 or j<0 or i>=len(grid) or j>=len(grid[0]) or grid[i][j] != 1:\n        return\n    grid[i][j] = 0\n    dfs(grid, i+1, j)\n    dfs(grid, i-1, j)\n    dfs(grid, i, j+1)\n    dfs(grid, i, j-1)",
      "output_truncated": false
    },
    {
      "slug": "meta-llama-llama-3-3-70b-instruct",
      "display_name": "Llama-3.3-70B-Instruct",
      "model_version_id": 65,
      "run_id": "r20261012-bv1-6a1291",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    \"\"\"\n    Counts the number of islands in a grid of 0s (water) and 1s (land).\n    \n    Args:\n    grid (list): A 2D list of 0s and 1s representing water and land respectively.\n    \n    Returns:\n    int: The number of islands in the grid.\n    \"\"\"\n    if not grid:\n        return 0\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(grid, i, j)\n                count += 1\n    return count\n\n\ndef dfs(grid: list, i: int, j: int) -> None:\n    \"\"\"\n    Performs a depth-first search on the grid starting from the given position.\n    \n    Args:\n    grid (list): A 2D list of 0s and 1s representing water and land respectively.\n    i (int): The row index of the current position.\n    j (int): The column index of the current position.\n    \"\"\"\n    if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] != 1:\n        return\n    grid[i][j] = 0\n    dfs(grid, i - 1, j)\n    dfs(grid, i + 1, j)\n    dfs(grid, i, j - 1)\n    dfs(grid, i, j + 1)\n\n\n# Example usage:\nprint(count_islands([[1, 1, 0], [0, 1, 0], [0, 0, 1]]))  # Output: 2\nprint(count_islands([[0, 0], [0, 0]]))  # Output: 0\n```",
      "output_truncated": false
    },
    {
      "slug": "llama3-2-1b-instruct",
      "display_name": "Llama3.2 1B Instruct",
      "model_version_id": 134,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    if not grid:\n        return 0\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(grid, i, j)\n                count += 1\n    return count\n\ndef dfs(grid, i, j):\n    if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] != 1:\n        return\n    grid[i][j] = 0\n    dfs(grid, i - 1, j)\n    dfs(grid, i + 1, j)\n    dfs(grid, i, j - 1)\n    dfs(grid, i, j + 1)\n```",
      "output_truncated": false
    },
    {
      "slug": "marco-o1-7b",
      "display_name": "Marco O1 7B",
      "model_version_id": 135,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "<Thought>\nAlright, I need to write a function that counts the number of islands in a grid. The grid consists of `0`s and `1`s, where `0` represents water and `1` represents land. An island is defined as a maximal group of `1`s connected 4-directionally, meaning only up, down, left, and right connections are considered, not diagonally. The function signature is `def count_islands(grid: list) -> int:`.\n\nFirst, I should think about how to approach this problem. One common method to solve island problems is using Depth-First Search (DFS) or Breadth-First Search (BFS). Both can be used to traverse the grid and identify connected components.\n\nLet me consider using DFS for this implementation. The idea is to iterate through each cell in the grid. When I encounter a `1`, it means I've found the start of a new island. I'll need to mark this cell as visited to avoid counting it multiple times. Then, I'll perform a DFS from this cell, exploring all its 4-directionally connected `1`s and marking them as visited as well.\n\nI'll need to handle edge cases, such as an empty grid or a grid with no `1`s. Also, I should ensure that the function handles grids of varying sizes, including non-square grids.\n\nAnother consideration is the time and space complexity. Since I'm visiting each cell once, the time complexity should be O(M*N), where M is the number of rows and N is the number of columns in the grid. The space complexity will also be O(M*N) in the worst case due to the recursion stack in DFS.\n\nI should also think about how to represent the grid. It's given as a list of lists, so I'll need to iterate through each sublist to access individual cells.\n\nLet me outline the steps:\n1. Initialize a counter for islands.\n2. Iterate through each cell in the grid.\n3. When a `1` is found, increment the island counter and perform DFS to mark all connected `1`s as visited.\n4. Return the total number of islands.\n\nNow, I'll start writing the code. I'll define a helper function `dfs` that takes the gr",
      "output_truncated": true
    },
    {
      "slug": "medgemma-27b-it",
      "display_name": "Medgemma 27B IT",
      "model_version_id": 217,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    num_islands = 0\n\n    def dfs(row, col):\n        if row < 0 or row >= rows or col < 0 or col >= cols or grid[row][col] == 0:\n            return\n\n        grid[row][col] = 0  # Mark as visited (sink the island)\n\n        # Explore adjacent cells\n        dfs(row + 1, col)\n        dfs(row - 1, col)\n        dfs(row, col + 1)\n        dfs(row, col - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                num_islands += 1\n                dfs(i, j)\n\n    return num_islands\n```",
      "output_truncated": false
    },
    {
      "slug": "google-medgemma-4b-it",
      "display_name": "medgemma-4b-it",
      "model_version_id": 13,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    num_islands = 0\n\n    def dfs(row, col):\n        if row < 0 or row >= rows or col < 0 or col >= cols or grid[row][col] == 0:\n            return\n\n        grid[row][col] = 0  # Mark as visited\n\n        # Explore neighbors\n        dfs(row + 1, col)\n        dfs(row - 1, col)\n        dfs(row, col + 1)\n        dfs(row, col - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                num_islands += 1\n                dfs(i, j)\n\n    return num_islands\n```",
      "output_truncated": false
    },
    {
      "slug": "medgemma1-5-4b-it",
      "display_name": "Medgemma1.5 4B IT",
      "model_version_id": 137,
      "run_id": "r20261029-bv1-3e4075",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 10
        }
      ],
      "output_text": "```python\nimport collections\n\ndef count_islands(grid: list) -> int:\n    \"\"\"\n    Counts the number of islands in a grid of 0s (water) and 1s (land).\n    An island is a maximal group of 1s connected 4-directionally.\n\n    Args:\n        grid: A list of lists representing the grid.\n\n    Returns:\n        The number of islands.\n    \"\"\"\n    if not grid or not grid[0]:\n        return 0\n\n    rows = len(grid)\n    cols = len(grid[0])\n    visited = set()\n    island_count = 0\n\n    def bfs(r, c):\n        \"\"\"Performs Breadth-First Search to find all connected land cells.\"\"\"\n        if not (0 <= r < rows and 0 <= c < cols) or \\\n           (r, c) in visited or \\\n           grid[r][c] == 0:\n            return\n        \n        q = collections.deque([(r, c)])\n        visited.add((r, c))\n        \n        while q:\n            curr_r, curr_c = q.popleft()\n            \n            # Explore neighbors\n            for dr, dc in [(0, 1), (0, -1), (1, 0), (-1, 0)]:\n                nr, nc = curr_r + dr, curr_c + dc\n                \n                if 0 <= nr < rows and 0 <= nc < cols and \\\n                   (nr, nc) not in visited and \\\n                   grid[nr][nc] == 1:\n                    visited.add((nr, nc))\n                    q.append((nr, nc))\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and (r, c) not in visited:\n                island_count += 1\n                bfs(r, c) # Explore the entire island\n\n    return island_count\n\n```",
      "output_truncated": false
    },
    {
      "slug": "meta-llama-meta-llama-3-8b-instruct",
      "display_name": "Meta-Llama-3-8B-Instruct",
      "model_version_id": 20,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(grid, i, j)\n                count += 1\n    return count\n\ndef dfs(grid, i, j):\n    if i<0 or j<0 or i>=len(grid) or j>=len(grid[0]) or grid[i][j] != 1:\n        return\n    grid[i][j] = '#'\n    dfs(grid, i-1, j)\n    dfs(grid, i+1, j)\n    dfs(grid, i, j-1)\n    dfs(grid, i, j+1)",
      "output_truncated": false
    },
    {
      "slug": "mistralai-ministral-3-14b-instruct-2512",
      "display_name": "Ministral 3 14B Instruct (2512)",
      "model_version_id": 26,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    count = 0\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                count += 1\n                _dfs(grid, i, j, rows, cols)\n\n    return count\n\ndef _dfs(grid: list, i: int, j: int, rows: int, cols: int) -> None:\n    if i < 0 or i >= rows or j < 0 or j >= cols or grid[i][j] != 1:\n        return\n\n    grid[i][j] = 0  # Mark as visited\n    _dfs(grid, i + 1, j, rows, cols)\n    _dfs(grid, i - 1, j, rows, cols)\n    _dfs(grid, i, j + 1, rows, cols)\n    _dfs(grid, i, j - 1, rows, cols)\n```",
      "output_truncated": false
    },
    {
      "slug": "ministral-3-3b-instruct-2512",
      "display_name": "Ministral 3 3B Instruct 2512",
      "model_version_id": 138,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 10
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False for _ in range(cols)] for _ in range(rows)]\n    directions = [(-1, 0), (1, 0), (0, -1), (0, 1)]\n    count = 0\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                count += 1\n                stack = [(i, j)]\n                visited[i][j] = True\n\n                while stack:\n                    x, y = stack.pop()\n                    for dx, dy in directions:\n                        nx, ny = x + dx, y + dy\n                        if 0 <= nx < rows and 0 <= ny < cols:\n                            if grid[nx][ny] == 1 and not visited[nx][ny]:\n                                visited[nx][ny] = True\n                                stack.append((nx, ny))\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "ministral-3-8b-instruct-2512",
      "display_name": "Ministral 3 8B Instruct 2512",
      "model_version_id": 139,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 10
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False for _ in range(cols)] for _ in range(rows)]\n    count = 0\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                count += 1\n                stack = [(i, j)]\n                visited[i][j] = True\n                while stack:\n                    x, y = stack.pop()\n                    for dx, dy in [(-1, 0), (1, 0), (0, -1), (0, 1)]:\n                        nx, ny = x + dx, y + dy\n                        if 0 <= nx < rows and 0 <= ny < cols:\n                            if grid[nx][ny] == 1 and not visited[nx][ny]:\n                                visited[nx][ny] = True\n                                stack.append((nx, ny))\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "mistral-7b-instruct-v0-3",
      "display_name": "Mistral 7B Instruct V0.3",
      "model_version_id": 140,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": " Here's the Python function for counting islands in a grid:\n\n```python\ndef count_islands(grid):\n    visited = set()\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1 and (i, j) not in visited:\n                d4 = [(0, 1), (1, 0), (-1, 0), (0, -1)]\n                stack = [(i, j)]\n                visited.add((i, j))\n                while stack:\n                    x, y = stack.pop()\n                    for dx, dy in d4:\n                        nx, ny = x + dx, y + dy\n                        if 0 <= nx < len(grid) and 0 <= ny < len(grid[0]) and grid[nx][ny] == 1 and (nx, ny) not in visited:\n                            stack.append((nx, ny))\n                            visited.add((nx, ny))\n                count += 1\n    return count\n```\n\nThis function uses depth-first search (DFS) to traverse the grid and count the number of islands. It initializes a visited set to keep track of the visited cells and a count variable to store the number of islands. The function iterates through the grid and checks each cell that has a value of 1 and hasn't been visited yet. If such a cell is found, it performs a DFS to explore the connected components of the island and increments the count.",
      "output_truncated": false
    },
    {
      "slug": "mistral-nemo-12b-instruct-2407",
      "display_name": "Mistral Nemo 12B Instruct 2407",
      "model_version_id": 141,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "def count_islands(grid):\n    if not grid: return 0\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(grid, i, j)\n    return count\n\ndef dfs(grid, i, j):\n    if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] != 1:\n        return\n    grid[i][j] = 0\n    dfs(grid, i-1, j)\n    dfs(grid, i+1, j)\n    dfs(grid, i, j-1)\n    dfs(grid, i, j+1)",
      "output_truncated": false
    },
    {
      "slug": "mistral-small-22b-instruct-2409",
      "display_name": "Mistral Small 22B Instruct 2409",
      "model_version_id": 218,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": " ```python\ndef count_islands(grid):\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    count = 0\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0:\n            return\n        grid[r][c] = 0\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                count += 1\n                dfs(r, c)\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "mistral-small-24b-instruct-2501",
      "display_name": "Mistral Small 24B Instruct 2501",
      "model_version_id": 219,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    def dfs(r, c):\n        grid[r][c] = 0\n        for dr, dc in [(-1, 0), (1, 0), (0, -1), (0, 1)]:\n            nr, nc = r + dr, c + dc\n            if 0 <= nr < len(grid) and 0 <= nc < len(grid[0]) and grid[nr][nc] == 1:\n                dfs(nr, nc)\n\n    count = 0\n    for r in range(len(grid)):\n        for c in range(len(grid[0])):\n            if grid[r][c] == 1:\n                count += 1\n                dfs(r, c)\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "mistralai-mistral-small-3-2-24b-instruct-2506",
      "display_name": "Mistral Small 3.2 24B Instruct (2506)",
      "model_version_id": 28,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows = len(grid)\n    cols = len(grid[0])\n    count = 0\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] != 1:\n            return\n        grid[r][c] = -1  # Mark as visited\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                count += 1\n                dfs(r, c)\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "mistral-small3-1-24b-instruct-2503",
      "display_name": "Mistral Small3.1 24B Instruct 2503",
      "model_version_id": 220,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or visited[r][c] or grid[r][c] == 0:\n            return\n        visited[r][c] = True\n        dfs(r - 1, c)\n        dfs(r + 1, c)\n        dfs(r, c - 1)\n        dfs(r, c + 1)\n\n    island_count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                island_count += 1\n\n    return island_count\n```",
      "output_truncated": false
    },
    {
      "slug": "mistralai-mistral-7b-instruct-v0-2",
      "display_name": "Mistral-7B-Instruct-v0.2",
      "model_version_id": 27,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": " ```python\ndef count_islands(grid):\n    if not grid: return 0\n    m, n = len(grid), len(grid[0])\n    visited = [[False]*n for _ in range(m)]\n    count = 0\n    for i in range(m):\n        for j in range(n):\n            if not visited[i][j] and grid[i][j]:\n                dfs(i, j, grid, visited)\n                count += 1\n    return count\n\ndef dfs(i, j, grid, visited):\n    if i<0 or i>=len(grid) or j<0 or j>=len(grid[0]) or visited[i][j] or not grid[i][j]: return\n    visited[i][j] = True\n    dfs(i+1, j, grid, visited)\n    dfs(i-1, j, grid, visited)\n    dfs(i, j+1, grid, visited)\n    dfs(i, j-1, grid, visited)\n```",
      "output_truncated": false
    },
    {
      "slug": "muse-glimmer-30b",
      "display_name": "Muse Glimmer 30B",
      "model_version_id": 222,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    dirs = [(1,0), (-1,0), (0,1), (0,-1)]\n    count = 0\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                count += 1\n                stack = [(i, j)]\n                visited[i][j] = True\n                while stack:\n                    x, y = stack.pop()\n                    for dx, dy in dirs:\n                        nx, ny = x + dx, y + dy\n                        if 0 <= nx < rows and 0 <= ny < cols:\n                            if grid[nx][ny] == 1 and not visited[nx][ny]:\n                                visited[nx][ny] = True\n                                stack.append((nx, ny))\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "bartowski-nanbeige-nanbeige4-3-33b",
      "display_name": "Nanbeige_Nanbeige4.3-33B",
      "model_version_id": 197,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    count = 0\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0:\n            return\n        grid[r][c] = 0\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                count += 1\n                dfs(r, c)\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "nemotron-3-5-bolt-e4b",
      "display_name": "Nemotron 3.5 Bolt E4B",
      "model_version_id": 223,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n\n    rows = len(grid)\n    cols = len(grid[0])\n    num_islands = 0\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0:\n            return\n        \n        # Mark as visited by changing '1' to '0'\n        grid[r][c] = 0\n        \n        # Explore neighbors\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                num_islands += 1\n                # Start DFS to sink the entire island\n                dfs(r, c)\n                \n    return num_islands\n```",
      "output_truncated": false
    },
    {
      "slug": "nemotron-3-5-lightning-30b-a3b",
      "display_name": "Nemotron 3.5 Lightning 30B A3B",
      "model_version_id": 224,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols:\n            return\n        if grid[r][c] == 0 or visited[r][c]:\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    count = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "nemotron-cascade-2-30b-a3b",
      "display_name": "Nemotron Cascade 2 30B A3B",
      "model_version_id": 225,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 10
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n\n    def dfs(r, c):\n        stack = [(r, c)]\n        while stack:\n            x, y = stack.pop()\n            if x < 0 or x >= rows or y < 0 or y >= cols:\n                continue\n            if visited[x][y] or grid[x][y] == 0:\n                continue\n            visited[x][y] = True\n            stack.extend([(x - 1, y), (x + 1, y), (x, y - 1), (x, y + 1)])\n\n    islands = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(i, j)\n                islands += 1\n    return islands\n```",
      "output_truncated": false
    },
    {
      "slug": "nemotron-mini-4b-instruct",
      "display_name": "Nemotron Mini 4B Instruct",
      "model_version_id": 142,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": " ```python\ndef count_islands(grid):\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[i])):\n            if grid[i][j] == 1:\n                count += 1\n                # DFS to find all connected 1s\n                def dfs(i, j):\n                    grid[i][j] = 0\n                    if i > 0 and grid[i-1][j] == 1:\n                        dfs(i-1, j)\n                    if i < len(grid)-1 and grid[i+1][j] == 1:\n                        dfs(i+1, j)\n                    if j > 0 and grid[i][j-1] == 1:\n                        dfs(i, j-1)\n                    if j < len(grid[i])-1 and grid[i][j+1] == 1:\n                        dfs(i, j+1)\n                dfs(i, j)\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "nemotron3-33b",
      "display_name": "Nemotron3 33B",
      "model_version_id": 226,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "\n```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n\n    def dfs(r, c):\n        if (r < 0 or r >= rows or c < 0 or c >= cols or\n                visited[r][c] or grid[r][c] == 0):\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "nvidia-nemotron-3-nano-30b-a3b",
      "display_name": "NVIDIA Nemotron 3 Nano 30B-A3B",
      "model_version_id": 30,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n\n    def dfs(r, c):\n        if (\n            r < 0 or r >= rows or\n            c < 0 or c >= cols or\n            visited[r][c] or\n            grid[r][c] == 0\n        ):\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    islands = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                islands += 1\n                dfs(i, j)\n\n    return islands\n```",
      "output_truncated": false
    },
    {
      "slug": "olmo-3-1-32b-instruct",
      "display_name": "Olmo 3.1 32B Instruct",
      "model_version_id": 227,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "def count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0:\n            return\n        grid[r][c] = 0\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                dfs(r, c)\n                count += 1\n    return count",
      "output_truncated": false
    },
    {
      "slug": "allenai-olmo-3-7b-instruct",
      "display_name": "Olmo-3-7B-Instruct",
      "model_version_id": 1,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "def count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False]*cols for _ in range(rows)]\n    count = 0\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or visited[r][c] or grid[r][c] != 1:\n            return\n        visited[r][c] = True\n        dfs(r-1,c)\n        dfs(r+1,c)\n        dfs(r,c-1)\n        dfs(r,c+1)\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                count += 1\n                dfs(i,j)\n    return count",
      "output_truncated": false
    },
    {
      "slug": "allenai-olmo-3-7b-think",
      "display_name": "Olmo-3-7B-Think",
      "model_version_id": 229,
      "run_id": "r20261105-bv1-2abe78",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n    \n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(i, j)\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "opencoder-1-5b-instruct",
      "display_name": "Opencoder 1.5B Instruct",
      "model_version_id": 145,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "Here is the code to solve this problem:\n```python\nfrom typing import List\n\ndef count_islands(grid: List[List[int]]) -> int:\n    if not grid:\n        return 0\n\n    def dfs(i: int, j: int) -> None:\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(i-1, j)\n        dfs(i+1, j)\n        dfs(i, j-1)\n        dfs(i, j+1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```\n",
      "output_truncated": false
    },
    {
      "slug": "openthinker-7b-v2",
      "display_name": "Openthinker 7B V2",
      "model_version_id": 146,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 4
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "<think>\nOkay, I need to write a Python function called count_islands that takes a grid as input and returns the number of islands. The grid consists of 0s and 1s, where 1s are land and 0s are water. An island is a group of 1s connected 4-directionally, meaning up, down, left, right. Diagonals don't count.\n\nHmm, so the problem is similar to the number of connected components in a graph, where each cell is a node and edges exist between adjacent cells (up, down, left, right) if they are both land.\n\nSo the approach here is to traverse the grid and for each land cell that hasn't been visited yet, perform a search (like BFS or DFS) to mark all connected land cells as part of the same island. Each time we start a new search, that's a new island.\n\nLet me think about the steps:\n\n1. Iterate through each cell in the grid.\n2. When a cell with value 1 is found that hasn't been visited, increment the island count.\n3. Then, perform a search (BFS or DFS) to mark all connected 1s as visited.\n\nBut how to track visited cells? Since the grid is made of 0s and 1s, maybe we can modify the grid in place by changing visited 1s to 0s. That way, we don't need extra space for a visited matrix. That's efficient.\n\nSo the plan is:\n\n- Initialize a count to 0.\n- Loop through each row and column in the grid.\n- For each cell (i,j):\n   - If grid[i][j] is 1, increment count by 1.\n   - Then, perform a BFS or DFS to mark all connected 1s as visited (by setting them to 0).\n\nWhich traversal method is better here? Both are acceptable. Let's pick BFS for this example.\n\nWait, but modifying the grid might not be allowed if the function is supposed to leave the grid as is. But the problem statement doesn't mention that. The examples show that the grid is passed, but in Python, lists are mutable. So modifying the grid in place is acceptable here, as it's allowed to change the input. But maybe the user expects the grid to remain unchanged. Wait, but in the examples, the function returns the count, and the grid ",
      "output_truncated": true
    },
    {
      "slug": "ornith-9b",
      "display_name": "Ornith 9B",
      "model_version_id": 147,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    count = 0\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] != 1:\n            return\n        grid[r][c] = 0\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "ornith-ai-ornith-1-5-9b",
      "display_name": "Ornith-1.5-9B",
      "model_version_id": 31,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols:\n            return\n        if grid[r][c] == 0 or visited[r][c]:\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "phi-2-7b-chat-v2",
      "display_name": "Phi 2.7B Chat V2",
      "model_version_id": 148,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "\n\ndef count_islands(grid):\n    if not grid:\n        return 0\n    \n    rows = len(grid)\n    cols = len(grid[0])\n    \n    visited = [[False for _ in range(cols)] for _ in range(rows)]\n    \n    def dfs(row, col):\n        if row < 0 or row >= rows or col < 0 or col >= cols or visited[row][col] or grid[row][col] == 0:\n            return\n        \n        visited[row][col] = True\n        \n        dfs(row - 1, col)\n        dfs(row + 1, col)\n        dfs(row, col - 1)\n        dfs(row, col + 1)\n    \n    count = 0\n    \n    for row in range(rows):\n        for col in range(cols):\n            if not visited[row][col] and grid[row][col] == 1:\n                dfs(row, col)\n                count += 1\n    \n    return count\n\n# Example usage:\ngrid = [[1,1,0],[0,1,0],[0,0,1]]\nprint(count_islands(grid)) # Output: 2\n\ngrid = [[0,0],[0,0]]\nprint(count_islands(grid)) # Output: 0\n\n# Explanation:\n# The function count_islands takes a grid as input and returns the number of islands in the grid.\n# It uses a depth-first search (DFS) algorithm to traverse the grid and mark visited cells.\n# The DFS function takes the row and column indices of a cell as input and recursively visits all connected land cells.\n# The count variable keeps track of the number of islands found.\n# The function returns the count of islands in the grid.\n",
      "output_truncated": false
    },
    {
      "slug": "microsoft-phi-3-mini-4k-instruct",
      "display_name": "Phi-3-mini-4k-instruct",
      "model_version_id": 22,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    if not grid or not grid[0]:\n        return 0\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count +=  employee_count_islands(grid, i, j)\n    return count\n\ndef employee_count_islands(grid, i, j):\n    if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n        return 0\n    grid[i][j] = 0\n    employee_count_islands(grid, i + 1, j)\n    employee_count_islands(grid, i - 1, j)\n    employee_count_islands(grid, i, j + 1)\n    employee_count_islands(grid, i, j - 1)\n    return 1\n```",
      "output_truncated": false
    },
    {
      "slug": "microsoft-phi-3-5-mini-instruct",
      "display_name": "Phi-3.5-mini-instruct",
      "model_version_id": 21,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    if not grid or not grid[0]:\n        return 0\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i+1, j)\n        dfs(i-1, j)\n        dfs(i, j+1)\n        dfs(i, j-1)\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```\n",
      "output_truncated": false
    },
    {
      "slug": "microsoft-phi-4",
      "display_name": "phi-4",
      "model_version_id": 23,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(x, y):\n        if x < 0 or x >= len(grid) or y < 0 or y >= len(grid[0]) or grid[x][y] == 0:\n            return\n        grid[x][y] = 0\n        dfs(x + 1, y)\n        dfs(x - 1, y)\n        dfs(x, y + 1)\n        dfs(x, y - 1)\n\n    if not grid:\n        return 0\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "microsoft-phi-4-mini-instruct",
      "display_name": "Phi-4-mini-instruct",
      "model_version_id": 24,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(r, c):\n        if r < 0 or c < 0 or r >= len(grid) or c >= len(grid[r]) or grid[r][c] == 0:\n            return\n        grid[r][c] = 0\n        dfs(r-1, c)\n        dfs(r+1, c)\n        dfs(r, c-1)\n        dfs(r, c+1)\n\n    count = 0\n    for r in range(len(grid)):\n        for c in range(len(grid[r])):\n            if grid[r][c] == 1:\n                dfs(r, c)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "phi3-14b-medium-128k-instruct",
      "display_name": "Phi3 14B Medium 128K Instruct",
      "model_version_id": 149,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "def count_islands(grid):\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        for x, y in [(i-1, j), (i+1, j), (i, j-1), (i, j+1)]:\n            dfs(x, y)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(i, j)\n    return count",
      "output_truncated": false
    },
    {
      "slug": "phi3-3-8b-mini-128k-instruct",
      "display_name": "Phi3 3.8B Mini 128K Instruct",
      "model_version_id": 150,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i+1, j)\n        dfs(i-1, j)\n        dfs(i, j+1)\n        dfs(i, j-1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen2-1-5b-instruct",
      "display_name": "Qwen2 1.5B Instruct",
      "model_version_id": 158,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(x, y):\n        if 0 <= x < len(grid) and 0 <= y < len(grid[0]) and grid[x][y] == 1:\n            grid[x][y] = 0\n            dfs(x - 1, y)\n            dfs(x + 1, y)\n            dfs(x, y - 1)\n            dfs(x, y + 1)\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen2-math-7b-instruct",
      "display_name": "Qwen2 Math 7B Instruct",
      "model_version_id": 194,
      "run_id": "r20261028-bv1-ef0895",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(x, y):\n        if 0 <= x < len(grid) and 0 <= y < len(grid[0]) and grid[x][y] == 1:\n            grid[x][y] = 0\n            dfs(x+1, y)\n            dfs(x-1, y)\n            dfs(x, y+1)\n            dfs(x, y-1)\n    \n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(i, j)\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen2-vl-7b-instruct",
      "display_name": "Qwen2-VL-7B-Instruct",
      "model_version_id": 43,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    def dfs(r, c):\n        if r < 0 or c < 0 or r >= len(grid) or c >= len(grid[0]) or grid[r][c] == 0:\n            return\n        grid[r][c] = 0\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    count = 0\n    for r in range(len(grid)):\n        for c in range(len(grid[0])):\n            if grid[r][c] == 1:\n                dfs(r, c)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen2-5-0-5b-instruct",
      "display_name": "Qwen2.5 0.5B Instruct",
      "model_version_id": 159,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    \"\"\"\n    Counts the number of islands in a grid of 0s and 1s.\n    \n    Args:\n    grid: A 2D list representing the grid of 0s and 1s.\n    \n    Returns:\n    An integer representing the number of islands.\n    \"\"\"\n    def dfs(x, y):\n        if x < 0 or x >= len(grid) or y < 0 or y >= len(grid[0]) or grid[x][y] == 0:\n            return\n        grid[x][y] = 0  # Mark the cell as visited\n        dfs(x + 1, y)  # Explore the right neighbor\n        dfs(x - 1, y)  # Explore the left neighbor\n        dfs(x, y + 1)  # Explore the down neighbor\n        dfs(x, y - 1)  # Explore the up neighbor\n    \n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(i, j)  # Start DFS from each island cell\n    return count\n\n# Example usage\ngrid = [[1,1,0,0,0],[0,1,1,0,0],[0,0,0,1,0]]\nprint(count_islands(grid))  # Output: 2\n```\n\nThis solution defines a function `count_islands` that takes a 2D list `grid` as input and returns the number of islands in the grid. It uses a depth-first search (DFS) approach to explore each island and mark visited cells. The `dfs` function is called for each cell in the grid, and the total count of islands is returned.",
      "output_truncated": false
    },
    {
      "slug": "qwen2-5-1-5b-instruct",
      "display_name": "Qwen2.5 1.5B Instruct",
      "model_version_id": 160,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if 0 <= i < len(grid) and 0 <= j < len(grid[0]) and grid[i][j] == 1:\n            grid[i][j] = 0  # Mark as visited\n            dfs(i + 1, j)  # Down\n            dfs(i - 1, j)  # Up\n            dfs(i, j + 1)  # Right\n            dfs(i, j - 1)  # Left\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen2-5-coder-0-5b-instruct",
      "display_name": "Qwen2.5 Coder 0.5B Instruct",
      "model_version_id": 161,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(x, y):\n        if x < 0 or x >= len(grid) or y < 0 or y >= len(grid[0]) or grid[x][y] == 0:\n            return\n        grid[x][y] = 0\n        for dx, dy in [(-1, 0), (1, 0), (0, -1), (0, 1)]:\n            dfs(x + dx, y + dy)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen2-5-coder-1-5b-instruct",
      "display_name": "Qwen2.5 Coder 1.5B Instruct",
      "model_version_id": 162,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0  # Mark the cell as visited\n        dfs(i + 1, j)  # Explore down\n        dfs(i - 1, j)  # Explore up\n        dfs(i, j + 1)  # Explore right\n        dfs(i, j - 1)  # Explore left\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen2-5-14b-instruct",
      "display_name": "Qwen2.5-14B-Instruct",
      "model_version_id": 32,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 10
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    island_count = 0\n\n    def dfs(r, c):\n        if (\n            r < 0\n            or r >= rows\n            or c < 0\n            or c >= cols\n            or grid[r][c] == 0\n            or visited[r][c]\n        ):\n            return\n        visited[r][c] = True\n        directions = [(0, 1), (1, 0), (0, -1), (-1, 0)]\n        for dr, dc in directions:\n            dfs(r + dr, c + dc)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                island_count += 1\n\n    return island_count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen2-5-32b-instruct",
      "display_name": "Qwen2.5-32B-Instruct",
      "model_version_id": 33,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i+1, j)\n        dfs(i-1, j)\n        dfs(i, j+1)\n        dfs(i, j-1)\n    \n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen2-5-3b-instruct",
      "display_name": "Qwen2.5-3B-Instruct",
      "model_version_id": 34,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = set()\n    def dfs(r, c):\n        if (\n            r not in range(rows) or\n            c not in range(cols) or\n            (r, c) in visited or\n            grid[r][c] == 0\n        ):\n            return\n        visited.add((r, c))\n        directions = [(0, 1), (1, 0), (0, -1), (-1, 0)]\n        for dr, dc in directions:\n            dfs(r + dr, c + dc)\n\n    island_count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and (r, c) not in visited:\n                dfs(r, c)\n                island_count += 1\n\n    return island_count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen2-5-7b-instruct",
      "display_name": "Qwen2.5-7B-Instruct",
      "model_version_id": 35,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = set()\n    \n    def dfs(r, c):\n        if (r, c) in visited or r < 0 or c < 0 or r == rows or c == cols or grid[r][c] == 0:\n            return\n        visited.add((r, c))\n        directions = [(0, 1), (1, 0), (0, -1), (-1, 0)]\n        for dr, dc in directions:\n            dfs(r + dr, c + dc)\n    \n    island_count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and (r, c) not in visited:\n                dfs(r, c)\n                island_count += 1\n                \n    return island_count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen2-5-coder-14b-instruct",
      "display_name": "Qwen2.5-Coder-14B-Instruct",
      "model_version_id": 36,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen2-5-coder-32b-instruct",
      "display_name": "Qwen2.5-Coder-32B-Instruct",
      "model_version_id": 37,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen2-5-coder-3b-instruct",
      "display_name": "Qwen2.5-Coder-3B-Instruct",
      "model_version_id": 38,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0  # Mark the cell as visited\n        dfs(i + 1, j)  # Explore down\n        dfs(i - 1, j)  # Explore up\n        dfs(i, j + 1)  # Explore right\n        dfs(i, j - 1)  # Explore left\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen2-5-coder-7b-instruct",
      "display_name": "Qwen2.5-Coder-7B-Instruct",
      "model_version_id": 39,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i-1, j)\n        dfs(i+1, j)\n        dfs(i, j-1)\n        dfs(i, j+1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen2-5-vl-32b-instruct",
      "display_name": "Qwen2.5-VL-32B-Instruct",
      "model_version_id": 40,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    count = 0\n    \n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0 or visited[r][c]:\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    \n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                count += 1\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen2-5-vl-3b-instruct",
      "display_name": "Qwen2.5-VL-3B-Instruct",
      "model_version_id": 41,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(r, c):\n        if r < 0 or c < 0 or r >= len(grid) or c >= len(grid[0]) or grid[r][c] == 0:\n            return\n        grid[r][c] = 0\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    \n    count = 0\n    for r in range(len(grid)):\n        for c in range(len(grid[0])):\n            if grid[r][c] == 1:\n                dfs(r, c)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen2-5-vl-7b-instruct",
      "display_name": "Qwen2.5-VL-7B-Instruct",
      "model_version_id": 42,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = -1  # Mark as visited\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen3-vl-2b-instruct",
      "display_name": "Qwen3 VL 2B Instruct",
      "model_version_id": 168,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 10
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    islands = 0\n    \n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                islands += 1\n                # Do DFS to mark all connected 1s as visited\n                stack = [(r, c)]\n                visited[r][c] = True\n                \n                while stack:\n                    row, col = stack.pop()\n                    # Check all 4 directions\n                    directions = [(0, 1), (0, -1), (1, 0), (-1, 0)]\n                    for dr, dc in directions:\n                        new_row, new_col = row + dr, col + dc\n                        if (0 <= new_row < rows and 0 <= new_col < cols and\n                            not visited[new_row][new_col] and grid[new_row][new_col] == 1):\n                            visited[new_row][new_col] = True\n                            stack.append((new_row, new_col))\n    \n    return islands\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-14b",
      "display_name": "Qwen3-14B",
      "model_version_id": 44,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False for _ in range(cols)] for _ in range(rows)]\n    count = 0\n\n    def dfs(r, c):\n        if r < 0 or c < 0 or r >= rows or c >= cols or grid[r][c] == 0 or visited[r][c]:\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-30b-a3b",
      "display_name": "Qwen3-30B-A3B",
      "model_version_id": 45,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False for _ in range(cols)] for _ in range(rows)]\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0 or visited[r][c]:\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-30b-a3b-instruct-2507",
      "display_name": "Qwen3-30B-A3B-Instruct-2507",
      "model_version_id": 46,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    islands = 0\n    \n    def dfs(r, c):\n        if (r < 0 or r >= rows or c < 0 or c >= cols or \n            visited[r][c] or grid[r][c] == 0):\n            return\n        \n        visited[r][c] = True\n        # Explore 4-directionally\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    \n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(i, j)\n                islands += 1\n    \n    return islands\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-32b",
      "display_name": "Qwen3-32B",
      "model_version_id": 47,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False for _ in range(cols)] for _ in range(rows)]\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0 or visited[r][c]:\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-4b",
      "display_name": "Qwen3-4B",
      "model_version_id": 48,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = [[False for _ in range(cols)] for _ in range(rows)]\n    count = 0\n    \n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                # Perform BFS to mark all connected 1s as visited\n                from collections import deque\n                q = deque()\n                q.append((i, j))\n                visited[i][j] = True\n                while q:\n                    x, y = q.popleft()\n                    for dx, dy in [(-1, 0), (1, 0), (0, -1), (0, 1)]:\n                        nx, ny = x + dx, y + dy\n                        if 0 <= nx < rows and 0 <= ny < cols and not visited[nx][ny] and grid[nx][ny] == 1:\n                            visited[nx][ny] = True\n                            q.append((nx, ny))\n                count += 1\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-4b-instruct-2507",
      "display_name": "Qwen3-4B-Instruct-2507",
      "model_version_id": 49,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows = len(grid)\n    cols = len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    count = 0\n    \n    def dfs(r, c):\n        if (r < 0 or r >= rows or c < 0 or c >= cols or \n            visited[r][c] or grid[r][c] == 0):\n            return\n        visited[r][c] = True\n        # Explore all 4 directions\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    \n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(i, j)\n                count += 1\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-8b",
      "display_name": "Qwen3-8B",
      "model_version_id": 57,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    count = 0\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0:\n            return\n        grid[r][c] = 0\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                count += 1\n                dfs(r, c)\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-coder-30b-a3b-instruct",
      "display_name": "Qwen3-Coder-30B-A3B-Instruct",
      "model_version_id": 58,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 10
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    islands = 0\n    \n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0 or visited[r][c]:\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    \n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(i, j)\n                islands += 1\n    \n    return islands\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-coder-next",
      "display_name": "Qwen3-Coder-Next",
      "model_version_id": 68,
      "run_id": "r20261012-bv1-6a1291",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 10
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    \n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols:\n            return\n        if grid[r][c] == 0 or visited[r][c]:\n            return\n        \n        visited[r][c] = True\n        dfs(r+1, c)\n        dfs(r-1, c)\n        dfs(r, c+1)\n        dfs(r, c-1)\n    \n    count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                count += 1\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-vl-30b-a3b-instruct",
      "display_name": "Qwen3-VL-30B-A3B-Instruct",
      "model_version_id": 59,
      "run_id": "r20261012-bv1-6a1291",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    count = 0\n    \n    def dfs(r, c):\n        if (r < 0 or r >= rows or c < 0 or c >= cols or \n            grid[r][c] == 0 or visited[r][c]):\n            return\n        visited[r][c] = True\n        # Explore all 4 directions\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    \n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(i, j)\n                count += 1\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-vl-32b-instruct",
      "display_name": "Qwen3-VL-32B-Instruct",
      "model_version_id": 60,
      "run_id": "r20261012-bv1-6a1291",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    count = 0\n    \n    def dfs(r, c):\n        if (r < 0 or r >= rows or c < 0 or c >= cols or \n            visited[r][c] or grid[r][c] == 0):\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    \n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                count += 1\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-vl-4b-instruct",
      "display_name": "Qwen3-VL-4B-Instruct",
      "model_version_id": 61,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    count = 0\n    \n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or grid[r][c] == 0 or visited[r][c]:\n            return\n        visited[r][c] = True\n        # Check 4 directions: up, down, left, right\n        for dr, dc in [(0, 1), (0, -1), (1, 0), (-1, 0)]:\n            dfs(r + dr, c + dc)\n    \n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                count += 1\n                dfs(i, j)\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-vl-8b-instruct",
      "display_name": "Qwen3-VL-8B-Instruct",
      "model_version_id": 62,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = set()\n    islands = 0\n    \n    def dfs(r, c):\n        if (r < 0 or r >= rows or c < 0 or c >= cols or \n            grid[r][c] == 0 or (r, c) in visited):\n            return\n        visited.add((r, c))\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    \n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and (r, c) not in visited:\n                dfs(r, c)\n                islands += 1\n    \n    return islands\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen3-5-2b",
      "display_name": "Qwen3.5 2B",
      "model_version_id": 167,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows = len(grid)\n    cols = len(grid[0])\n    \n    visited = [[False for _ in range(cols)] for _ in range(rows)]\n    islands = 0\n    \n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols or visited[r][c] or grid[r][c] == 0:\n            return\n        visited[r][c] = True\n        for dr, dc in [(-1, 0), (1, 0), (0, -1), (0, 1)]:\n            dfs(r + dr, c + dc)\n    \n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                islands += 1\n                dfs(r, c)\n    \n    return islands\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-5-27b",
      "display_name": "Qwen3.5-27B",
      "model_version_id": 50,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    \n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols:\n            return\n        if grid[r][c] == 0 or visited[r][c]:\n            return\n        \n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    \n    count = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(i, j)\n                count += 1\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-5-35b-a3b",
      "display_name": "Qwen3.5-35B-A3B",
      "model_version_id": 51,
      "run_id": "r20261012-bv1-6a1291",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    \n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols:\n            return\n        if visited[r][c] or grid[r][c] == '0' or grid[r][c] == 0:\n            return\n        \n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    \n    count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                count += 1\n                dfs(r, c)\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-5-4b",
      "display_name": "Qwen3.5-4B",
      "model_version_id": 52,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 10
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 10
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows = len(grid)\n    cols = len(grid[0])\n    visited = [[False for _ in range(cols)] for _ in range(rows)]\n    count = 0\n    \n    def dfs(r, c):\n        stack = [(r, c)]\n        while stack:\n            curr_r, curr_c = stack.pop()\n            if curr_r < 0 or curr_r >= rows or curr_c < 0 or curr_c >= cols:\n                continue\n            if grid[curr_r][curr_c] == 0 or visited[curr_r][curr_c]:\n                continue\n            \n            visited[curr_r][curr_c] = True\n            stack.append((curr_r + 1, curr_c))\n            stack.append((curr_r - 1, curr_c))\n            stack.append((curr_r, curr_c + 1))\n            stack.append((curr_r, curr_c - 1))\n    \n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                count += 1\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-5-9b",
      "display_name": "Qwen3.5-9B",
      "model_version_id": 53,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 10
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    island_count = 0\n\n    def dfs(r, c):\n        stack = [(r, c)]\n        visited[r][c] = True\n        while stack:\n            curr_r, curr_c = stack.pop()\n            for dr, dc in [(-1, 0), (1, 0), (0, -1), (0, 1)]:\n                nr, nc = curr_r + dr, curr_c + dc\n                if 0 <= nr < rows and 0 <= nc < cols:\n                    if not visited[nr][nc] and grid[nr][nc] == 1:\n                        visited[nr][nc] = True\n                        stack.append((nr, nc))\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                island_count += 1\n                dfs(r, c)\n\n    return island_count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-6-27b",
      "display_name": "Qwen3.6-27B",
      "model_version_id": 54,
      "run_id": "r20261012-bv1-6a1291",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows = len(grid)\n    cols = len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    \n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols:\n            return\n        if grid[r][c] == 0 or visited[r][c]:\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    \n    count = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-6-35b-a3b",
      "display_name": "Qwen3.6-35B-A3B",
      "model_version_id": 55,
      "run_id": "r20261012-bv1-6a1291",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 10
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows = len(grid)\n    cols = len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    \n    def dfs(r, c):\n        stack = [(r, c)]\n        while stack:\n            curr_r, curr_c = stack.pop()\n            if 0 <= curr_r < rows and 0 <= curr_c < cols and not visited[curr_r][curr_c] and grid[curr_r][curr_c] == 1:\n                visited[curr_r][curr_c] = True\n                stack.extend([\n                    (curr_r - 1, curr_c),\n                    (curr_r + 1, curr_c),\n                    (curr_r, curr_c - 1),\n                    (curr_r, curr_c + 1)\n                ])\n    \n    count = 0\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                dfs(r, c)\n                count += 1\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-8-27b",
      "display_name": "Qwen3.8-27B",
      "model_version_id": 56,
      "run_id": "r20261012-bv1-6a1291",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows = len(grid)\n    cols = len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    \n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols:\n            return\n        if visited[r][c] or grid[r][c] == 0:\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    \n    count = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                count += 1\n                dfs(i, j)\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwq-32b",
      "display_name": "QwQ 32B",
      "model_version_id": 239,
      "run_id": "r20261105-bv1-2abe78",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "\n\n```python\nfrom collections import deque\n\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    rows = len(grid)\n    cols = len(grid[0])\n    count = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                count += 1\n                queue = deque()\n                queue.append((i, j))\n                grid[i][j] = 0\n                while queue:\n                    x, y = queue.popleft()\n                    for dx, dy in [(-1, 0), (1, 0), (0, -1), (0, 1)]:\n                        nx = x + dx\n                        ny = y + dy\n                        if 0 <= nx < rows and 0 <= ny < cols and grid[nx][ny] == 1:\n                            grid[nx][ny] = 0\n                            queue.append((nx, ny))\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "internscience-sage-a1-5-q4-k-m-latest",
      "display_name": "Sage-A1.5-Q4_K_M",
      "model_version_id": 212,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 8
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    count = 0\n\n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols:\n            return\n        if visited[r][c] or grid[r][c] == 0:\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1 and not visited[r][c]:\n                count += 1\n                dfs(r, c)\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "smallthinker-3b-preview",
      "display_name": "Smallthinker 3B Preview",
      "model_version_id": 173,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 2
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "Alright, I need to write a function that counts the number of islands in a grid. The grid is made up of 0s and 1s, where 0s are water and 1s are land. An island is a group of connected 1s (up, down, left, right) that are not connected to any other 1s. The function should return the number of such islands.\n\nFirst, I need to understand what constitutes an island. An island is a connected component of 1s, and it's maximal, meaning it can't be broken down into smaller groups without separating some 1s. So, I need to traverse the grid and identify these connected components.\n\nI think the best way to approach this is using a depth-first search (DFS) or breadth-first search (BFS). Both can be used to explore each island and mark the cells as visited once they're part of an island.\n\nLet me consider using DFS because it's simpler to implement recursively. I'll need to iterate through each cell in the grid. When I find a cell with a 1, I'll start a DFS from that cell to explore the entire island, marking all connected 1s as visited.\n\nI should also keep a visited matrix to avoid recounting cells that are already part of an island. But since the grid is given as a list of lists, I need to make sure that I'm not modifying the original grid, as that could affect the function's behavior.\n\nWait, actually, the problem doesn't specify whether the grid can be modified or not. To be safe, I should avoid modifying the grid. So, I'll create a separate visited matrix to keep track of visited cells.\n\nBut creating a separate visited matrix would require additional space, which might not be efficient. Is there a way to mark cells as visited without using extra space?\n\nOne way is to modify the grid itself, but as I thought earlier, it's better to avoid modifying the input grid to keep the function pure and avoid side effects.\n\nAlternatively, I can use a set to keep track of visited cells, but that would require additional space proportional to the number of cells.\n\nMaybe I can use a tuple to ",
      "output_truncated": true
    },
    {
      "slug": "huggingfacetb-smollm3-3b",
      "display_name": "SmolLM3-3B",
      "model_version_id": 14,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "\n```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    count = 0\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False for _ in range(cols)] for _ in range(rows)]\n    \n    def dfs(i, j):\n        if i < 0 or j < 0 or i >= rows or j >= cols or grid[i][j] == 0 or visited[i][j]:\n            return\n        visited[i][j] = True\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n    \n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "bartowski-spark-x2-6-4b",
      "display_name": "Spark-X2.6-4B",
      "model_version_id": 198,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows = len(grid)\n    cols = len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    count = 0\n    \n    def dfs(r, c):\n        if r < 0 or r >= rows or c < 0 or c >= cols:\n            return\n        if visited[r][c] or grid[r][c] == 0:\n            return\n        visited[r][c] = True\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n    \n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(i, j)\n                count += 1\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "translategemma-12b-it",
      "display_name": "Translategemma 12B IT",
      "model_version_id": 182,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0])\n    num_islands = 0\n\n    def dfs(row, col):\n        if row < 0 or row >= rows or col < 0 or col >= cols or grid[row][col] == 0:\n            return\n\n        grid[row][col] = 0  # Mark as visited\n\n        # Explore adjacent cells\n        dfs(row + 1, col)\n        dfs(row - 1, col)\n        dfs(row, col + 1)\n        dfs(row, col - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                num_islands += 1\n                dfs(i, j)\n\n    return num_islands\n```",
      "output_truncated": false
    },
    {
      "slug": "yi-34b-chat-v1-5",
      "display_name": "YI 34B Chat V1.5",
      "model_version_id": 228,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "def count_islands(grid):\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = -1\n        dfs(i - 1, j)\n        dfs(i + 1, j)\n        dfs(i, j - 1)\n        dfs(i, j + 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count",
      "output_truncated": false
    },
    {
      "slug": "yi-9b-chat-v1-5",
      "display_name": "YI 9B Chat V1.5",
      "model_version_id": 185,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "def count_islands(grid: list) -> int:\n    def dfs(i: int, j: int):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(i - 1, j)\n        dfs(i + 1, j)\n        dfs(i, j - 1)\n        dfs(i, j + 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(i, j)\n    return count\n",
      "output_truncated": false
    },
    {
      "slug": "yi-coder-1-5b-chat",
      "display_name": "YI Coder 1.5B Chat",
      "model_version_id": 186,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "Here is a Python solution using depth-first search (DFS).\n\n```python\ndef count_islands(grid):\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(i-1, j)\n        dfs(i+1, j)\n        dfs(i, j-1)\n        dfs(i, j+1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```\n\nThis function works by iterating over each cell in the grid. If a cell contains a `1`, it calls a DFS to mark all connected `1`s as `0`s. This is done by recursively calling the DFS on the neighboring cells (up/down/left/right).\n\nThe DFS is stopped when it encounters a cell that is not a `1` or when it has visited all neighboring cells.\n\nAfter visiting all cells, the function returns the number of islands found.\n\nThe time complexity of this function is O(m*n), where m is the number of rows and n is the number of columns in the grid. This is because in the worst case, the function visits every cell in the grid once.\n\nThe space complexity is O(m*n), where m is the number of rows and n is the number of columns in the grid. This is because in the worst case, the function uses a recursive call stack to store the cells that need to be visited.",
      "output_truncated": false
    },
    {
      "slug": "yi-coder-9b-chat",
      "display_name": "YI Coder 9B Chat",
      "model_version_id": 187,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 1.0,
      "verdict": "pass",
      "full_marks": true,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "def count_islands(grid):\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(i - 1, j)\n        dfs(i + 1, j)\n        dfs(i, j - 1)\n        dfs(i, j + 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n\n# Test cases\nprint(count_islands([[1,1,0],[0,1,0],[0,0,1]])) # -> 2\nprint(count_islands([[0,0],[0,0]])) # -> 0\nprint(count_islands([[1,0,1],[0,1,0],[1,0,1]])) # -> 5\nprint(count_islands([[1,1,1],[1,0,1],[1,1,1]])) # -> 1\nprint(count_islands([[0,0,0],[0,1,0],[0,0,0]])) # -> 1",
      "output_truncated": false
    },
    {
      "slug": "swiss-ai-apertus-8b-instruct-2509",
      "display_name": "Apertus-8B-Instruct-2509",
      "model_version_id": 195,
      "run_id": "r20261029-bv1-9ddd5f",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.875,
      "verdict": "88%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 6
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 6
        }
      ],
      "output_text": "def count_islands(grid: list) -> int:\n    islands = 0\n    rows, cols = len(grid), len(grid[0])\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                queue = [(r, c)]\n                while queue:\n                    x, y = queue.pop(0)\n                    for dx, dy in [(-1, 0), (1, 0), (0, -1), (0, 1)]:\n                        nx, ny = x + dx, y + dy\n                        if 0 <= nx < rows and 0 <= ny < cols and grid[nx][ny] == 1:\n                            grid[nx][ny] = 0\n                            queue.append((nx, ny))\n                islands += 1\n    return islands",
      "output_truncated": false
    },
    {
      "slug": "codegemma-7b-instruct-v1-1",
      "display_name": "Codegemma 7B Instruct V1.1",
      "model_version_id": 74,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.875,
      "verdict": "88%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 4
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 6
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    rows, cols = len(grid), len(grid[0])\n    count = 0\n\n    def dfs(i, j):\n        if i < 0 or i >= rows or j < 0 or j >= cols or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                count += 1\n                dfs(i, j)\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "tulu3-8b",
      "display_name": "Tulu3 8B",
      "model_version_id": 183,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.875,
      "verdict": "88%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 7
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 6
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(r, c):\n        grid[r][c] = 0\n        for dr, dc in [(0, 1), (0, -1), (1, 0), (-1, 0)]:\n            nr, nc = r + dr, c + dc\n            if 0 <= nr < R and 0 <= nc < C and grid[nr][nc] == 1:\n                dfs(nr, nc)\n\n    R, C = len(grid), len(grid[0])\n    count = 0\n    for r in range(R):\n        for c in range(C):\n            if grid[r][c] == 1:\n                dfs(r, c)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "mathstral-7b-v0-1",
      "display_name": "Mathstral 7B V0.1",
      "model_version_id": 136,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.75,
      "verdict": "75%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 3
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 5
        }
      ],
      "output_text": "1. First, we need to define the function `count_islands` that takes a grid as input.\n\n2. Inside the function, we initialize a variable `count` to 0, which will keep track of the number of islands.\n\n3. We then iterate over each row in the grid using a nested loop.\n\n4. For each cell in the grid, we check if it is a land cell (i.e., its value is 1). If it is, we increment the `count` variable.\n\n5. We then recursively call the `count_islands` function on the neighboring cells (up, down, left, and right) to count the number of connected land cells.\n\n6. Finally, we return the `count` variable, which represents the total number of islands in the grid.\n\nHere is the Python code for the `count_islands` function:\n\n```python\ndef count_islands(grid):\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += 1\n                grid[i][j] = 0\n                if i > 0:\n                    grid[i-1][j] = 0\n                if i < len(grid)-1:\n                    grid[i+1][j] = 0\n                if j > 0:\n                    grid[i][j-1] = 0\n                if j < len(grid[0])-1:\n                    grid[i][j+1] = 0\n    return count\n```\n\nYou can test the function with the provided examples:\n\n```python\nprint(count_islands([[1,1,0],[0,1,0],[0,0,1]]))  # Output: 2\nprint(count_islands([[0,0],[0,0]]))  # Output: 0\n```",
      "output_truncated": false
    },
    {
      "slug": "gemma-2b-instruct-v1-1",
      "display_name": "Gemma 2B Instruct V1.1",
      "model_version_id": 100,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.375,
      "verdict": "38%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 2
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 4
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                connected = 0\n                for dx, dy in [(1, 0), (-1, 0), (0, 1), (0, -1)]:\n                    if 0 <= i + dx < len(grid) and 0 <= j + dy < len(grid[0]) and grid[i + dx][j + dy] == 1:\n                        connected += 1\n                count += connected\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "granite-code-3b-instruct",
      "display_name": "Granite Code 3B Instruct",
      "model_version_id": 108,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.375,
      "verdict": "38%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 3
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 4
        }
      ],
      "output_text": "Here is a Python function that implements this approach:\n\n```python\ndef count_islands(grid):\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += 1\n                grid[i][j] = 0\n                dfs(grid, i, j)\n    return count\n\ndef dfs(grid, i, j):\n    if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n        return\n    grid[i][j] = 0\n    dfs(grid, i + 1, j)\n    dfs(grid, i - 1, j)\n    dfs(grid, i, j + 1)\n    dfs(grid, i, j - 1)\n```\n\nThe function `count_islands` takes a grid as input and returns the number of islands. It initializes a counter variable `count` to keep track of the number of islands. It then iterates over each cell in the grid and checks if it is a land cell (value `1`). If it is, it increments the counter and marks the cell as visited using the `dfs` function. The `dfs` function recursively explores the neighboring cells (up, down, left, and right) of the current cell. If a neighbor is out of bounds or has already been visited, it skips it. Otherwise, it marks the neighbor as visited and recursively calls itself on the neighbor. This process continues until all cells have been visited.",
      "output_truncated": false
    },
    {
      "slug": "qwen-0-5b-chat-v1-5",
      "display_name": "Qwen 0.5B Chat V1.5",
      "model_version_id": 152,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.375,
      "verdict": "38%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 3
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 3
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    count = 0\n    for row in grid:\n        for col in row:\n            if col == 1:\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-1-8b-chat-v1-5",
      "display_name": "Qwen 1.8B Chat V1.5",
      "model_version_id": 153,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "truncated",
      "done_reason": "length",
      "score": 0.375,
      "verdict": "38%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 3
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 4
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    count = 0\n    for row in grid:\n        for cell in row:\n            if cell == 1:\n                count += 1\n    return count\n```\n\nExplanation:\n- The function `count_islands` takes a 2D list `grid` as input.\n- The variable `count` is initialized to 0.\n- The outer loop `for row in grid:` iterates over each row in the input grid `grid`.\n- The inner loop `for cell in row:` iterates over each cell in the current row of `grid`.\n- Inside the inner loop, the condition `cell == 1` is checked.\n- If the condition is true, it means that the current cell is equal to 1.\n- In this case, the inner loop moves to the next cell in the current row.\n- After the inner loop finishes, the condition `cell == 1` is no longer true.\n- Inside the outer loop, the condition `row == 0` is checked.\n- If the condition is true, it means that the current row is equal to 0.\n- In this case, the outer loop moves to the next row in the input grid.\n- After the outer loop finishes, the condition `row == 0` is no longer true.\n- Inside the inner loop, the condition `cell == 0` is checked.\n- If the condition is true, it means that the current cell is equal to 0.\n- In this case, the inner loop moves to the next cell in the current row.\n- After the inner loop finishes, the condition `cell == 0` is no longer true.\n- Inside the outer loop, the condition `row == 1` is checked.\n- If the condition is true, it means that the current row is equal to 1.\n- In this case, the outer loop moves to the next row in the input grid.\n- After the outer loop finishes, the condition `row == 1` is no longer true.\n- Inside the inner loop, the condition `cell == 1` is checked.\n- If the condition is true, it means that the current cell is equal to 1.\n- In this case, the inner loop moves to the next cell in the current row.\n- After the inner loop finishes, the condition `cell == 1` is no longer true.\n- Inside the outer loop, the condition `row == 2` is checked.\n- If the condition is tr",
      "output_truncated": true
    },
    {
      "slug": "qwen3-1-7b",
      "display_name": "Qwen3 1.7B",
      "model_version_id": 166,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.375,
      "verdict": "38%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 3
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 4
        }
      ],
      "output_text": "def count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    \n    rows = len(grid)\n    cols = len(grid[0])\n    \n    islands = 0\n    \n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                islands += 1\n                mark_visited(grid, i, j)\n    \n    return islands\n\ndef mark_visited(grid, i, j):\n    grid[i][j] = 0  # Mark as visited by setting to 0",
      "output_truncated": false
    },
    {
      "slug": "smollm2-1-7b-instruct",
      "display_name": "Smollm2 1.7B Instruct",
      "model_version_id": 174,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.375,
      "verdict": "38%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 4
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 4
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += dfs(grid, i, j)\n    return count\n\ndef dfs(grid, i, j):\n    if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] == 0:\n        return 0\n    grid[i][j] = 0\n    return 1 + dfs(grid, i-1, j) + dfs(grid, i+1, j) + dfs(grid, i, j-1) + dfs(grid, i, j+1)\n```",
      "output_truncated": false
    },
    {
      "slug": "stablelm-zephyr-3b",
      "display_name": "Stablelm Zephyr 3B",
      "model_version_id": 179,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.375,
      "verdict": "38%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 2
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 4
        }
      ],
      "output_text": "Here is the Python code for the function `count_islands(grid)`:\n\n```python\ndef count_islands(grid):\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[i])):\n            if grid[i][j] == 1:\n                island = []\n                k = (i, j)\n                while k != (i, j) or grid[k[0]][k[1]] == 0:\n                    k = (k[0] + 1, k[1] + 1)\n                island.append(k)\n                island.extend([(x, y) for x, y in [(k[0] - 1, k[1] + 2), (k[0] + 1, k[1] + 2), (k[0], k[1] - 1), (k[0], k[1] + 1)]])\n                count += 1\n    return count\n```\n\nThis function iterates over the grid and checks if a cell contains land (1). If it does, it creates a list of coordinates that form the boundary of the island. It then extends this list with the coordinates of neighboring cells that are also part of the island. The function keeps track of the number of islands it has found and returns this count.",
      "output_truncated": false
    },
    {
      "slug": "stablelm2-12b-chat",
      "display_name": "Stablelm2 12B Chat",
      "model_version_id": 181,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.375,
      "verdict": "38%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 3
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 4
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(grid, i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n            return 0\n        grid[i][j] = 0  # Mark as visited\n        return 1 + dfs(grid, i - 1, j) + dfs(grid, i + 1, j) + dfs(grid, i, j - 1) + dfs(grid, i, j + 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += dfs(grid, i, j)\n    return count\n```\n\nThis function uses depth-first search (DFS) to traverse and count islands in the grid. It iterates through each cell in the grid and if a cell contains `1`, it starts a DFS to explore all connected cells. The DFS function `dfs` checks if a cell is within the grid boundaries, is land (`1`), and hasn't been visited before. If all conditions are met, it marks the cell as visited and recursively explores its neighboring cells. The count of islands is incremented for each island found.",
      "output_truncated": false
    },
    {
      "slug": "cogito-3b-v1-preview-llama",
      "display_name": "Cogito 3B V1 Preview Llama",
      "model_version_id": 79,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.25,
      "verdict": "25%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 2
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 4
        }
      ],
      "output_text": "def count_islands(grid: list) -> int:\n    if not grid or not grid[0]:\n        return 0\n    \n    rows = len(grid)\n    cols = len(grid[0])\n    \n    def dfs(i, j):\n        if i < 0 or i >= rows or j < 0 or j >= cols or grid[i][j] == 0:\n            return\n        grid[i][j] = 0  # mark as visited\n        for di, dj in [(1,0), (-1,0), (0,1), (0,-1)]:\n            dfs(i+di, j+dj)\n    \n    islands = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not any(grid[k][l] == 1 for k,l in [(i-1,j), (i+1,j), (i,j-1), (i,j+1)]):\n                dfs(i, j)\n                islands += 1\n    return islands",
      "output_truncated": false
    },
    {
      "slug": "granite3-moe-1b-instruct",
      "display_name": "Granite3 Moe 1B Instruct",
      "model_version_id": 120,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.25,
      "verdict": "25%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 2
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 3
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    def count_neighbors(i, j):\n        return 0 if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1 else 0\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += count_neighbors(i, j)\n                count_island()\n\n    return count\n\ndef count_island():\n    global count\n    count += 1\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1 and i != 0 and j != 0 and (i - 1, j) != (0, 0) and (i - 1, j) != (len(grid[0]) - 1, j) and (i, j - 1) != (0, 0) and (i, j - 1) != (len(grid) - 1, j):\n                count_neighbors(i, j)\n```\n\nHere's the function with the provided signature and examples:\n\n```python\ndef count_islands(grid):\n    def count_neighbors(i, j):\n        return 0 if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1 else 0\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += count_neighbors(i, j)\n                count_island()\n\n    return count\n```\n\nAnd here's the `count_island` function to keep track of the number of islands:\n\n```python\ndef count_island():\n    global count\n    count += 1\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1 and i != 0 and j != 0 and (i - 1, j) != (0, 0) and (i - 1, j) != (len(grid[0]) - 1, j) and (i, j - 1) != (0, 0) and (i, j - 1) != (len(grid) - 1, j):\n                count_neighbors(i, j)\n```\n\nYou can call the `count_islands` function with a 2D list representing the grid to get the number of islands. For example:\n\n```python\ngrid = [\n    [1, 1, 0],\n    [0, 1, 0],\n    [0, 0, 1]\n]\n\nprint(count_islands(grid))  # Output: 2\n```",
      "output_truncated": false
    },
    {
      "slug": "lfm3-vl-2b",
      "display_name": "Lfm3 VL 2B",
      "model_version_id": 216,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.25,
      "verdict": "25%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 2
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 4
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    \n    rows = len(grid)\n    cols = len(grid[0])\n    \n    def dfs(x, y):\n        # Check boundaries and if the cell is land\n        if x < 0 or y < 0 or x >= rows or y >= cols or grid[x][y] != '1':\n            return\n        \n        # Mark the current cell as visited by setting it to '0'\n        grid[x][y] = '0'\n        \n        # Recursively visit all four directions\n        dfs(x-1, y)\n        dfs(x+1, y)\n        dfs(x, y-1)\n        dfs(x, y+1)\n    \n    count = 0\n    \n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == '1':\n                count += 1\n                dfs(i, j)\n    \n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "meta-llama-llama-2-7b-chat-hf",
      "display_name": "Llama-2-7b-chat-hf",
      "model_version_id": 17,
      "run_id": "r20261006-bv1-53e146",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.25,
      "verdict": "25%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 2
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 3
        }
      ],
      "output_text": "```\ndef count_islands(grid):\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                count += 1\n                if grid[i-1][j] == 1 or grid[i+1][j] == 1 or grid[j-1][i] == 1 or grid[j+1][i] == 1:\n                    grid[i][j] = 0\n    return count\n```\n\nExplanation:\n\nThe function iterates through the grid, checking each cell if it is 1. If it is, it increments the count of islands. Then, it checks the four adjacent cells (up, down, left, right) and sets them to 0 if they are also part of an island. This ensures that the function only counts islands that are fully connected. Finally, it returns the count of islands.",
      "output_truncated": false
    },
    {
      "slug": "mixtral-8x7b-instruct-v0-1",
      "display_name": "Mixtral 8x7B Instruct V0.1",
      "model_version_id": 221,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.25,
      "verdict": "25%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 2
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 4
        }
      ],
      "output_text": "\ndef count_islands(grid):\n    def dfs(r, c):\n        if (r < 0 or r >= len(grid) or c < 0 or c >= len(grid[0]) or\n                grid[r][c] != '1'):\n            return\n        grid[r][c] = '#'\n        dfs(r + 1, c)\n        dfs(r - 1, c)\n        dfs(r, c + 1)\n        dfs(r, c - 1)\n\n    count = 0\n    for r in range(len(grid)):\n        for c in range(len(grid[0])):\n            if grid[r][c] == '1':\n                dfs(r, c)\n                count += 1\n    return count",
      "output_truncated": false
    },
    {
      "slug": "olmo2-13b-1124-instruct",
      "display_name": "Olmo2 13B 1124 Instruct",
      "model_version_id": 143,
      "run_id": "r20261022-bv1-54a19b",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.25,
      "verdict": "25%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 2
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 3
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def is_valid(x, y):\n        return 0 <= x < len(grid) and 0 <= y < len(grid[0])\n\n    def dfs(x, y):\n        if x < 0 or y < 0 or x >= len(grid) or y >= len(grid[0]) or grid[x][y] != 1:\n            return 0\n        count = 1\n        for dx, dy in [(0, 1), (0, -1), (1, 0), (-1, 0)]:\n            nx, ny = x + dx, y + dy\n            if is_valid(nx, ny) and grid[nx][ny] == 1:\n                count += dfs(nx, ny)\n        return count\n\n    total = 0\n    for row in grid:\n        for cell in row:\n            if cell == 1:\n                total += dfs(row, col)\n    return total\n```\nThis function uses depth-first search (DFS) to traverse the grid and count the islands. It checks each cell and explores all its valid neighbors (up, down, left, right) if it's part of an island (represented by `1`). The `is_valid` function ensures that the coordinates are within the grid boundaries. The `dfs` function performs the depth-first search, incrementing the count for each island found. The `count_islands` function initializes a `total` count and iterates over the grid, calling `dfs` for each `1` it encounters.",
      "output_truncated": false
    },
    {
      "slug": "qwen2-math-1-5b-instruct",
      "display_name": "Qwen2 Math 1.5B Instruct",
      "model_version_id": 193,
      "run_id": "r20261028-bv1-ef0895",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.25,
      "verdict": "25%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 2
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 3
        }
      ],
      "output_text": "To count the number of islands in a grid, we can use a depth-first search (DFS) algorithm. Here's a step-by-step explanation of how to implement this:\n\n1. **Define the Function**: We'll define a function `count_islands` that takes a grid (a list of lists of integers) as input and returns the number of islands.\n\n2. **Check for Island**: We'll iterate over each cell in the grid. If we find a cell with a value of 1 (land), we'll start a DFS from that cell to count all the connected 1s that form an island.\n\n3. **Perform DFS**: During the DFS, we'll mark each visited cell as visited (we can do this by changing its value to 0). We'll recursively visit all its neighbors (up, down, left, right) that are also 1s.\n\n4. **Count the Island**: Each time we start a new DFS from an unvisited 1, we'll count it as one island.\n\nHere's the Python code that implements this:\n\n```python\ndef count_islands(grid):\n    def dfs(i, j):\n        # Mark the current cell as visited (0)\n        grid[i][j] = 0\n        # Recursively call dfs for all its neighbors that are 1s\n        dfs(i-1, j) if 0 <= i-1 < len(grid) and grid[i-1][j] == 1 else ()\n        dfs(i+1, j) if 0 <= i+1 < len(grid) and grid[i+1][j] == 1 else ()\n        dfs(i, j-1) if 0 <= j-1 < len(grid[0]) and grid[i][j-1] == 1 else ()\n        dfs(i, j+1) if 0 <= j+1 < len(grid[0]) and grid[i][j+1] == 1 else ()\n\n    count = 0\n    for row in grid:\n        for col in row:\n            if col == 1:\n                dfs(col, row)\n                count += 1\n    return count\n```\n\nTo use this function, you can call it like this:\n\n```python\ngrid = [[1,1,0],[0,1,0],[0,0,1]]\nprint(count_islands(grid))  # Output: 2\n```\n\nThis function will correctly count the number of islands in the given grid. The time complexity of this solution is O(m*n), where m is the number of rows and n is the number of columns in the grid, because we visit each cell exactly once. The space complexity is O(m*n) for the recursion stack.",
      "output_truncated": false
    },
    {
      "slug": "sailor2-1b-chat",
      "display_name": "Sailor2 1B Chat",
      "model_version_id": 171,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.25,
      "verdict": "25%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 1
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 3
        }
      ],
      "output_text": "**Function Definition:**\n\n```python\ndef count_islands(grid: list) -> int:\n    \"\"\"\n    Counts the number of islands in a grid of water (`0`s) and land (`1`s).\n    An island is a maximal group of `1`s connected in 4-directional (up/down/left/right) only.\n    \n    Parameters:\n    grid (list): A 2D list of integers representing the grid.\n    \n    Returns:\n    int: The number of islands.\n    \"\"\"\n    # Initialize the count of islands to 0\n    island_count = 0\n    \n    # Iterate through each row and column\n    for row in grid:\n        for col in range(len(row)):\n            # Check if the current row and column are islands\n            if row == 0 and col == 0:\n                island_count += 1\n            elif row == 1 and col == 0:\n                island_count += 1\n            elif row == 0 and col == 1:\n                island_count += 1\n            elif row == 1 and col == 1:\n                island_count += 1\n    \n    return island_count\n```\n\n**Explanation:**\n\n1. **Initialization**: We initialize `island_count` to 0 to keep track of the number of islands.\n2. **Iterate Through Each Element**: For each row and column, we check if the current row and column are islands using the `==` operator.\n3. **Count Islands**: If a row and column are islands, increment the `island_count`.\n4. **Return the Result**: After processing all rows and columns, return the `island_count`.\n\nThis function efficiently counts the number of islands in a grid, ensuring that each island is counted correctly.",
      "output_truncated": false
    },
    {
      "slug": "smollm2-135m-instruct",
      "display_name": "Smollm2 135M Instruct",
      "model_version_id": 175,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.25,
      "verdict": "25%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 1
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 3
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    \"\"\"\n    Counts the number of islands in a grid.\n\n    Args:\n        grid (list): A list of `0`s and `1`s.\n\n    Returns:\n        int: The number of islands.\n    \"\"\"\n    count = 0\n\n    for row in grid:\n        for col in row:\n            if row == 1 and col == 1:\n                count += 1\n\n    return count\n```\n\nThis function iterates through the grid, checking each row and column for each island. It increments a counter for each island, incrementing the count for each island. The function returns the final count of islands.\n\nExample usage:\n```python\nprint(count_islands([[1,1,0],[0,1,0],[0,0,1]]))  # Output: 2\nprint(count_islands([[0,0],[0,0]]))  # Output: 0\n```",
      "output_truncated": false
    },
    {
      "slug": "smollm2-360m-instruct",
      "display_name": "Smollm2 360M Instruct",
      "model_version_id": 176,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.25,
      "verdict": "25%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 2
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 3
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    \"\"\"\n    Counts islands in a grid of 0s (water) and 1s (land),\n    where an island is a maximal group of 1s connected\n    in a 4-directionally (up/down/left/right) manner.\n\n    Args:\n        grid (list): A list of 0s and 1s representing a grid.\n\n    Returns:\n        int: The number of islands.\n    \"\"\"\n    def count_islands_helper(grid, row, col, count):\n        if not grid[row][col]:\n            return count\n        if row < 0 or col < 0 or row >= len(grid) or col >= len(grid[0]) or grid[row][col] != 1:\n            return count\n        if row == 0 or col == 0 or row == len(grid) - 1 or col == len(grid[0]) - 1:\n            return count + 1\n        count_islands_helper(grid, row + 1, col, count + 1)\n        count_islands_helper(grid, row - 1, col, count + 1)\n        count_islands_helper(grid, row, col + 1, count + 1)\n        count_islands_helper(grid, row, col - 1, count + 1)\n        return count\n\n    return count_islands_helper(grid, 0, 0, 0)\n```",
      "output_truncated": false
    },
    {
      "slug": "solar-10-7b-instruct-v1",
      "display_name": "Solar 10.7B Instruct V1",
      "model_version_id": 177,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.25,
      "verdict": "25%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 2
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 3
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    rows, cols = len(grid), len(grid[0])\n    visited = [[0 for _ in range(cols)] for _ in range(rows)]\n    islands = 0\n\n    def dfs(i, j, grid, visited):\n        if not (0 <= i < rows and 0 <= j < cols):\n            return\n        if visited[i][j]:\n            return\n        if grid[i][j] != 1:\n            return\n        visited[i][j] = 1\n        dfs(i - 1, j, grid, visited)\n        dfs(i + 1, j, grid, visited)\n        dfs(i, j - 1, grid, visited)\n        dfs(i, j + 1, grid, visited)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                dfs(i, j, grid, visited)\n                islands += 1\n\n    return islands",
      "output_truncated": false
    },
    {
      "slug": "stablelm2-1-6b-chat",
      "display_name": "Stablelm2 1.6B Chat",
      "model_version_id": 180,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.25,
      "verdict": "25%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 2
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 3
        }
      ],
      "output_text": "Here is a Python function that counts the number of islands in a grid of 0s and 1s:\n\n```python\ndef count_islands(grid):\n    if not grid or not grid[0]:\n        return 0\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == '1':\n                count += 1\n                dfs(grid, i, j, count)\n    return count\n\ndef dfs(grid, i, j, count):\n    if i<0 or i>=len(grid) or j<0 or j>=len(grid[0]) or grid[i][j] != '1':\n        return\n    grid[i][j] = '0'\n    count_islands(grid, i+1, j, count)\n    count_islands(grid, i-1, j, count)\n    count_islands(grid, i, j+1, count)\n    count_islands(grid, i, j-1, count)\n```\n\nThis function works by iterating over each cell in the grid. If it finds a cell with a '1', it starts a depth-first search (dfs) from that cell. The dfs function marks the current cell as '0' and recursively calls itself on the neighboring cells (up, down, left, and right). The dfs function also checks if the current cell is within the grid boundaries and if it is not a land cell (since we only want to count land cells). If the current cell is a land cell, it marks it as '0' and calls the dfs function on its neighboring cells. The dfs function continues to call itself until it reaches a land cell or a cell that is not within the grid boundaries. At the end of the dfs function, all land cells connected to the current cell are considered part of the same island. The count of islands is incremented each time the dfs function is called.",
      "output_truncated": false
    },
    {
      "slug": "codellama-7b-instruct",
      "display_name": "Codellama 7B Instruct",
      "model_version_id": 76,
      "run_id": "r20261022-bv1-54a19b",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.125,
      "verdict": "13%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 1
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 3
        }
      ],
      "output_text": "\ndef count_islands(grid: list) -> int:\n    rows = len(grid)\n    cols = len(grid[0])\n    visited = set()\n    count = 0\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and (i, j) not in visited:\n                dfs(grid, i, j, visited)\n                count += 1\n\n    return count",
      "output_truncated": false
    },
    {
      "slug": "olmo2-7b-1124-instruct",
      "display_name": "Olmo2 7B 1124 Instruct",
      "model_version_id": 144,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.125,
      "verdict": "13%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 2
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 3
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    count = 0\n\n    def dfs(i, j):\n        if visited[i][j]:\n            return\n        visited[i][j] = True\n        count += 1\n        if 0 <= i < rows and 0 <= j < cols:\n            dfs(i + 1, j)\n            dfs(i - 1, j)\n            dfs(i, j + 1)\n            dfs(i, j - 1)\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                dfs(i, j)\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen3-0-6b",
      "display_name": "Qwen3 0.6B",
      "model_version_id": 165,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.125,
      "verdict": "13%",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 1
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 3
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    rows = len(grid)\n    if rows == 0:\n        return 0\n    cols = len(grid[0])\n    visited = [[False for _ in range(cols)] for _ in range(rows)]\n    \n    def dfs(i, j):\n        if i < 0 or i >= rows or j < 0 or j >= cols:\n            return\n        if visited[i][j]:\n            return\n        visited[i][j] = True\n        directions = [(0, 1), (1, 0), (0, -1), (-1, 0)]\n        for dx, dy in directions:\n            ni, nj = i + dx, j + dy\n            if 0 <= ni < rows and 0 <= nj < cols and not visited[ni][nj]:\n                dfs(ni, nj)\n    \n    for i in range(rows):\n        for j in range(cols):\n            if not visited[i][j] and grid[i][j] == 1:\n                dfs(i, j)\n    return sum(1 for i in range(rows) for j in range(cols) if not visited[i][j])\n```",
      "output_truncated": false
    },
    {
      "slug": "codegemma-2b-code-v1-1",
      "display_name": "Codegemma 2B Code V1.1",
      "model_version_id": 73,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "\"\"\"\n\ndef count_islands(grid):\n    \"\"\"\n    Count the number of islands in a grid of 0s (water) and 1s (land).\n\n    Args:\n        grid (list): A 2D grid of 0s (water) and 1s (land).\n\n    Returns:\n        int: The number of islands in the grid.\n    \"\"\"\n    # Initialize a counter for the number of islands\n    num_islands = 0\n\n    # Iterate through each cell in the grid\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            # If the current cell is a land (1), perform a DFS to explore the island\n            if grid[i][j] == 1:\n                num_islands += 1\n                dfs(grid, i, j)\n\n    return num_islands\n\ndef dfs(grid, i, j):\n    \"\"\"\n    Perform a depth-first search (DFS) to explore the island.\n\n    Args:\n        grid (list): The 2D grid of 0s (water) and 1s (land).\n        i (int): The row index of the current cell.\n        j (int): The column index of the current cell.\n    \"\"\"\n    # Base case: if the current cell is out of bounds or not a land, return\n    if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] != 1:\n        return\n\n    # Mark the current cell as visited (set it to 0)\n    grid[i][j] = 0\n\n    # Recursively explore neighboring cells\n    dfs(grid, i+1, j)  # Down\n    dfs(grid, i-1, j)  # Up\n    dfs(grid, i, j+1)  # Right\n    dfs(grid, i, j-1)  # Left\n\n# Example usage\ngrid = [[1, 1, 0, 0, 0],\n        [0, 1, 0, 1, 0],\n        [0, 0, 1, 0, 0],\n        [0, 0, 0, 0, 1]]\n\nresult = count_islands(grid)\nprint(result)  # Output: 3\n\n\"\"\"\nThe code defines a function `count_islands` that takes a 2D grid of 0s (water) and 1s (land) as input.\nIt uses a depth-first search (DFS) algorithm to count the number of islands in the grid.\n\nThe function uses a helper function `dfs` to perform the DFS traversal.\nIt marks each land cell as visited by setting it to 0 and explores neighboring cells.\n\nThe function returns the number of islands found in the grid.\n\nThe example usage demonstrates the function with a sample grid and prints ",
      "output_truncated": true
    },
    {
      "slug": "codellama-13b-instruct",
      "display_name": "Codellama 13B Instruct",
      "model_version_id": 75,
      "run_id": "r20261022-bv1-54a19b",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "[PYTHON]\ndef count_islands(grid):\n    rows = len(grid)\n    cols = len(grid[0])\n    visited = [[False for _ in range(cols)] for _ in range(rows)]\n    count = 0\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1 and not visited[i][j]:\n                dfs(grid, i, j, visited)\n                count += 1\n\n    return count\n\ndef dfs(grid, i, j, visited):\n    if i < 0 or j < 0 or i == len(grid) or j == len(grid[0]):\n        return\n    if grid[i][j] == 0 or visited[i][j]:\n        return\n    visited[i][j] = True\n    dfs(grid, i-1, j, visited)\n    dfs(grid, i+1, j, visited)\n    dfs(grid, i, j-1, visited)\n    dfs(grid, i, j+1, visited)\n[/PYTHON]\n",
      "output_truncated": false
    },
    {
      "slug": "codellama-34b-instruct",
      "display_name": "Codellama 34B Instruct",
      "model_version_id": 199,
      "run_id": "r20261102-bv1-5246ab",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 1
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "  \n[PYTHON]\ndef count_islands(grid: list) -> int:\n    def neighbors(i, j):\n        return [(i-1, j), (i+1, j), (i, j-1), (i, j+1)]\n\n    def dfs(i, j):\n        if (i, j) in visited:\n            return 0\n        visited.add((i, j))\n        if grid[i][j] == \"1\":\n            for (ni, nj) in neighbors(i, j):\n                dfs(ni, nj)\n            return 1\n        return 0\n\n    visited = set()\n    islands = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[i])):\n            islands += dfs(i, j)\n    return islands\n[/PYTHON]\n",
      "output_truncated": false
    },
    {
      "slug": "deepcoder-1-5b-preview",
      "display_name": "Deepcoder 1.5B Preview",
      "model_version_id": 82,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "truncated",
      "done_reason": "length",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "",
      "output_truncated": false
    },
    {
      "slug": "deepscaler-1-5b-preview",
      "display_name": "Deepscaler 1.5B Preview",
      "model_version_id": 84,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "truncated",
      "done_reason": "length",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "",
      "output_truncated": false
    },
    {
      "slug": "deepseek-r1-1-5b-qwen-distill",
      "display_name": "Deepseek R1 1.5B Qwen Distill",
      "model_version_id": 88,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "truncated",
      "done_reason": "length",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "",
      "output_truncated": false
    },
    {
      "slug": "deepseek-ai-deepseek-r1-distill-qwen-32b",
      "display_name": "DeepSeek-R1-Distill-Qwen-32B",
      "model_version_id": 232,
      "run_id": "r20261105-bv1-2abe78",
      "ranked": true,
      "withheld": false,
      "status": "truncated",
      "done_reason": "length",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "",
      "output_truncated": false
    },
    {
      "slug": "dolphin-phi-2-7b-v2-6",
      "display_name": "Dolphin Phi 2.7B V2.6",
      "model_version_id": 91,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "def count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i+1, j)\n        dfs(i-1, j)\n        dfs(i, j+1)\n        dfs(i, j-1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n\nprint(count_islands([[1,1,0],[0,1,0],[0,0,1]])) \nprint(count_islands([[0,0],[0,0]])) \n\n# Output: 2\n#         0\n\nThe function `count_islands` takes a grid of 0s and 1s as input. It uses a depth-first search (DFS) to traverse the grid and mark all connected 1s as 0s. For each 1 it encounters, it starts a DFS and counts the number of islands. The final count is returned as the result.",
      "output_truncated": false
    },
    {
      "slug": "falcon2-11b",
      "display_name": "Falcon2 11B",
      "model_version_id": 95,
      "run_id": "r20261016-bv1-473145",
      "ranked": false,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "def count_islands(grid):\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[i])):\n            if grid[i][j] == 1:\n                count += 1\n                if i > 0:\n                    if grid[i-1][j] == 1:\n                        count += 1\n                    if j > 0:\n                        if grid[i-1][j-1] == 1:\n                            count += 1\n                    if j < len(grid[i])):\n                        if grid[i-1][j+1] == 1:\n                            count += 1\n                if i < len(grid):\n                    if grid[i+1][j] == 1:\n                        count += 1\n                    if j > 0:\n                        if grid[i+1][j-1] == 1:\n                            count += 1\n                    if j < len(grid[i])):\n                        if grid[i+1][j+1] == 1:\n                            count += 1\n    return count\n\n",
      "output_truncated": false
    },
    {
      "slug": "falcon3-1b-instruct",
      "display_name": "Falcon3 1B Instruct",
      "model_version_id": 190,
      "run_id": "r20261028-bv1-7ce712",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 1
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "def count_islands(grid: list) -> int:\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    island_count = 0\n\n    def dfs(x, y):\n        if visited[x][y] and not visited[x][y] or (x == 0 and y == 0) or (x == rows - 1 and y == cols - 1):\n            island_count += 1\n            return\n\n        visited[x][y] = True\n        for dx, dy in [(0, 1), (0, -1), (1, 0), (-1, 0)]:\n            nx, ny = x + dx, y + dy\n            if 0 <= nx < rows and 0 <= ny < cols and grid[nx][ny] == 1:\n                dfs(nx, ny)\n\n    dfs(0, 0)\n    return island_count\n\n\n# Example usage:\nprint(count_islands([[1,1,0],[0,1,0],[0,0,1]]))  # Output: 2\nprint(count_islands([[0,0],[0,0]]))  # Output: 0",
      "output_truncated": false
    },
    {
      "slug": "hermes3-3b-llama3-2",
      "display_name": "Hermes3 3B Llama3.2",
      "model_version_id": 128,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "def count_islands(grid:\n                                 \n    def count_islands_grid(grid):\n   1    \n  2   \n  3  \n    def connect_neighbours(grid, r, c):\n        hor = [(0, 1), (0, -1)]\n        ver = [(1, 0), (-1, 0)]\n        neighbours = [(r + r0, c + c1) for r0, c1 in zip(hor, ver) for r, c in\n                       [(r, c), (r + r0, c + c1)] if grid[r + r0][c + c1] == 1]\n        return neighbours\n  4  5\n  6\n    return any(grid[r][c] == 1 and any(connect_neighbour(grid, r, c)) for r in range(len(grid))\n               for c in range(len(grid[0])))\n\n  7\n  8\n  9\n 10\n    return count_islands_grid(grid)\n 11\n 12\n 13\n 14\n 15\n  )\n",
      "output_truncated": false
    },
    {
      "slug": "llama2-13b-chat",
      "display_name": "Llama2 13B Chat",
      "model_version_id": 133,
      "run_id": "r20261022-bv1-54a19b",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 1
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "   Sure! Here is the function you requested:\n\ndef count_islands(grid: list) -> int:\n    m = len(grid)\n    n = len(grid[0])\n    islands = 0\n    for i in range(m):\n        for j in range(n):\n            if grid[i][j] == 1:\n                # mark the current cell as part of an island\n                grid[i][j] = 2\n                # recurse to count the islands in the 4 directions\n                islands += count_islands(grid, i, j)\n                # undo the marking\n                grid[i][j] = 0\n    return islands\n\nThis function uses a recursive approach to count the islands. It first initializes two variables, `m` and `n`, to the length of the grid in each dimension. It then iterates over the grid, using the `for` loop, and checks each cell to see if it is a `1` (land). If it is, it marks the cell as part of an island by setting its value to `2`. It then recursively calls itself to count the islands in the 4 directions (up, down, left, and right) from the current cell. Finally, it undoes the marking by setting the cell's value back to `0`. The function returns the total number of islands found.\n\nNote that the function takes a list of lists as input, where each sublist represents a row of the grid. It also takes two additional arguments, `i` and `j`, which represent the current cell being processed. These arguments are used in the recursive calls to specify the starting point for each direction.",
      "output_truncated": false
    },
    {
      "slug": "mistralai-magistral-small-2506",
      "display_name": "Magistral Small (2506)",
      "model_version_id": 236,
      "run_id": "r20261105-bv1-2abe78",
      "ranked": true,
      "withheld": false,
      "status": "truncated",
      "done_reason": "length",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "",
      "output_truncated": false
    },
    {
      "slug": "phi4-mini-reasoning-3-8b",
      "display_name": "Phi4 Mini Reasoning 3.8B",
      "model_version_id": 151,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "truncated",
      "done_reason": "length",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 1
        }
      ],
      "output_text": "<think>\n\nOkay, I need to write a Python function called count_islands that takes a grid as input and returns the number of islands. The grid is made up of 0s and 1s, where 1s form islands. An island is a group of 1s connected 4-directionally. So, the task is to count how many such separate groups there are in the grid.\n\nLet me think about the approach. This sounds like a classic problem, similar to the \"number of islands\" LeetCode problem. The standard approach for this is using either Depth-First Search (DFS) or Breadth-First Search (BFS), or even a stack-based approach. Also, there's the method of iterating through each cell and checking its neighbors to mark the entire island at once.\n\nLet me outline the steps. For each cell in the grid that is a 1 and hasn't been counted yet, we initiate a search to mark all connected 1s as visited. Each time we start a new search, we increment the count by 1.\n\nSo the main idea is to track visited cells to avoid counting the same island multiple times. Since Python doesn't modify the original grid in-place here (unless we do it), we need to create a visited structure. But modifying the grid might not be allowed if the function is supposed to work on the original grid. Wait, the problem statement says the function takes the grid as input. So if we modify the grid, we might change the input. But in the examples given, like the first example, the grid is modified during processing. However, in the second example, all are 0s, so no problem.\n\nAlternatively, we can create a visited matrix of the same size as the grid, and mark cells as visited when we process them. But modifying the grid in-place might be more efficient. Let's think about both approaches.\n\nOption 1: Modify the grid in-place. When we find a 1, we change it to 0 and perform DFS/BFS to mark all connected 1s as 0. This way, we don't need a separate visited matrix. This approach is efficient in terms of space, as we don't create a new structure. But we have to be careful n",
      "output_truncated": true
    },
    {
      "slug": "qwen-14b-chat-v1-5",
      "display_name": "Qwen 14B Chat V1.5",
      "model_version_id": 154,
      "run_id": "r20261022-bv1-54a19b",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n\n    directions = [(0, 1), (0, -1), (1, 0), (-1, 0)}]\n    count = 0\n    visited = set()\n\n    def is_valid(x, y):\n        return 0 <= x < len(grid) and 0 <= y < len(grid[x])\n\n    def dfs(x, y):\n        visited.add((x, y)))\n        grid[x][y] = 0\n\n        for dx, dy in directions:\n            nx, ny = x + dx, y + dy\n            if is_valid(nx, ny) and (nx, ny) not in visited:\n                dfs(nx, ny)\n\n    for i in range(len(grid)):\n        for j in range(len(grid[i]))):\n            if grid[i][j] == 1 and (i, j) not in visited:\n                dfs(i, j)\n                count += 1\n\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-4b-chat-v1-5",
      "display_name": "Qwen 4B Chat V1.5",
      "model_version_id": 155,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    islands = set()\n    for i in range(len(grid))):\n        for j in range(len(grid[i])))):\n            if grid[i][j]] == 1:\n                islands.add((i, j))))\n    return len(islands)\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen-7b-chat-v1-5",
      "display_name": "Qwen 7B Chat V1.5",
      "model_version_id": 156,
      "run_id": "r20261022-bv1-54a19b",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "```python\ndef count_islands(grid):\n    islands = 0\n    for i, row in enumerate(grid):\n        for j, cell in enumerate(row):\n            if cell == 1:\n                island_count = 1\n                # Check 4-directional connectivity\n                directions = [(0, -1), (0, 1), (-1, 0), (1, 0)])\n                for di, dj in directions:\n                    if i + di >= 0 and i + di < len(grid) and j + dj >= 0 and j + dj < len(grid[row[i + di, j + dj]]]])):\n                        island_count += 1\n                        if island_count > islands:\n                            islands = island_count\n                islands += island_count\n    return islands\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen2-0-5b-instruct",
      "display_name": "Qwen2 0.5B Instruct",
      "model_version_id": 157,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    \"\"\"\n    Counts the number of islands in a grid of 0s and 1s.\n    An island is a maximal group of 1s connected 4-directionally.\n    \"\"\"\n    rows, cols = len(grid), len(grid[0])\n    count = 0\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j] == 1:\n                count += 1\n                if i > 0:\n                    count += count_islands(grid[i-1])\n                if j > 0:\n                    count += count_islands(grid[i][j-1])\n    return count\n\n# Check function to verify the correctness of the solution\ndef check():\n    assert count_islands([[1,1,0],[0,1,0],[0,0,1]]) == 2\n    assert count_islands([[0,0],[0,0]]) == 0\n    assert count_islands([[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1]]) == 5\n    print(\"All tests passed!\")\n\ncheck()\n```\n\nThis Python code snippet defines a function `count_islands` that counts the number of islands in a grid of 0s and 1s, where an island is a maximal group of 1s connected 4-directionally. It iterates through the grid, counting the number of islands and updating the count accordingly. The `check` function is used to verify the correctness of the solution with provided data points.",
      "output_truncated": false
    },
    {
      "slug": "qwen3-vl-2b-thinking",
      "display_name": "Qwen3 VL 2B Thinking",
      "model_version_id": 169,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "truncated",
      "done_reason": "length",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "",
      "output_truncated": false
    },
    {
      "slug": "qwen-qwen3-4b-thinking-2507",
      "display_name": "Qwen3-4B-Thinking-2507",
      "model_version_id": 238,
      "run_id": "r20261105-bv1-2abe78",
      "ranked": true,
      "withheld": false,
      "status": "truncated",
      "done_reason": "length",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "",
      "output_truncated": false
    },
    {
      "slug": "sailor2-8b-chat",
      "display_name": "Sailor2 8B Chat",
      "model_version_id": 172,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 1
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(cell, visited, grid, n, m):\n        if not (0 <= cell[0] < n and 0 <= cell[1] < m and grid[cell[0]][cell[1]] == 1): return\n        visited.add(cell)\n        grid[cell[0]][cell[1]] = 'X'  # Mark visited\n        directions = [(0, 1), (1, 0), (0, -1), (-1, 0)]  # Up, Right, Down, Left\n        for dx, dy in directions:\n            new_cell = (cell[0] + dx, cell[1] + dy)\n            dfs(new_cell, visited, grid, n, m)\n\n    n, m = len(grid), len(grid[0])\n    visited = set()\n    count = 0\n\n    for i in range(n):\n        for j in range(m):\n            if grid[i][j] == 1 and (i, j) not in visited:\n                count += 1\n                dfs((i, j), visited, grid, n, m)\n    return count\n\n# Examples validation\nprint(count_islands([[1, 1, 0], [0, 1, 0], [0, 0, 1]]) -> 2)\nprint(count_islands([[0, 0], [0, 0]]) -> 0)\n```\n```",
      "output_truncated": false
    },
    {
      "slug": "stable-code-3b-instruct",
      "display_name": "Stable Code 3B Instruct",
      "model_version_id": 178,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "truncated",
      "done_reason": "length",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "Here is a Python code block containing the function `count_islands`:\n\n```python\ndef count_islands(grid):\n    if not grid:\n        return 0\n\n    rows, cols = len(grid), len(grid[0]))\n    visited = [[False] * cols for _ in range(rows)]\n\n    count = 0\n\n    for i in range(rows):\n        for j in range(cols):\n            if grid[i][j]] == 1 and not visited[i][j]):\n                count += 1\n                _explore_island(grid, visited, i, j)\n\n    return count\n\n\ndef _explore_island(grid, visited, row, col):\n    if (row < 0 or row >= len(grid)) or (col < 0 or col >= len(grid[0])) or visited[row][col] or grid[row][col]] == 0:\n        return\n\n    visited[row][col] = True\n\n    _explore_island(grid, visited, row + 1, col)\n    _explore_island(grid, visited, row - 1, col)\n    _explore_island(grid, visited, row, col + 1)\n    _explore_island(grid, visited, row, col - 1)\n```\n\nThis code block defines the function `count_islands` which takes a 2D grid as input and returns the count of islands in the grid.\n\nThe function uses a depth-first search (DFS) algorithm to explore the islands in the grid. The algorithm marks each visited cell in the grid as visited.\n\nThe function also uses a helper function `_explore_island` to recursively explore the neighboring cells in the grid.\n\nThe function returns the count of islands in the grid.\n\nThe function also handles the edge cases where the grid is empty or contains only water cells. In these cases, the function returns 0.\n\nThe function uses a 4-directional (up/down/left/right only — NOT diagonally) approach to explore the islands in the grid.\n\nThe function uses a 2D grid as input and returns the count of islands in the grid.\n\nThe function also handles the edge cases where the grid is empty or contains only water cells. In these cases, the function returns 0.\n\nThe function uses a 4-directional (up/down/left/right only — NOT diagonally) approach to explore the islands in the grid.\n\nThe function uses a 2D grid as input and returns the count of isl",
      "output_truncated": true
    },
    {
      "slug": "yi-6b-chat-v1-5",
      "display_name": "YI 6B Chat V1.5",
      "model_version_id": 184,
      "run_id": "r20261016-bv1-473145",
      "ranked": true,
      "withheld": false,
      "status": "ok",
      "done_reason": "stop",
      "score": 0.0,
      "verdict": "fail",
      "full_marks": false,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "from collections import deque\n\ndef count_islands(grid: list) -> int:\n    if not grid:\n        return 0\n    \n    rows, cols = len(grid), len(grid[0])\n    islands = 0\n    \n    def bfs(r, c):\n        q = deque()\n        q.append((r, c))\n        \n        while q:\n            r, c = q.popleft()\n            \n            for dr, dc in [(1, 0), (-1, 0), (0, 1), (0, -1)]:\n                nr, nc = r + dr, c + dc\n                if (0 <= nr < rows and 0 <= nc < cols and\n                    grid[nr][nc] == '1'):\n                    grid[nr][nc] = '0'\n                    q.append((nr, nc))\n    \n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == '1':\n                bfs(r, c)\n                islands += 1\n    \n    return islands\n</|im_start|>",
      "output_truncated": false
    },
    {
      "slug": "swiss-ai-apertus-8b-instruct-2509",
      "display_name": "Apertus-8B-Instruct-2509",
      "model_version_id": 63,
      "run_id": "r20261006-bv1-53e146",
      "ranked": false,
      "withheld": true,
      "status": "ok",
      "done_reason": "stop",
      "score": null,
      "verdict": "withheld",
      "full_marks": null,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 6
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 6
        }
      ],
      "output_text": "def count_islands(grid: list) -> int:\n    islands = 0\n    rows, cols = len(grid), len(grid[0])\n    for r in range(rows):\n        for c in range(cols):\n            if grid[r][c] == 1:\n                queue = [(r, c)]\n                while queue:\n                    x, y = queue.pop(0)\n                    for dx, dy in [(-1, 0), (1, 0), (0, -1), (0, 1)]:\n                        nx, ny = x + dx, y + dy\n                        if 0 <= nx < rows and 0 <= ny < cols and grid[nx][ny] == 1:\n                            grid[nx][ny] = 0\n                            queue.append((nx, ny))\n                islands += 1\n    return islands",
      "output_truncated": false
    },
    {
      "slug": "falcon3-10b-instruct",
      "display_name": "Falcon3 10B Instruct",
      "model_version_id": 96,
      "run_id": "r20261016-bv1-473145",
      "ranked": false,
      "withheld": true,
      "status": "ok",
      "done_reason": "stop",
      "score": null,
      "verdict": "withheld",
      "full_marks": null,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if 0 <= i < len(grid) and 0 <= j < len(grid[0]) and grid[i][j] == 1:\n            grid[i][j] = 0\n            dfs(i+1, j)\n            dfs(i-1, j)\n            dfs(i, j+1)\n            dfs(i, j-1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "falcon3-1b-instruct",
      "display_name": "Falcon3 1B Instruct",
      "model_version_id": 97,
      "run_id": "r20261016-bv1-473145",
      "ranked": false,
      "withheld": true,
      "status": "ok",
      "done_reason": "stop",
      "score": null,
      "verdict": "withheld",
      "full_marks": null,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 1
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 1
        }
      ],
      "output_text": "def count_islands(grid: list) -> int:\n    rows, cols = len(grid), len(grid[0])\n    visited = [[False] * cols for _ in range(rows)]\n    island_count = 0\n\n    def dfs(x, y):\n        if visited[x][y]:\n            return\n        visited[x][y] = True\n        visited[x+1][y] = visited[x][y] = False\n        visited[x-1][y] = visited[x][y] = False\n        visited[x][y+1] = visited[x][y] = False\n        visited[x][y-1] = visited[x][y] = False\n        island_count += 1\n        dfs(x+1, y)\n        dfs(x-1, y)\n        dfs(x, y+1)\n        dfs(x, y-1)\n\n    dfs(0, 0)\n    return island_count",
      "output_truncated": false
    },
    {
      "slug": "falcon3-3b-instruct",
      "display_name": "Falcon3 3B Instruct",
      "model_version_id": 98,
      "run_id": "r20261016-bv1-473145",
      "ranked": false,
      "withheld": true,
      "status": "ok",
      "done_reason": "stop",
      "score": null,
      "verdict": "withheld",
      "full_marks": null,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 3
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 3
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] == 0:\n            return 0\n        grid[i][j] = 0\n        return 1 + dfs(i + 1, j) + dfs(i - 1, j) + dfs(i, j + 1) + dfs(i, j - 1)\n\n    return sum(dfs(i, j) for i in range(len(grid)) for j in range(len(grid[0])))\n```",
      "output_truncated": false
    },
    {
      "slug": "falcon3-7b-instruct",
      "display_name": "Falcon3 7B Instruct",
      "model_version_id": 99,
      "run_id": "r20261016-bv1-473145",
      "ranked": false,
      "withheld": true,
      "status": "ok",
      "done_reason": "stop",
      "score": null,
      "verdict": "withheld",
      "full_marks": null,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 8
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i + 1, j)\n        dfs(i - 1, j)\n        dfs(i, j + 1)\n        dfs(i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```\n",
      "output_truncated": false
    },
    {
      "slug": "internlm2-1-8b-chat-v2-5",
      "display_name": "Internlm2 1.8B Chat V2.5",
      "model_version_id": 129,
      "run_id": "r20261016-bv1-473145",
      "ranked": false,
      "withheld": true,
      "status": "ok",
      "done_reason": "stop",
      "score": null,
      "verdict": "withheld",
      "full_marks": null,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 7
        }
      ],
      "output_text": "\n```python\ndef count_islands(grid):\n    def dfs(grid, i, j):\n        if i < 0 or j < 0 or i >= len(grid) or j >= len(grid[0]) or grid[i][j] != 1:\n            return\n        grid[i][j] = 0\n        dfs(grid, i + 1, j)\n        dfs(grid, i - 1, j)\n        dfs(grid, i, j + 1)\n        dfs(grid, i, j - 1)\n\n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(grid, i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    },
    {
      "slug": "qwen2-math-1-5b-instruct",
      "display_name": "Qwen2 Math 1.5B Instruct",
      "model_version_id": 163,
      "run_id": "r20261016-bv1-473145",
      "ranked": false,
      "withheld": true,
      "status": "ok",
      "done_reason": "stop",
      "score": null,
      "verdict": "withheld",
      "full_marks": null,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 0
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 0
        }
      ],
      "output_text": "\nTo solve the problem of counting the number of islands in a grid, we can use a depth-first search (DFS) algorithm. Here's a step-by-step explanation of the solution:\n\n1. **Define the Function**: We need to define a function `count_islands` that takes a grid as input and returns the number of islands.\n\n2. **Check for Island Validity**: We need to check if a cell is part of an island. A cell is part of an island if it is a `1` (land) and has not been visited yet.\n\n3. **Perform DFS**: We will perform a DFS starting from each cell that is a `1` and mark all connected `1`s as visited. Each time we start a new DFS from an unvisited `1`, we count it as one island.\n\n4. **Iterate Over the Grid**: We iterate over each cell in the grid. If a cell is a `1`, we start a DFS from that cell and increment the island count by 1.\n\nHere's the Python code that implements this:\n\n```python\ndef count_islands(grid):\n    count = 0\n    rows, columns = len(grid), len(grid[0])\n    \n    def DFS(i, j):\n        if i < rows and j < columns and grid[i][j] == 1 and not visited[i][j]:\n            visited[i][j] = True\n            DFS(i-1, j)  # up\n            DFS(i+1, j)  # down\n            DFS(i, j-1)  # left\n            DFS(i, j+1)  # right\n    \n    for i in range(rows):\n        for j in range(columns):\n            if grid[i][j] == 1 and not visited[i][j]:\n                visited[i][j] = True\n                DFS(i, j)\n    \n    for row in visited:\n        for cell in row:\n            if cell == True:\n                count += 1\n    return count\n\ndef DFS(i, j):\n    if i < rows and j < columns and grid[i][j] == 1 and not visited[i][j]:\n        visited[i][j] = True\n        DFS(i-1, j)  # up\n        DFS(i+1, j)  # down\n        DFS(i, j-1)  # left\n        DFS(i, j+1)  # right\n\ndef initialize visited:\n    visited = [[False for _ in range(columns)] for _ in range(rows))\n```\n\nThe `count_islands` function iterates over each cell in the grid. If it finds a `1` that has not been visited, it starts a DFS from tha",
      "output_truncated": true
    },
    {
      "slug": "qwen2-math-7b-instruct",
      "display_name": "Qwen2 Math 7B Instruct",
      "model_version_id": 164,
      "run_id": "r20261016-bv1-473145",
      "ranked": false,
      "withheld": true,
      "status": "ok",
      "done_reason": "stop",
      "score": null,
      "verdict": "withheld",
      "full_marks": null,
      "recovered": null,
      "input_truncated": false,
      "judges": [
        {
          "model": "anthropic/claude-haiku-5.5",
          "score": 9
        },
        {
          "model": "openai/gpt-5.6-luna",
          "score": 9
        }
      ],
      "output_text": "\n```python\ndef count_islands(grid: list) -> int:\n    def dfs(i, j):\n        if i < 0 or i >= len(grid) or j < 0 or j >= len(grid[0]) or grid[i][j] == 0:\n            return\n        grid[i][j] = 0\n        dfs(i+1, j)\n        dfs(i-1, j)\n        dfs(i, j+1)\n        dfs(i, j-1)\n    \n    count = 0\n    for i in range(len(grid)):\n        for j in range(len(grid[0])):\n            if grid[i][j] == 1:\n                dfs(i, j)\n                count += 1\n    return count\n```",
      "output_truncated": false
    }
  ],
  "note": "Public questions only. Answers are cut at 2,000 characters; the model JSON has them in full."
}
