Prompt:
Consider two Python functions:

    def f(x): return x * 7 + 4
    def g(x): return x * x

What is the integer value of `g(f(8))`?


Prompt:
Implement `g(lst)` that returns the index of the maximum element in `lst` (first occurrence; behavior undefined on empty).

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return lst.index(max(lst))
```


Prompt:
Implement a Python function `f(x)` that returns `x * 5 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 5 + 1
```


Prompt:
Implement a Python function `f(x)` that returns `x * 6 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 6 + 1
```


Prompt:
Consider two Python functions:

    def f(x): return x * 5 + 6
    def g(x): return x * x

What is the integer value of `g(f(11))`?


Prompt:
The following Python function has a one-line bug:

```python
def h(x):
    return x * x + 14    # BUG: should be x*x - 14
```

Reply with the corrected function (just the def block, in a python code fence). Three calls of the form `h(x)` will be checked.

```python
def h(x):
    return x * x - 14
```


Prompt:
Implement `g(lst)` that returns the list reversed.

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return list(reversed(lst))
```


Prompt:
The following Python function has a one-line bug:

```python
def h(x):
    return x * x + 11    # BUG: should be x*x - 11
```

Reply with the corrected function (just the def block, in a python code fence). Three calls of the form `h(x)` will be checked.

```python
def h(x):
    return x * x - 11
```


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [7, 11, 4, 10, 14, 11, 7, 5]
Target: 40

Return only the integer count.


Prompt:
Implement `g(lst)` that returns the list reversed.

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return list(reversed(lst))
```


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [1, 6, 12, 12, 8, 9, 1, 11, 1]
Target: 11

Return only the integer count.


Prompt:
Implement `g(lst)` that returns the sum of even numbers in `lst`.

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return sum(x for x in lst if x % 2 == 0)
```


Prompt:
Evaluate this Python expression and return its integer value:

    max(13, 11, 2)


Prompt:
Consider two Python functions:

    def f(x): return x * 2 + 7
    def g(x): return x * x

What is the integer value of `g(f(10))`?


Prompt:
Consider a directed acyclic graph (DAG) on the 12 nodes {0, 1, …, 11} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (1, 2), (1, 3), (1, 6), (1, 9), (2, 3), (2, 7), (3, 4), (3, 5), (3, 8), (4, 5), (4, 6), (5, 6), (5, 10), (6, 7), (6, 8), (7, 8), (7, 9), (8, 9), (8, 10), (8, 11), (9, 10), (10, 11)]

How many distinct directed paths are there from node 0 to node 11? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [4, 14, 8, 11, 3, 3, 6, 12]
Target: 41

Return only the integer count.


Prompt:
What does this Python statement print?

    print(13 + 12)

Return the printed value (an integer).


Prompt:
Evaluate this Python expression and return its integer value:

    max(18, 5, 13)


Prompt:
Implement a Python function `f(x)` that returns `x * 6 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 6 + 1
```


Prompt:
Consider two Python functions:

    def f(x): return x * 2 + 4
    def g(x): return x * x

What is the integer value of `g(f(4))`?


Prompt:
Implement a Python function `f(x)` that returns `x * 5 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 5 + 1
```


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 1 modulo 9. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=24, v=27), (w=1, v=64), (w=15, v=54), (w=16, v=32), (w=27, v=60), (w=5, v=5), (w=8, v=61), (w=27, v=30), (w=8, v=11), (w=16, v=50), (w=15, v=60)
Constraint: total weight ≡ 1 (mod 9)

Return only the integer optimal total value.


Prompt:
The following Python function has a one-line bug:

```python
def h(x):
    return x * x + 3    # BUG: should be x*x - 3
```

Reply with the corrected function (just the def block, in a python code fence). Three calls of the form `h(x)` will be checked.

```python
def h(x):
    return x * x - 3
```


Prompt:
Consider a directed acyclic graph (DAG) on the 14 nodes {0, 1, …, 13} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 3), (0, 5), (0, 6), (0, 13), (1, 2), (2, 3), (2, 8), (3, 4), (3, 6), (3, 7), (3, 8), (3, 9), (4, 5), (4, 13), (5, 6), (5, 7), (5, 8), (5, 9), (5, 10), (6, 7), (7, 8), (7, 12), (7, 13), (8, 9), (8, 10), (8, 11), (9, 10), (9, 12), (9, 13), (10, 11), (10, 12), (10, 13), (11, 12), (11, 13), (12, 13)]

How many distinct directed paths are there from node 0 to node 13? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
Evaluate this Python expression and return its integer value:

    14 % 6


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [9, 15, 5, 15, 8, 5, 1, 6, 2, 11, 14]
Target: 37

Return only the integer count.


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 9 modulo 10. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=25, v=19), (w=11, v=3), (w=18, v=31), (w=9, v=19), (w=30, v=7), (w=26, v=44), (w=17, v=64), (w=2, v=31), (w=24, v=24), (w=8, v=7), (w=22, v=52), (w=29, v=30)
Constraint: total weight ≡ 9 (mod 10)

Return only the integer optimal total value.


Prompt:
Evaluate this Python expression and return its integer value:

    len('xxxxxxxxxxx')


Prompt:
Consider a directed acyclic graph (DAG) on the 15 nodes {0, 1, …, 14} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 13), (1, 2), (1, 9), (2, 3), (2, 6), (2, 9), (2, 11), (3, 4), (3, 8), (3, 13), (4, 5), (5, 6), (5, 10), (5, 12), (6, 7), (6, 8), (6, 9), (6, 10), (6, 12), (7, 8), (7, 9), (8, 9), (8, 10), (8, 11), (8, 13), (8, 14), (9, 10), (10, 11), (10, 14), (11, 12), (11, 14), (12, 13), (13, 14)]

How many distinct directed paths are there from node 0 to node 14? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
Consider a directed acyclic graph (DAG) on the 14 nodes {0, 1, …, 13} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 3), (0, 9), (1, 2), (1, 12), (2, 3), (2, 5), (3, 4), (3, 8), (3, 11), (4, 5), (4, 6), (4, 8), (4, 9), (5, 6), (5, 10), (5, 11), (6, 7), (6, 13), (7, 8), (7, 11), (8, 9), (8, 12), (9, 10), (9, 13), (10, 11), (10, 13), (11, 12), (12, 13)]

How many distinct directed paths are there from node 0 to node 13? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
Evaluate this Python expression and return its integer value:

    min(3, 17, 20)


Prompt:
What does this Python statement print?

    print(7 * 43)

Return the printed value (an integer).


Prompt:
Implement a Python function `f(x)` that returns `x * 5 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 5 + 1
```


Prompt:
Implement a Python function `f(x)` that returns `x * 4 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 4 + 1
```


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 0 modulo 9. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=1, v=45), (w=9, v=16), (w=25, v=55), (w=8, v=25), (w=11, v=50), (w=9, v=51), (w=23, v=25), (w=28, v=59), (w=20, v=38), (w=17, v=35), (w=2, v=42), (w=9, v=27), (w=8, v=36)
Constraint: total weight ≡ 0 (mod 9)

Return only the integer optimal total value.


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 6 modulo 7. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=26, v=67), (w=17, v=54), (w=13, v=62), (w=19, v=38), (w=6, v=26), (w=17, v=45), (w=1, v=41), (w=29, v=57), (w=21, v=44), (w=22, v=49), (w=17, v=32), (w=9, v=16), (w=28, v=43), (w=17, v=4)
Constraint: total weight ≡ 6 (mod 7)

Return only the integer optimal total value.


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [3, 4, 5, 10, 8, 2, 10, 10]
Target: 24

Return only the integer count.


Prompt:
Consider two Python functions:

    def f(x): return x * 6 + 5
    def g(x): return x * x

What is the integer value of `g(f(10))`?


Prompt:
What does the following Python snippet print?

    a = 6
    b = 7
    total = 0
    for i in range(1, 4 + 1):
        total += a * i - b
    print(total)

Return the integer that is printed.


Prompt:
Given the Python definition

    def f(x): return x * x

what is the value of `f(10)`? Return an integer.


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [1, 3, 13, 15, 2, 8, 5, 5, 3, 4, 5]
Target: 16

Return only the integer count.


Prompt:
What does this Python statement print?

    print(27 + 2)

Return the printed value (an integer).


Prompt:
Consider a directed acyclic graph (DAG) on the 15 nodes {0, 1, …, 14} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (1, 2), (1, 5), (1, 6), (1, 12), (1, 13), (2, 3), (2, 8), (3, 4), (3, 13), (4, 5), (4, 13), (5, 6), (5, 10), (5, 11), (5, 13), (5, 14), (6, 7), (6, 8), (6, 11), (7, 8), (7, 12), (8, 9), (8, 13), (8, 14), (9, 10), (9, 14), (10, 11), (10, 12), (10, 13), (11, 12), (12, 13), (12, 14), (13, 14)]

How many distinct directed paths are there from node 0 to node 14? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 1 modulo 10. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=27, v=50), (w=24, v=38), (w=8, v=65), (w=16, v=24), (w=18, v=10), (w=19, v=62), (w=6, v=6), (w=20, v=3), (w=11, v=58), (w=26, v=47), (w=1, v=63), (w=27, v=7), (w=17, v=44), (w=20, v=22), (w=12, v=25)
Constraint: total weight ≡ 1 (mod 10)

Return only the integer optimal total value.


Prompt:
Implement `g(lst)` that returns the index of the maximum element in `lst` (first occurrence; behavior undefined on empty).

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return lst.index(max(lst))
```


Prompt:
Consider two Python functions:

    def f(x): return x * 5 + 7
    def g(x): return x * x

What is the integer value of `g(f(10))`?


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 8 modulo 10. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=9, v=6), (w=29, v=1), (w=3, v=33), (w=10, v=54), (w=13, v=39), (w=26, v=41), (w=8, v=17), (w=28, v=1), (w=13, v=58), (w=27, v=22), (w=28, v=2), (w=5, v=45)
Constraint: total weight ≡ 8 (mod 10)

Return only the integer optimal total value.


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 1 modulo 9. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=28, v=15), (w=27, v=10), (w=30, v=10), (w=17, v=57), (w=25, v=64), (w=11, v=6), (w=18, v=45), (w=2, v=40), (w=28, v=55), (w=10, v=41), (w=6, v=20), (w=27, v=49), (w=24, v=46), (w=12, v=59)
Constraint: total weight ≡ 1 (mod 9)

Return only the integer optimal total value.


Prompt:
Consider a directed acyclic graph (DAG) on the 12 nodes {0, 1, …, 11} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 4), (0, 6), (0, 9), (1, 2), (1, 4), (1, 11), (2, 3), (2, 4), (2, 5), (2, 7), (2, 8), (2, 9), (3, 4), (3, 6), (3, 7), (3, 8), (3, 11), (4, 5), (4, 10), (5, 6), (5, 7), (5, 8), (5, 9), (6, 7), (6, 8), (6, 9), (6, 10), (6, 11), (7, 8), (8, 9), (8, 10), (8, 11), (9, 10), (10, 11)]

How many distinct directed paths are there from node 0 to node 11? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
Consider a directed acyclic graph (DAG) on the 16 nodes {0, 1, …, 15} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 2), (0, 8), (0, 11), (1, 2), (1, 7), (2, 3), (2, 6), (2, 10), (3, 4), (3, 7), (4, 5), (4, 9), (5, 6), (5, 8), (5, 11), (6, 7), (6, 9), (6, 11), (7, 8), (7, 15), (8, 9), (8, 10), (8, 13), (8, 14), (9, 10), (9, 13), (9, 15), (10, 11), (10, 12), (10, 14), (10, 15), (11, 12), (11, 14), (12, 13), (12, 14), (12, 15), (13, 14), (14, 15)]

How many distinct directed paths are there from node 0 to node 15? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
Implement `g(lst)` that returns the list reversed.

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return list(reversed(lst))
```


Prompt:
Given the Python definition

    def f(x): return 2 - x

what is the value of `f(2)`? Return an integer.


Prompt:
What does the following Python snippet print?

    a = 9
    b = 3
    total = 0
    for i in range(1, 5 + 1):
        total += a * i - b
    print(total)

Return the integer that is printed.


Prompt:
Implement a Python function `f(x)` that returns `x * 3 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 3 + 1
```


Prompt:
Consider a directed acyclic graph (DAG) on the 12 nodes {0, 1, …, 11} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 2), (0, 11), (1, 2), (1, 3), (1, 9), (1, 11), (2, 3), (2, 4), (2, 7), (2, 10), (3, 4), (3, 5), (3, 6), (3, 8), (3, 10), (4, 5), (4, 6), (4, 11), (5, 6), (5, 7), (5, 8), (5, 9), (5, 10), (6, 7), (6, 8), (6, 10), (7, 8), (7, 11), (8, 9), (8, 10), (9, 10), (9, 11), (10, 11)]

How many distinct directed paths are there from node 0 to node 11? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
Evaluate this Python expression and return its integer value:

    max(12, 8, 4)


Prompt:
Implement `g(lst)` that returns the index of the maximum element in `lst` (first occurrence; behavior undefined on empty).

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return lst.index(max(lst))
```


Prompt:
Implement `g(lst)` that returns the sum of even numbers in `lst`.

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return sum(x for x in lst if x % 2 == 0)
```


Prompt:
Consider two Python functions:

    def f(x): return x * 5 + 3
    def g(x): return x * x

What is the integer value of `g(f(4))`?


Prompt:
What does the following Python snippet print?

    a = 2
    b = 5
    total = 0
    for i in range(1, 1 + 1):
        total += a * i - b
    print(total)

Return the integer that is printed.


Prompt:
Consider two Python functions:

    def f(x): return x * 5 + 7
    def g(x): return x * x

What is the integer value of `g(f(9))`?


Prompt:
Evaluate this Python expression and return its integer value:

    len('xx')


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 3 modulo 9. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=6, v=29), (w=15, v=13), (w=23, v=40), (w=2, v=6), (w=16, v=19), (w=19, v=34), (w=14, v=45), (w=21, v=53), (w=4, v=53), (w=23, v=67), (w=17, v=49), (w=22, v=12), (w=4, v=47), (w=9, v=7)
Constraint: total weight ≡ 3 (mod 9)

Return only the integer optimal total value.


Prompt:
Implement a Python function `f(x)` that returns `x * 5 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 5 + 1
```


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 8 modulo 11. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=7, v=6), (w=10, v=52), (w=16, v=67), (w=12, v=18), (w=1, v=51), (w=3, v=19), (w=13, v=64), (w=26, v=61), (w=16, v=15), (w=21, v=2), (w=5, v=4), (w=26, v=11), (w=19, v=29), (w=2, v=7)
Constraint: total weight ≡ 8 (mod 11)

Return only the integer optimal total value.


Prompt:
Consider a directed acyclic graph (DAG) on the 13 nodes {0, 1, …, 12} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 8), (0, 10), (1, 2), (1, 4), (1, 6), (1, 10), (1, 11), (2, 3), (2, 4), (2, 8), (3, 4), (3, 6), (3, 7), (3, 12), (4, 5), (4, 6), (4, 8), (4, 9), (4, 10), (5, 6), (5, 8), (5, 9), (6, 7), (6, 9), (6, 11), (6, 12), (7, 8), (7, 10), (7, 12), (8, 9), (8, 10), (8, 11), (8, 12), (9, 10), (10, 11), (10, 12), (11, 12)]

How many distinct directed paths are there from node 0 to node 12? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
What does this Python statement print?

    print(47 - 14)

Return the printed value (an integer).


Prompt:
Implement a Python function `f(x)` that returns `x * 5 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 5 + 1
```


Prompt:
Implement a Python function `f(x)` that returns `x * 3 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 3 + 1
```


Prompt:
Evaluate this Python expression and return its integer value:

    abs(21 - 8)


Prompt:
Consider a directed acyclic graph (DAG) on the 15 nodes {0, 1, …, 14} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 2), (0, 7), (0, 11), (1, 2), (1, 4), (1, 5), (1, 12), (1, 13), (2, 3), (2, 7), (2, 12), (2, 13), (2, 14), (3, 4), (3, 10), (3, 11), (4, 5), (4, 12), (4, 14), (5, 6), (5, 7), (5, 9), (6, 7), (7, 8), (7, 9), (7, 11), (7, 13), (7, 14), (8, 9), (8, 10), (9, 10), (10, 11), (10, 12), (10, 14), (11, 12), (11, 14), (12, 13), (12, 14), (13, 14)]

How many distinct directed paths are there from node 0 to node 14? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
Consider two Python functions:

    def f(x): return x * 4 + 6
    def g(x): return x * x

What is the integer value of `g(f(10))`?


Prompt:
Consider two Python functions:

    def f(x): return x * 5 + 3
    def g(x): return x * x

What is the integer value of `g(f(11))`?


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [8, 11, 15, 8, 9, 12, 10, 9, 11]
Target: 64

Return only the integer count.


Prompt:
Given the Python definition

    def f(x): return x * 9

what is the value of `f(14)`? Return an integer.


Prompt:
What does this Python statement print?

    print(21 - 27)

Return the printed value (an integer).


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [4, 2, 9, 1, 11, 11, 14, 13, 5, 9, 1, 1]
Target: 55

Return only the integer count.


Prompt:
Consider two Python functions:

    def f(x): return x * 7 + 4
    def g(x): return x * x

What is the integer value of `g(f(11))`?


Prompt:
Implement `g(lst)` that returns the sorted, deduplicated list (ascending).

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return sorted(set(lst))
```


Prompt:
Consider a directed acyclic graph (DAG) on the 16 nodes {0, 1, …, 15} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 2), (0, 7), (0, 10), (0, 11), (0, 14), (1, 2), (1, 5), (1, 6), (2, 3), (2, 10), (3, 4), (3, 5), (3, 11), (3, 14), (4, 5), (4, 7), (4, 11), (5, 6), (5, 8), (5, 11), (5, 14), (6, 7), (6, 8), (6, 12), (7, 8), (7, 10), (7, 13), (7, 14), (8, 9), (8, 11), (8, 14), (8, 15), (9, 10), (9, 13), (9, 14), (9, 15), (10, 11), (10, 14), (11, 12), (11, 15), (12, 13), (12, 14), (13, 14), (14, 15)]

How many distinct directed paths are there from node 0 to node 15? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
Implement `g(lst)` that returns the index of the maximum element in `lst` (first occurrence; behavior undefined on empty).

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return lst.index(max(lst))
```


Prompt:
Evaluate this Python expression and return its integer value:

    max(27, 11, 16)


Prompt:
Evaluate this Python expression and return its integer value:

    min(26, 14, 40)


Prompt:
Implement `g(lst)` that returns the index of the maximum element in `lst` (first occurrence; behavior undefined on empty).

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return lst.index(max(lst))
```


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 2 modulo 5. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=2, v=13), (w=1, v=51), (w=13, v=9), (w=28, v=39), (w=6, v=15), (w=1, v=22), (w=29, v=27), (w=28, v=34), (w=28, v=36), (w=1, v=23), (w=3, v=15), (w=13, v=45), (w=24, v=26), (w=27, v=24), (w=23, v=2)
Constraint: total weight ≡ 2 (mod 5)

Return only the integer optimal total value.


Prompt:
Consider two Python functions:

    def f(x): return x * 2 + 1
    def g(x): return x * x

What is the integer value of `g(f(10))`?


Prompt:
Implement a Python function `f(x)` that returns `x * 6 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 6 + 1
```


Prompt:
Implement a Python function `f(x)` that returns `x * 4 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 4 + 1
```


Prompt:
Evaluate this Python expression and return its integer value:

    abs(29 - 12)


Prompt:
Consider a directed acyclic graph (DAG) on the 16 nodes {0, 1, …, 15} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 3), (0, 8), (0, 13), (1, 2), (1, 3), (1, 8), (1, 10), (2, 3), (2, 5), (2, 6), (3, 4), (3, 7), (3, 8), (3, 11), (3, 13), (4, 5), (4, 6), (4, 7), (4, 11), (4, 12), (4, 14), (5, 6), (5, 13), (6, 7), (6, 11), (6, 14), (7, 8), (8, 9), (8, 13), (9, 10), (9, 11), (9, 13), (9, 14), (9, 15), (10, 11), (11, 12), (12, 13), (12, 14), (13, 14), (13, 15), (14, 15)]

How many distinct directed paths are there from node 0 to node 15? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
Implement `g(lst)` that returns the list reversed.

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return list(reversed(lst))
```


Prompt:
What does this Python statement print?

    print(11 + 15)

Return the printed value (an integer).


Prompt:
What does the following Python snippet print?

    a = 5
    b = 8
    total = 0
    for i in range(1, 1 + 1):
        total += a * i - b
    print(total)

Return the integer that is printed.


Prompt:
What does the following Python snippet print?

    a = 10
    b = 9
    total = 0
    for i in range(1, 2 + 1):
        total += a * i - b
    print(total)

Return the integer that is printed.


Prompt:
Consider a directed acyclic graph (DAG) on the 14 nodes {0, 1, …, 13} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 12), (1, 2), (1, 7), (2, 3), (2, 10), (3, 4), (3, 10), (3, 11), (4, 5), (4, 6), (4, 9), (5, 6), (5, 7), (5, 8), (6, 7), (6, 10), (7, 8), (7, 11), (7, 12), (8, 9), (8, 10), (8, 12), (9, 10), (9, 12), (10, 11), (11, 12), (11, 13), (12, 13)]

How many distinct directed paths are there from node 0 to node 13? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
Implement `g(lst)` that returns the index of the maximum element in `lst` (first occurrence; behavior undefined on empty).

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return lst.index(max(lst))
```


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 2 modulo 5. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=10, v=46), (w=18, v=43), (w=9, v=4), (w=2, v=17), (w=17, v=24), (w=5, v=41), (w=6, v=6), (w=15, v=19), (w=17, v=8), (w=30, v=42), (w=22, v=16), (w=11, v=63), (w=18, v=49)
Constraint: total weight ≡ 2 (mod 5)

Return only the integer optimal total value.


Prompt:
Evaluate this Python expression and return its integer value:

    min(9, 8, 17)


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 9 modulo 10. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=9, v=28), (w=13, v=32), (w=13, v=35), (w=6, v=2), (w=15, v=10), (w=12, v=3), (w=26, v=31), (w=18, v=15), (w=29, v=66), (w=11, v=21), (w=30, v=38), (w=26, v=5), (w=22, v=1), (w=1, v=38), (w=12, v=44)
Constraint: total weight ≡ 9 (mod 10)

Return only the integer optimal total value.


Prompt:
Consider a directed acyclic graph (DAG) on the 13 nodes {0, 1, …, 12} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 12), (1, 2), (1, 12), (2, 3), (2, 6), (2, 11), (2, 12), (3, 4), (3, 12), (4, 5), (4, 7), (4, 10), (4, 12), (5, 6), (5, 10), (5, 11), (6, 7), (6, 10), (6, 11), (7, 8), (7, 10), (7, 11), (7, 12), (8, 9), (8, 11), (9, 10), (9, 11), (10, 11), (10, 12), (11, 12)]

How many distinct directed paths are there from node 0 to node 12? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
Implement a Python function `f(x)` that returns `x * 6 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 6 + 1
```


Prompt:
Evaluate this Python expression and return its integer value:

    15 % 19


Prompt:
The following Python function has a one-line bug:

```python
def h(x):
    return x + 18    # BUG: should be x - 18
```

Reply with the corrected function (just the def block, in a python code fence). Three calls of the form `h(x)` will be checked.

```python
def h(x):
    return x - 18
```


Prompt:
Implement a Python function `f(x)` that returns `x * 3 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 3 + 1
```


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [11, 14, 12, 15, 3, 5, 14, 14, 12]
Target: 77

Return only the integer count.


Prompt:
What does the following Python snippet print?

    a = 10
    b = 9
    total = 0
    for i in range(1, 4 + 1):
        total += a * i - b
    print(total)

Return the integer that is printed.


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 3 modulo 6. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=28, v=15), (w=25, v=27), (w=24, v=67), (w=11, v=61), (w=27, v=60), (w=23, v=62), (w=26, v=22), (w=17, v=18), (w=21, v=68), (w=7, v=53), (w=14, v=57)
Constraint: total weight ≡ 3 (mod 6)

Return only the integer optimal total value.


Prompt:
Consider two Python functions:

    def f(x): return x * 7 + 2
    def g(x): return x * x

What is the integer value of `g(f(5))`?


Prompt:
The following Python function has a one-line bug:

```python
def h(x):
    return x // 2    # BUG: should be x % 2
```

Reply with the corrected function (just the def block, in a python code fence). Three calls of the form `h(x)` will be checked.

```python
def h(x):
    return x % 2
```


Prompt:
What does this Python statement print?

    print(19 * 8)

Return the printed value (an integer).


Prompt:
Given the Python definition

    def f(x): return x ** 2 - x

what is the value of `f(6)`? Return an integer.


Prompt:
Implement a Python function `f(x)` that returns `x * 4 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 4 + 1
```


Prompt:
Implement a Python function `f(x)` that returns `x * 2 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 2 + 1
```


Prompt:
What does the following Python snippet print?

    a = 10
    b = 2
    total = 0
    for i in range(1, 2 + 1):
        total += a * i - b
    print(total)

Return the integer that is printed.


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 1 modulo 5. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=14, v=26), (w=9, v=5), (w=6, v=9), (w=28, v=44), (w=12, v=26), (w=25, v=47), (w=16, v=43), (w=16, v=47), (w=9, v=30), (w=7, v=65), (w=29, v=46)
Constraint: total weight ≡ 1 (mod 5)

Return only the integer optimal total value.


Prompt:
The following Python function has a one-line bug:

```python
def h(x):
    return x * x + 13    # BUG: should be x*x - 13
```

Reply with the corrected function (just the def block, in a python code fence). Three calls of the form `h(x)` will be checked.

```python
def h(x):
    return x * x - 13
```


Prompt:
Consider a directed acyclic graph (DAG) on the 14 nodes {0, 1, …, 13} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 4), (0, 5), (0, 12), (1, 2), (1, 4), (1, 6), (1, 9), (1, 11), (1, 13), (2, 3), (2, 7), (2, 10), (2, 12), (2, 13), (3, 4), (3, 8), (4, 5), (4, 11), (4, 13), (5, 6), (5, 11), (5, 12), (5, 13), (6, 7), (6, 12), (6, 13), (7, 8), (7, 10), (7, 12), (8, 9), (8, 12), (8, 13), (9, 10), (9, 13), (10, 11), (10, 12), (10, 13), (11, 12), (11, 13), (12, 13)]

How many distinct directed paths are there from node 0 to node 13? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
What does this Python statement print?

    print(20 + 28)

Return the printed value (an integer).


Prompt:
Implement a Python function `f(x)` that returns `x * 4 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 4 + 1
```


Prompt:
Evaluate this Python expression and return its integer value:

    len('xxxxxxxxxxxxxxx')


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 3 modulo 7. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=17, v=43), (w=1, v=37), (w=10, v=33), (w=25, v=20), (w=5, v=24), (w=9, v=52), (w=25, v=28), (w=13, v=19), (w=16, v=31), (w=5, v=44), (w=16, v=60), (w=14, v=24), (w=24, v=2), (w=19, v=69)
Constraint: total weight ≡ 3 (mod 7)

Return only the integer optimal total value.


Prompt:
Evaluate this Python expression and return its integer value:

    8 ** 2


Prompt:
Consider two Python functions:

    def f(x): return x * 6 + 3
    def g(x): return x * x

What is the integer value of `g(f(11))`?


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 2 modulo 5. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=27, v=12), (w=21, v=43), (w=4, v=50), (w=11, v=55), (w=25, v=9), (w=21, v=27), (w=22, v=37), (w=30, v=8), (w=12, v=5), (w=30, v=19), (w=25, v=19), (w=7, v=61), (w=16, v=36), (w=20, v=41), (w=17, v=40)
Constraint: total weight ≡ 2 (mod 5)

Return only the integer optimal total value.


Prompt:
The following Python function has a one-line bug:

```python
def h(x):
    return x // 19    # BUG: should be x % 19
```

Reply with the corrected function (just the def block, in a python code fence). Three calls of the form `h(x)` will be checked.

```python
def h(x):
    return x % 19
```


Prompt:
The following Python function has a one-line bug:

```python
def h(x):
    return x + 5    # BUG: should be x - 5
```

Reply with the corrected function (just the def block, in a python code fence). Three calls of the form `h(x)` will be checked.

```python
def h(x):
    return x - 5
```


Prompt:
What does this Python statement print?

    print(30 * 40)

Return the printed value (an integer).


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [3, 4, 2, 5, 11, 1, 1, 14, 15, 14, 9, 2]
Target: 64

Return only the integer count.


Prompt:
Implement a Python function `f(x)` that returns `x * 2 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 2 + 1
```


Prompt:
Evaluate this Python expression and return its integer value:

    max(10, 14, -4)


Prompt:
Evaluate this Python expression and return its integer value:

    len('xxxxxxxxxxxxxxxxxxxxx')


Prompt:
Given the Python definition

    def f(x): return x * x

what is the value of `f(8)`? Return an integer.


Prompt:
What does the following Python snippet print?

    a = 11
    b = 9
    total = 0
    for i in range(1, 2 + 1):
        total += a * i - b
    print(total)

Return the integer that is printed.


Prompt:
Given the Python definition

    def f(x): return 7 - x

what is the value of `f(11)`? Return an integer.


Prompt:
Evaluate this Python expression and return its integer value:

    8 % 11


Prompt:
Consider two Python functions:

    def f(x): return x * 4 + 2
    def g(x): return x * x

What is the integer value of `g(f(9))`?


Prompt:
Implement a Python function `f(x)` that returns `x * 6 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 6 + 1
```


Prompt:
What does the following Python snippet print?

    a = 9
    b = 10
    total = 0
    for i in range(1, 3 + 1):
        total += a * i - b
    print(total)

Return the integer that is printed.


Prompt:
Evaluate this Python expression and return its integer value:

    12 // 5


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [10, 14, 13, 3, 2, 12, 13, 5, 9, 12, 3, 4]
Target: 65

Return only the integer count.


Prompt:
What does this Python statement print?

    print(14 * 38)

Return the printed value (an integer).


Prompt:
Implement `g(lst)` that returns the list reversed.

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return list(reversed(lst))
```


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 0 modulo 7. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=14, v=29), (w=22, v=65), (w=14, v=35), (w=15, v=42), (w=20, v=30), (w=16, v=19), (w=24, v=56), (w=16, v=51), (w=27, v=16), (w=25, v=33), (w=27, v=12)
Constraint: total weight ≡ 0 (mod 7)

Return only the integer optimal total value.


Prompt:
The following Python function has a one-line bug:

```python
def h(x):
    return x * x + 16    # BUG: should be x*x - 16
```

Reply with the corrected function (just the def block, in a python code fence). Three calls of the form `h(x)` will be checked.

```python
def h(x):
    return x * x - 16
```


Prompt:
Given the Python definition

    def f(x): return x * 5

what is the value of `f(12)`? Return an integer.


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 1 modulo 5. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=5, v=63), (w=4, v=19), (w=20, v=13), (w=21, v=25), (w=20, v=45), (w=16, v=33), (w=10, v=31), (w=16, v=46), (w=18, v=16), (w=28, v=18), (w=29, v=39)
Constraint: total weight ≡ 1 (mod 5)

Return only the integer optimal total value.


Prompt:
Consider two Python functions:

    def f(x): return x * 3 + 6
    def g(x): return x * x

What is the integer value of `g(f(9))`?


Prompt:
Implement `g(lst)` that returns the index of the maximum element in `lst` (first occurrence; behavior undefined on empty).

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return lst.index(max(lst))
```


Prompt:
Given the Python definition

    def f(x): return x + 3

what is the value of `f(12)`? Return an integer.


Prompt:
What does the following Python snippet print?

    a = 7
    b = 10
    total = 0
    for i in range(1, 4 + 1):
        total += a * i - b
    print(total)

Return the integer that is printed.


Prompt:
Evaluate this Python expression and return its integer value:

    abs(2 - 17)


Prompt:
What does the following Python snippet print?

    a = 4
    b = 7
    total = 0
    for i in range(1, 5 + 1):
        total += a * i - b
    print(total)

Return the integer that is printed.


Prompt:
What does the following Python snippet print?

    a = 4
    b = 4
    total = 0
    for i in range(1, 4 + 1):
        total += a * i - b
    print(total)

Return the integer that is printed.


Prompt:
Implement `g(lst)` that returns the list reversed.

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return list(reversed(lst))
```


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 6 modulo 8. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=21, v=10), (w=1, v=36), (w=24, v=60), (w=2, v=44), (w=29, v=25), (w=19, v=15), (w=25, v=17), (w=3, v=36), (w=26, v=58), (w=28, v=12), (w=20, v=70)
Constraint: total weight ≡ 6 (mod 8)

Return only the integer optimal total value.


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [4, 3, 5, 5, 4, 7, 8, 7, 12]
Target: 30

Return only the integer count.


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [11, 12, 8, 4, 2, 9, 9, 7, 6, 14, 1]
Target: 41

Return only the integer count.


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 6 modulo 11. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=4, v=33), (w=23, v=41), (w=15, v=36), (w=12, v=55), (w=6, v=25), (w=30, v=60), (w=13, v=32), (w=27, v=61), (w=17, v=31), (w=15, v=56), (w=18, v=36)
Constraint: total weight ≡ 6 (mod 11)

Return only the integer optimal total value.


Prompt:
Implement a Python function `f(x)` that returns `x * 5 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 5 + 1
```


Prompt:
Implement `g(lst)` that returns the sorted, deduplicated list (ascending).

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return sorted(set(lst))
```


Prompt:
Implement `g(lst)` that returns the list reversed.

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return list(reversed(lst))
```


Prompt:
What does the following Python snippet print?

    a = 2
    b = 11
    total = 0
    for i in range(1, 5 + 1):
        total += a * i - b
    print(total)

Return the integer that is printed.


Prompt:
The following Python function has a one-line bug:

```python
def h(x):
    return x + 14    # BUG: should be x - 14
```

Reply with the corrected function (just the def block, in a python code fence). Three calls of the form `h(x)` will be checked.

```python
def h(x):
    return x - 14
```


Prompt:
Consider a directed acyclic graph (DAG) on the 12 nodes {0, 1, …, 11} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 10), (1, 2), (1, 5), (1, 7), (1, 8), (1, 10), (2, 3), (2, 4), (2, 11), (3, 4), (3, 6), (3, 7), (3, 11), (4, 5), (4, 6), (4, 7), (5, 6), (5, 7), (5, 8), (5, 11), (6, 7), (6, 8), (6, 9), (7, 8), (7, 9), (7, 10), (8, 9), (8, 10), (8, 11), (9, 10), (9, 11), (10, 11)]

How many distinct directed paths are there from node 0 to node 11? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
What does this Python statement print?

    print(14 * 21)

Return the printed value (an integer).


Prompt:
Implement `g(lst)` that returns the sorted, deduplicated list (ascending).

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return sorted(set(lst))
```


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [14, 14, 15, 9, 5, 13, 15, 15, 2]
Target: 49

Return only the integer count.


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 4 modulo 10. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=30, v=40), (w=21, v=15), (w=22, v=45), (w=19, v=40), (w=16, v=22), (w=27, v=44), (w=16, v=63), (w=20, v=53), (w=30, v=23), (w=29, v=69), (w=18, v=35), (w=26, v=25), (w=13, v=62), (w=23, v=68)
Constraint: total weight ≡ 4 (mod 10)

Return only the integer optimal total value.


Prompt:
What does this Python statement print?

    print(36 + 49)

Return the printed value (an integer).


Prompt:
What does this Python statement print?

    print(19 * 49)

Return the printed value (an integer).


Prompt:
Given the Python definition

    def f(x): return x * x

what is the value of `f(7)`? Return an integer.


Prompt:
Implement a Python function `f(x)` that returns `x * 3 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 3 + 1
```


Prompt:
Consider a directed acyclic graph (DAG) on the 12 nodes {0, 1, …, 11} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 7), (1, 2), (1, 8), (1, 11), (2, 3), (2, 4), (2, 7), (2, 9), (3, 4), (3, 5), (3, 6), (3, 9), (4, 5), (4, 7), (4, 11), (5, 6), (5, 10), (6, 7), (6, 8), (6, 10), (7, 8), (7, 9), (7, 10), (7, 11), (8, 9), (8, 10), (8, 11), (9, 10), (9, 11), (10, 11)]

How many distinct directed paths are there from node 0 to node 11? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
What does this Python statement print?

    print(38 * 14)

Return the printed value (an integer).


Prompt:
What does this Python statement print?

    print(28 - 37)

Return the printed value (an integer).


Prompt:
What does the following Python snippet print?

    a = 8
    b = 2
    total = 0
    for i in range(1, 3 + 1):
        total += a * i - b
    print(total)

Return the integer that is printed.


Prompt:
What does the following Python snippet print?

    a = 3
    b = 5
    total = 0
    for i in range(1, 1 + 1):
        total += a * i - b
    print(total)

Return the integer that is printed.


Prompt:
Implement `g(lst)` that returns the sum of even numbers in `lst`.

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return sum(x for x in lst if x % 2 == 0)
```


Prompt:
What does this Python statement print?

    print(17 * 15)

Return the printed value (an integer).


Prompt:
Given the Python definition

    def f(x): return x ** 2 - x

what is the value of `f(5)`? Return an integer.


Prompt:
The following Python function has a one-line bug:

```python
def h(x):
    return x // 8    # BUG: should be x % 8
```

Reply with the corrected function (just the def block, in a python code fence). Three calls of the form `h(x)` will be checked.

```python
def h(x):
    return x % 8
```


Prompt:
Implement a Python function `f(x)` that returns `x * 3 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 3 + 1
```


Prompt:
Given the Python definition

    def f(x): return x ** 2 - x

what is the value of `f(7)`? Return an integer.


Prompt:
Consider two Python functions:

    def f(x): return x * 2 + 4
    def g(x): return x * x

What is the integer value of `g(f(6))`?


Prompt:
Consider a directed acyclic graph (DAG) on the 12 nodes {0, 1, …, 11} with the following edge list (each edge u→v points from a lower-numbered node to a higher-numbered node):

  edges = [(0, 1), (0, 3), (0, 7), (1, 2), (1, 4), (1, 7), (2, 3), (2, 7), (2, 9), (3, 4), (3, 8), (3, 10), (4, 5), (4, 7), (4, 10), (5, 6), (6, 7), (6, 9), (6, 10), (7, 8), (7, 9), (7, 11), (8, 9), (8, 10), (9, 10), (9, 11), (10, 11)]

How many distinct directed paths are there from node 0 to node 11? (Each path is a sequence of edges that begins at 0 and ends at n-1.) Return only the integer count.


Prompt:
Implement `g(lst)` that returns the index of the maximum element in `lst` (first occurrence; behavior undefined on empty).

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return lst.index(max(lst))
```


Prompt:
What does this Python statement print?

    print(17 * 12)

Return the printed value (an integer).


Prompt:
Consider two Python functions:

    def f(x): return x * 7 + 2
    def g(x): return x * x

What is the integer value of `g(f(6))`?


Prompt:
Implement a Python function `f(x)` that returns `x * 2 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 2 + 1
```


Prompt:
Consider two Python functions:

    def f(x): return x * 7 + 1
    def g(x): return x * x

What is the integer value of `g(f(7))`?


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [5, 5, 9, 3, 2, 12, 15, 14, 8, 1, 15]
Target: 44

Return only the integer count.


Prompt:
Consider two Python functions:

    def f(x): return x * 2 + 1
    def g(x): return x * x

What is the integer value of `g(f(10))`?


Prompt:
Given the Python definition

    def f(x): return x * 2

what is the value of `f(3)`? Return an integer.


Prompt:
Implement `g(lst)` that returns the sorted, deduplicated list (ascending).

Reply with a Python code block containing only the function definition. Example format:

```python
def g(lst):
    return sorted(set(lst))
```


Prompt:
Consider two Python functions:

    def f(x): return x * 2 + 4
    def g(x): return x * x

What is the integer value of `g(f(11))`?


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 8 modulo 9. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=14, v=49), (w=8, v=46), (w=22, v=60), (w=21, v=31), (w=24, v=6), (w=7, v=18), (w=21, v=69), (w=3, v=46), (w=27, v=29), (w=8, v=8), (w=28, v=41)
Constraint: total weight ≡ 8 (mod 9)

Return only the integer optimal total value.


Prompt:
You are given a list of items, each with a weight w and a value v. Choose any subset of the items (each item at most once; no overall weight budget) so that the SUM OF WEIGHTS is congruent to 3 modulo 8. Among all such subsets, maximise the SUM OF VALUES. The empty subset (weight sum 0, value 0) is allowed; assume at least one valid subset exists.

Items: (w=16, v=53), (w=18, v=60), (w=15, v=10), (w=21, v=40), (w=4, v=55), (w=29, v=15), (w=14, v=28), (w=22, v=56), (w=1, v=45), (w=9, v=44), (w=28, v=28), (w=7, v=26), (w=29, v=16)
Constraint: total weight ≡ 3 (mod 8)

Return only the integer optimal total value.


Prompt:
What does this Python statement print?

    print(5 + 40)

Return the printed value (an integer).


Prompt:
Implement a Python function `f(x)` that returns `x * 5 + 1`. Reply with a Python code block containing only the function definition, e.g.:

```python
def f(x):
    return x * 5 + 1
```


Prompt:
Count the number of distinct subsets of the following list of non-negative integers whose elements sum to exactly the given target. Two subsets are distinct if their index sets differ (the empty subset counts only if the target is 0). Return a single integer.

List: [1, 3, 11, 5, 8, 10, 2, 15, 15, 3, 2]
Target: 48

Return only the integer count.