id
large_stringlengths
39
50
domain
large_stringclasses
3 values
difficulty
large_stringclasses
4 values
prompt
large_stringlengths
772
1.1k
canonical_solution
large_stringclasses
7 values
test_cases
large_stringlengths
55
333
entry_point
large_stringclasses
7 values
variant
large_stringclasses
7 values
answer
int64
0
399
verification_status
large_stringclasses
1 value
arrays-monotonic_split-f01898bbe39e7059
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-f01898bbe39e7059 # domain: arrays # variant: monotonic_split # difficulty: easy You are given a 0-indexed non-decreasing integer array A of length 4 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A its...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 2, "input": {"array": [2, 2, 3, 3], "threshold": 3}}]
solve_arrays_monotonic_split
monotonic_split
2
sat
arrays-equilibrium_index-fcaf408ef5765438
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-fcaf408ef5765438 # domain: arrays # variant: equilibrium_index # difficulty: easy You are given a 0-indexed integer array A of length 4. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium inde...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 1, "input": {"array": [6, 5, 4, 2]}}]
solve_arrays_equilibrium_index
equilibrium_index
1
sat
arrays-monotonic_split-350c2705f9c69f79
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-350c2705f9c69f79 # domain: arrays # variant: monotonic_split # difficulty: easy You are given a 0-indexed non-decreasing integer array A of length 5 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A its...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 0, "input": {"array": [2, 2, 2, 4, 5], "threshold": 2}}]
solve_arrays_monotonic_split
monotonic_split
0
sat
arrays-equilibrium_index-3d7cbc7fe35c7c48
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-3d7cbc7fe35c7c48 # domain: arrays # variant: equilibrium_index # difficulty: easy You are given a 0-indexed integer array A of length 3. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium inde...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 1, "input": {"array": [4, 4, 4]}}]
solve_arrays_equilibrium_index
equilibrium_index
1
sat
arrays-monotonic_split-23989c1c06cd8564
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-23989c1c06cd8564 # domain: arrays # variant: monotonic_split # difficulty: easy You are given a 0-indexed non-decreasing integer array A of length 4 with 0 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A its...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 1, "input": {"array": [0, 1, 2, 4], "threshold": 1}}]
solve_arrays_monotonic_split
monotonic_split
1
sat
arrays-monotonic_split-f83ad4c3b3a4945b
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-f83ad4c3b3a4945b # domain: arrays # variant: monotonic_split # difficulty: easy You are given a 0-indexed non-decreasing integer array A of length 4 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A its...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 0, "input": {"array": [2, 4, 4, 4], "threshold": 2}}]
solve_arrays_monotonic_split
monotonic_split
0
sat
arrays-equilibrium_index-5c25118b81b05c85
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-5c25118b81b05c85 # domain: arrays # variant: equilibrium_index # difficulty: easy You are given a 0-indexed integer array A of length 3. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium inde...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 1, "input": {"array": [2, 9, 2]}}]
solve_arrays_equilibrium_index
equilibrium_index
1
sat
arrays-equilibrium_index-effa7d045cc99980
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-effa7d045cc99980 # domain: arrays # variant: equilibrium_index # difficulty: easy You are given a 0-indexed integer array A of length 3. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium inde...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 1, "input": {"array": [8, 7, 8]}}]
solve_arrays_equilibrium_index
equilibrium_index
1
sat
arrays-equilibrium_index-88beb1835466c78f
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-88beb1835466c78f # domain: arrays # variant: equilibrium_index # difficulty: easy You are given a 0-indexed integer array A of length 3. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium inde...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 1, "input": {"array": [8, 4, 8]}}]
solve_arrays_equilibrium_index
equilibrium_index
1
sat
arrays-equilibrium_index-16232be3b50ce037
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-16232be3b50ce037 # domain: arrays # variant: equilibrium_index # difficulty: easy You are given a 0-indexed integer array A of length 5. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium inde...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 2, "input": {"array": [9, 7, 9, 7, 9]}}]
solve_arrays_equilibrium_index
equilibrium_index
2
sat
arrays-equilibrium_index-2f71bdcf418d921f
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-2f71bdcf418d921f # domain: arrays # variant: equilibrium_index # difficulty: easy You are given a 0-indexed integer array A of length 5. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium inde...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 1, "input": {"array": [7, 4, 1, 3, 3]}}]
solve_arrays_equilibrium_index
equilibrium_index
1
sat
arrays-monotonic_split-ec4a226bd5d49775
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-ec4a226bd5d49775 # domain: arrays # variant: monotonic_split # difficulty: easy You are given a 0-indexed non-decreasing integer array A of length 3 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A its...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 2, "input": {"array": [1, 3, 5], "threshold": 5}}]
solve_arrays_monotonic_split
monotonic_split
2
sat
arrays-monotonic_split-530fb97887b10d6a
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-530fb97887b10d6a # domain: arrays # variant: monotonic_split # difficulty: easy You are given a 0-indexed non-decreasing integer array A of length 4 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A its...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 3, "input": {"array": [2, 3, 4, 6], "threshold": 6}}]
solve_arrays_monotonic_split
monotonic_split
3
sat
arrays-equilibrium_index-5f2b8929f7be3577
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-5f2b8929f7be3577 # domain: arrays # variant: equilibrium_index # difficulty: easy You are given a 0-indexed integer array A of length 3. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium inde...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 1, "input": {"array": [8, 8, 8]}}]
solve_arrays_equilibrium_index
equilibrium_index
1
sat
arrays-monotonic_split-8883bccc01f9282a
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-8883bccc01f9282a # domain: arrays # variant: monotonic_split # difficulty: easy You are given a 0-indexed non-decreasing integer array A of length 5 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A its...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 2, "input": {"array": [2, 2, 3, 4, 6], "threshold": 3}}]
solve_arrays_monotonic_split
monotonic_split
2
sat
arrays-equilibrium_index-13520bb36d44b68e
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-13520bb36d44b68e # domain: arrays # variant: equilibrium_index # difficulty: easy You are given a 0-indexed integer array A of length 5. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium inde...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 2, "input": {"array": [5, 7, 2, 7, 5]}}]
solve_arrays_equilibrium_index
equilibrium_index
2
sat
arrays-monotonic_split-c6974a828fa7a876
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-c6974a828fa7a876 # domain: arrays # variant: monotonic_split # difficulty: easy You are given a 0-indexed non-decreasing integer array A of length 3 with 0 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A its...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 1, "input": {"array": [0, 2, 2], "threshold": 2}}]
solve_arrays_monotonic_split
monotonic_split
1
sat
arrays-equilibrium_index-8f1eb9e46bd017b5
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-8f1eb9e46bd017b5 # domain: arrays # variant: equilibrium_index # difficulty: easy You are given a 0-indexed integer array A of length 3. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium inde...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 1, "input": {"array": [8, 2, 8]}}]
solve_arrays_equilibrium_index
equilibrium_index
1
sat
arrays-equilibrium_index-f6855a420b49fdbf
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-f6855a420b49fdbf # domain: arrays # variant: equilibrium_index # difficulty: easy You are given a 0-indexed integer array A of length 5. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium inde...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 2, "input": {"array": [6, 3, 8, 6, 3]}}]
solve_arrays_equilibrium_index
equilibrium_index
2
sat
arrays-monotonic_split-2abbcd0d577e18ff
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-2abbcd0d577e18ff # domain: arrays # variant: monotonic_split # difficulty: easy You are given a 0-indexed non-decreasing integer array A of length 4 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A its...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 0, "input": {"array": [2, 2, 2, 2], "threshold": 2}}]
solve_arrays_monotonic_split
monotonic_split
0
sat
arrays-monotonic_split-db26a75d6e8d799e
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-db26a75d6e8d799e # domain: arrays # variant: monotonic_split # difficulty: easy You are given a 0-indexed non-decreasing integer array A of length 3 with 0 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A its...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 2, "input": {"array": [0, 2, 3], "threshold": 3}}]
solve_arrays_monotonic_split
monotonic_split
2
sat
arrays-equilibrium_index-1a8307b31d48fd6e
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-1a8307b31d48fd6e # domain: arrays # variant: equilibrium_index # difficulty: easy You are given a 0-indexed integer array A of length 3. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium inde...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 1, "input": {"array": [5, 8, 5]}}]
solve_arrays_equilibrium_index
equilibrium_index
1
sat
arrays-equilibrium_index-12c829027b103838
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-12c829027b103838 # domain: arrays # variant: equilibrium_index # difficulty: easy You are given a 0-indexed integer array A of length 3. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium inde...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 1, "input": {"array": [2, 2, 2]}}]
solve_arrays_equilibrium_index
equilibrium_index
1
sat
arrays-equilibrium_index-0a076e6cac693065
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-0a076e6cac693065 # domain: arrays # variant: equilibrium_index # difficulty: easy You are given a 0-indexed integer array A of length 5. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium inde...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 2, "input": {"array": [1, 2, 4, 2, 1]}}]
solve_arrays_equilibrium_index
equilibrium_index
2
sat
arrays-equilibrium_index-a4a86fc34e0f4e60
arrays
easy
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-a4a86fc34e0f4e60 # domain: arrays # variant: equilibrium_index # difficulty: easy You are given a 0-indexed integer array A of length 5. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium inde...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 2, "input": {"array": [5, 6, 2, 6, 5]}}]
solve_arrays_equilibrium_index
equilibrium_index
2
sat
arrays-monotonic_split-e54d5a6c1d256858
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-e54d5a6c1d256858 # domain: arrays # variant: monotonic_split # difficulty: medium You are given a 0-indexed non-decreasing integer array A of length 11 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A ...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 1, "input": {"array": [2, 4, 6, 8, 9, 9, 9, 9, 9, 9, 9], "threshold": 4}}]
solve_arrays_monotonic_split
monotonic_split
1
sat
arrays-equilibrium_index-54bbd88f3bc19d84
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-54bbd88f3bc19d84 # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 10. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium i...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 6, "input": {"array": [2, 1, 3, 8, 5, 5, 8, 8, 9, 7]}}]
solve_arrays_equilibrium_index
equilibrium_index
6
sat
arrays-equilibrium_index-04dccbf2b76a15b1
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-04dccbf2b76a15b1 # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 7. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium in...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 1, "input": {"array": [9, 2, 4, 2, 1, 1, 1]}}]
solve_arrays_equilibrium_index
equilibrium_index
1
sat
arrays-equilibrium_index-a78343f951c33c77
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-a78343f951c33c77 # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 7. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium in...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 1, "input": {"array": [8, 1, 3, 2, 1, 1, 1]}}]
solve_arrays_equilibrium_index
equilibrium_index
1
sat
arrays-equilibrium_index-34b12989982d3303
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-34b12989982d3303 # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 7. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium in...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 3, "input": {"array": [1, 9, 3, 1, 5, 4, 4]}}]
solve_arrays_equilibrium_index
equilibrium_index
3
sat
arrays-monotonic_split-198839695f931f0b
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-198839695f931f0b # domain: arrays # variant: monotonic_split # difficulty: medium You are given a 0-indexed non-decreasing integer array A of length 9 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A i...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 5, "input": {"array": [1, 1, 1, 2, 4, 5, 5, 6, 8], "threshold": 5}}]
solve_arrays_monotonic_split
monotonic_split
5
sat
arrays-monotonic_split-13397d7253845128
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-13397d7253845128 # domain: arrays # variant: monotonic_split # difficulty: medium You are given a 0-indexed non-decreasing integer array A of length 9 with 0 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A i...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 0, "input": {"array": [0, 0, 1, 1, 1, 3, 5, 6, 7], "threshold": 0}}]
solve_arrays_monotonic_split
monotonic_split
0
sat
arrays-monotonic_split-4079e4e1ea3805b3
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-4079e4e1ea3805b3 # domain: arrays # variant: monotonic_split # difficulty: medium You are given a 0-indexed non-decreasing integer array A of length 12 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A ...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 5, "input": {"array": [1, 3, 5, 5, 6, 8, 8, 9, 9, 9, 9, 9], "threshold": 8}}]
solve_arrays_monotonic_split
monotonic_split
5
sat
arrays-equilibrium_index-caae4b1548b4d261
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-caae4b1548b4d261 # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 6. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium in...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 1, "input": {"array": [4, 9, 1, 1, 1, 1]}}]
solve_arrays_equilibrium_index
equilibrium_index
1
sat
arrays-equilibrium_index-99751fe0100f3d4a
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-99751fe0100f3d4a # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 11. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium i...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 5, "input": {"array": [2, 3, 4, 6, 3, 2, 4, 2, 1, 6, 5]}}]
solve_arrays_equilibrium_index
equilibrium_index
5
sat
arrays-monotonic_split-f2f7f7e9a99bb4a7
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-f2f7f7e9a99bb4a7 # domain: arrays # variant: monotonic_split # difficulty: medium You are given a 0-indexed non-decreasing integer array A of length 12 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A ...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 8, "input": {"array": [2, 4, 4, 5, 6, 6, 6, 8, 9, 9, 9, 9], "threshold": 9}}]
solve_arrays_monotonic_split
monotonic_split
8
sat
arrays-equilibrium_index-c6edcf2f27612cfa
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-c6edcf2f27612cfa # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 8. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium in...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 2, "input": {"array": [8, 2, 7, 2, 2, 2, 3, 1]}}]
solve_arrays_equilibrium_index
equilibrium_index
2
sat
arrays-equilibrium_index-0da61b37b643ef9f
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-0da61b37b643ef9f # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 6. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium in...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 1, "input": {"array": [5, 3, 2, 1, 1, 1]}}]
solve_arrays_equilibrium_index
equilibrium_index
1
sat
arrays-equilibrium_index-6763f4daf0f079d8
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-6763f4daf0f079d8 # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 10. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium i...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 5, "input": {"array": [7, 8, 6, 3, 2, 9, 2, 9, 7, 8]}}]
solve_arrays_equilibrium_index
equilibrium_index
5
sat
arrays-monotonic_split-3cefc25db0cf238a
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-3cefc25db0cf238a # domain: arrays # variant: monotonic_split # difficulty: medium You are given a 0-indexed non-decreasing integer array A of length 6 with 0 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A i...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 3, "input": {"array": [0, 1, 3, 4, 5, 6], "threshold": 4}}]
solve_arrays_monotonic_split
monotonic_split
3
sat
arrays-monotonic_split-a2ff9b933d8ec567
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-a2ff9b933d8ec567 # domain: arrays # variant: monotonic_split # difficulty: medium You are given a 0-indexed non-decreasing integer array A of length 5 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A i...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 4, "input": {"array": [1, 1, 1, 3, 4], "threshold": 4}}]
solve_arrays_monotonic_split
monotonic_split
4
sat
arrays-equilibrium_index-d6e82277e737de1c
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-d6e82277e737de1c # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 11. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium i...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 2, "input": {"array": [9, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1]}}]
solve_arrays_equilibrium_index
equilibrium_index
2
sat
arrays-equilibrium_index-1020b6d4abf74e86
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-1020b6d4abf74e86 # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 5. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium in...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 2, "input": {"array": [3, 5, 2, 4, 4]}}]
solve_arrays_equilibrium_index
equilibrium_index
2
sat
arrays-equilibrium_index-2c49907e4f5193e0
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-2c49907e4f5193e0 # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 7. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium in...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 3, "input": {"array": [9, 6, 7, 2, 8, 6, 8]}}]
solve_arrays_equilibrium_index
equilibrium_index
3
sat
arrays-equilibrium_index-e12fef724e3dc50b
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-e12fef724e3dc50b # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 11. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium i...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 3, "input": {"array": [5, 5, 3, 5, 1, 3, 1, 2, 3, 2, 1]}}]
solve_arrays_equilibrium_index
equilibrium_index
3
sat
arrays-monotonic_split-a3ec287d97f08132
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-a3ec287d97f08132 # domain: arrays # variant: monotonic_split # difficulty: medium You are given a 0-indexed non-decreasing integer array A of length 6 with 0 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A i...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 0, "input": {"array": [0, 1, 1, 2, 3, 5], "threshold": 0}}]
solve_arrays_monotonic_split
monotonic_split
0
sat
arrays-monotonic_split-cdee758b5d47088f
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-cdee758b5d47088f # domain: arrays # variant: monotonic_split # difficulty: medium You are given a 0-indexed non-decreasing integer array A of length 11 with 0 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A ...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 1, "input": {"array": [0, 1, 2, 4, 6, 6, 6, 6, 8, 9, 9], "threshold": 1}}]
solve_arrays_monotonic_split
monotonic_split
1
sat
arrays-equilibrium_index-008890f9528f9ce1
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-008890f9528f9ce1 # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 11. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium i...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 3, "input": {"array": [1, 8, 9, 7, 1, 1, 3, 2, 5, 3, 3]}}]
solve_arrays_equilibrium_index
equilibrium_index
3
sat
arrays-equilibrium_index-125cd5bfa7e38eb9
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-125cd5bfa7e38eb9 # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 10. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium i...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 5, "input": {"array": [9, 4, 3, 6, 6, 5, 5, 6, 9, 8]}}]
solve_arrays_equilibrium_index
equilibrium_index
5
sat
arrays-equilibrium_index-426b24ab0339af38
arrays
medium
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-426b24ab0339af38 # domain: arrays # variant: equilibrium_index # difficulty: medium You are given a 0-indexed integer array A of length 12. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium i...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 4, "input": {"array": [8, 6, 7, 3, 5, 5, 4, 4, 4, 5, 1, 1]}}]
solve_arrays_equilibrium_index
equilibrium_index
4
sat
arrays-monotonic_split-11e3ee5c5783aee6
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-11e3ee5c5783aee6 # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 14 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 4, "input": {"array": [2, 2, 4, 4, 5, 5, 5, 7, 9, 9, 9, 9, 9, 9], "threshold": 5}}]
solve_arrays_monotonic_split
monotonic_split
4
sat
arrays-monotonic_split-70400772a5fbe0d8
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-70400772a5fbe0d8 # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 13 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 5, "input": {"array": [1, 3, 5, 6, 8, 9, 9, 9, 9, 9, 9, 9, 9], "threshold": 9}}]
solve_arrays_monotonic_split
monotonic_split
5
sat
arrays-equilibrium_index-37816d47496e83ff
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-37816d47496e83ff # domain: arrays # variant: equilibrium_index # difficulty: hard You are given a 0-indexed integer array A of length 13. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ind...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 5, "input": {"array": [8, 4, 5, 9, 7, 9, 4, 4, 7, 7, 5, 3, 3]}}]
solve_arrays_equilibrium_index
equilibrium_index
5
sat
arrays-monotonic_split-cf6fa647d393b7f4
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-cf6fa647d393b7f4 # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 13 with 0 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 6, "input": {"array": [0, 2, 4, 6, 7, 7, 9, 9, 9, 9, 9, 9, 9], "threshold": 9}}]
solve_arrays_monotonic_split
monotonic_split
6
sat
arrays-monotonic_split-c1460316651a1049
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-c1460316651a1049 # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 12 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 1, "input": {"array": [1, 3, 3, 3, 5, 5, 6, 7, 7, 9, 9, 9], "threshold": 3}}]
solve_arrays_monotonic_split
monotonic_split
1
sat
arrays-monotonic_split-dacaa16bd44b6e3f
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-dacaa16bd44b6e3f # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 11 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 4, "input": {"array": [2, 4, 6, 6, 8, 8, 8, 9, 9, 9, 9], "threshold": 8}}]
solve_arrays_monotonic_split
monotonic_split
4
sat
arrays-monotonic_split-bcf34a422244a5ee
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-bcf34a422244a5ee # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 10 with 0 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 4, "input": {"array": [0, 1, 3, 4, 6, 7, 7, 8, 9, 9], "threshold": 6}}]
solve_arrays_monotonic_split
monotonic_split
4
sat
arrays-monotonic_split-034077ba86402903
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-034077ba86402903 # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 11 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 0, "input": {"array": [1, 1, 1, 3, 3, 3, 4, 5, 5, 5, 7], "threshold": 1}}]
solve_arrays_monotonic_split
monotonic_split
0
sat
arrays-monotonic_split-7d278960360d9948
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-7d278960360d9948 # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 10 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 0, "input": {"array": [1, 1, 1, 3, 4, 5, 5, 6, 6, 7], "threshold": 1}}]
solve_arrays_monotonic_split
monotonic_split
0
sat
arrays-equilibrium_index-b355d994056c98ae
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-b355d994056c98ae # domain: arrays # variant: equilibrium_index # difficulty: hard You are given a 0-indexed integer array A of length 10. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ind...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 6, "input": {"array": [9, 3, 5, 1, 4, 5, 1, 9, 9, 9]}}]
solve_arrays_equilibrium_index
equilibrium_index
6
sat
arrays-equilibrium_index-44c6b4057d850891
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-44c6b4057d850891 # domain: arrays # variant: equilibrium_index # difficulty: hard You are given a 0-indexed integer array A of length 10. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ind...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 4, "input": {"array": [5, 2, 8, 3, 1, 2, 3, 5, 3, 5]}}]
solve_arrays_equilibrium_index
equilibrium_index
4
sat
arrays-equilibrium_index-e7d9275950b5cbe0
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-e7d9275950b5cbe0 # domain: arrays # variant: equilibrium_index # difficulty: hard You are given a 0-indexed integer array A of length 10. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ind...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 2, "input": {"array": [3, 8, 7, 1, 1, 2, 2, 1, 1, 3]}}]
solve_arrays_equilibrium_index
equilibrium_index
2
sat
arrays-equilibrium_index-ff283d7f2eb793eb
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-ff283d7f2eb793eb # domain: arrays # variant: equilibrium_index # difficulty: hard You are given a 0-indexed integer array A of length 14. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ind...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 6, "input": {"array": [3, 5, 4, 9, 6, 7, 7, 6, 3, 4, 8, 2, 5, 6]}}]
solve_arrays_equilibrium_index
equilibrium_index
6
sat
arrays-monotonic_split-3cc2ea460d4bbc17
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-3cc2ea460d4bbc17 # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 12 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 11, "input": {"array": [1, 1, 1, 3, 3, 3, 4, 5, 5, 6, 8, 9], "threshold": 9}}]
solve_arrays_monotonic_split
monotonic_split
11
sat
arrays-equilibrium_index-d45f0617f126d82e
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-d45f0617f126d82e # domain: arrays # variant: equilibrium_index # difficulty: hard You are given a 0-indexed integer array A of length 11. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ind...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 5, "input": {"array": [7, 7, 2, 8, 9, 9, 5, 6, 9, 4, 9]}}]
solve_arrays_equilibrium_index
equilibrium_index
5
sat
arrays-monotonic_split-99744826f756ba4f
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-99744826f756ba4f # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 12 with 0 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 7, "input": {"array": [0, 0, 1, 3, 5, 5, 7, 9, 9, 9, 9, 9], "threshold": 9}}]
solve_arrays_monotonic_split
monotonic_split
7
sat
arrays-monotonic_split-2544d0466732da89
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-2544d0466732da89 # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 11 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 5, "input": {"array": [1, 2, 3, 3, 3, 4, 4, 5, 6, 7, 9], "threshold": 4}}]
solve_arrays_monotonic_split
monotonic_split
5
sat
arrays-monotonic_split-2280e407d4942a84
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-2280e407d4942a84 # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 12 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 5, "input": {"array": [2, 3, 3, 4, 6, 7, 7, 7, 9, 9, 9, 9], "threshold": 7}}]
solve_arrays_monotonic_split
monotonic_split
5
sat
arrays-equilibrium_index-c92873ee1519d1ba
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-c92873ee1519d1ba # domain: arrays # variant: equilibrium_index # difficulty: hard You are given a 0-indexed integer array A of length 12. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ind...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 7, "input": {"array": [5, 4, 6, 7, 2, 2, 1, 7, 7, 9, 5, 6]}}]
solve_arrays_equilibrium_index
equilibrium_index
7
sat
arrays-equilibrium_index-e0a70216cc771b4d
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-e0a70216cc771b4d # domain: arrays # variant: equilibrium_index # difficulty: hard You are given a 0-indexed integer array A of length 13. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ind...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 5, "input": {"array": [6, 2, 6, 5, 3, 7, 1, 5, 4, 4, 3, 2, 3]}}]
solve_arrays_equilibrium_index
equilibrium_index
5
sat
arrays-monotonic_split-f4872ecd0c88919e
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-f4872ecd0c88919e # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 10 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 2, "input": {"array": [1, 3, 4, 4, 6, 8, 9, 9, 9, 9], "threshold": 4}}]
solve_arrays_monotonic_split
monotonic_split
2
sat
arrays-monotonic_split-5969fed8db60de4c
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-5969fed8db60de4c # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 14 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 1, "input": {"array": [1, 3, 3, 4, 5, 7, 9, 9, 9, 9, 9, 9, 9, 9], "threshold": 3}}]
solve_arrays_monotonic_split
monotonic_split
1
sat
arrays-monotonic_split-f1fb23a19f251a75
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-f1fb23a19f251a75 # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 10 with 0 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 6, "input": {"array": [0, 1, 3, 4, 6, 7, 9, 9, 9, 9], "threshold": 9}}]
solve_arrays_monotonic_split
monotonic_split
6
sat
arrays-equilibrium_index-6ca4e7375128bdec
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-6ca4e7375128bdec # domain: arrays # variant: equilibrium_index # difficulty: hard You are given a 0-indexed integer array A of length 13. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ind...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 7, "input": {"array": [8, 8, 6, 2, 4, 9, 7, 3, 8, 9, 9, 9, 9]}}]
solve_arrays_equilibrium_index
equilibrium_index
7
sat
arrays-monotonic_split-d3a76130217daee5
arrays
hard
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-d3a76130217daee5 # domain: arrays # variant: monotonic_split # difficulty: hard You are given a 0-indexed non-decreasing integer array A of length 14 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A it...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 8, "input": {"array": [1, 3, 5, 6, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9], "threshold": 9}}]
solve_arrays_monotonic_split
monotonic_split
8
sat
arrays-monotonic_split-c777d4554acd8392
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-c777d4554acd8392 # domain: arrays # variant: monotonic_split # difficulty: extreme You are given a 0-indexed non-decreasing integer array A of length 15 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 6, "input": {"array": [2, 4, 6, 6, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9], "threshold": 9}}]
solve_arrays_monotonic_split
monotonic_split
6
sat
arrays-monotonic_split-df90c32312844e96
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-df90c32312844e96 # domain: arrays # variant: monotonic_split # difficulty: extreme You are given a 0-indexed non-decreasing integer array A of length 21 with 0 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 5, "input": {"array": [0, 2, 3, 3, 5, 6, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], "threshold": 6}}]
solve_arrays_monotonic_split
monotonic_split
5
sat
arrays-monotonic_split-9fb7019c937b1ab0
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-9fb7019c937b1ab0 # domain: arrays # variant: monotonic_split # difficulty: extreme You are given a 0-indexed non-decreasing integer array A of length 15 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 4, "input": {"array": [2, 4, 6, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], "threshold": 9}}]
solve_arrays_monotonic_split
monotonic_split
4
sat
arrays-monotonic_split-3eb9c250bd36cebc
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-3eb9c250bd36cebc # domain: arrays # variant: monotonic_split # difficulty: extreme You are given a 0-indexed non-decreasing integer array A of length 24 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 8, "input": {"array": [2, 3, 3, 5, 5, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], "threshold": 9}}]
solve_arrays_monotonic_split
monotonic_split
8
sat
arrays-monotonic_split-06fe2a5441d16699
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-06fe2a5441d16699 # domain: arrays # variant: monotonic_split # difficulty: extreme You are given a 0-indexed non-decreasing integer array A of length 19 with 0 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 3, "input": {"array": [0, 2, 2, 3, 4, 4, 5, 6, 6, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9], "threshold": 3}}]
solve_arrays_monotonic_split
monotonic_split
3
sat
arrays-equilibrium_index-1113d3dc978d43bc
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-1113d3dc978d43bc # domain: arrays # variant: equilibrium_index # difficulty: extreme You are given a 0-indexed integer array A of length 23. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 9, "input": {"array": [1, 3, 2, 6, 5, 8, 1, 4, 7, 9, 4, 3, 2, 1, 4, 2, 3, 3, 4, 3, 3, 1, 4]}}]
solve_arrays_equilibrium_index
equilibrium_index
9
sat
arrays-monotonic_split-6bccdc5744cf17c3
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-6bccdc5744cf17c3 # domain: arrays # variant: monotonic_split # difficulty: extreme You are given a 0-indexed non-decreasing integer array A of length 16 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 4, "input": {"array": [2, 4, 6, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9], "threshold": 8}}]
solve_arrays_monotonic_split
monotonic_split
4
sat
arrays-monotonic_split-3b05210bd69bcaa6
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-3b05210bd69bcaa6 # domain: arrays # variant: monotonic_split # difficulty: extreme You are given a 0-indexed non-decreasing integer array A of length 19 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 10, "input": {"array": [1, 3, 3, 3, 5, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9], "threshold": 9}}]
solve_arrays_monotonic_split
monotonic_split
10
sat
arrays-equilibrium_index-6eefb7375c4e8266
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-6eefb7375c4e8266 # domain: arrays # variant: equilibrium_index # difficulty: extreme You are given a 0-indexed integer array A of length 16. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 4, "input": {"array": [6, 3, 4, 6, 3, 2, 2, 1, 1, 3, 1, 2, 3, 2, 1, 1]}}]
solve_arrays_equilibrium_index
equilibrium_index
4
sat
arrays-equilibrium_index-8f0d6f1f8b1ff691
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-8f0d6f1f8b1ff691 # domain: arrays # variant: equilibrium_index # difficulty: extreme You are given a 0-indexed integer array A of length 21. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 7, "input": {"array": [4, 7, 7, 5, 7, 2, 1, 6, 2, 5, 2, 3, 4, 3, 2, 2, 2, 1, 1, 3, 3]}}]
solve_arrays_equilibrium_index
equilibrium_index
7
sat
arrays-equilibrium_index-f4847eabe416e5db
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-f4847eabe416e5db # domain: arrays # variant: equilibrium_index # difficulty: extreme You are given a 0-indexed integer array A of length 16. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 3, "input": {"array": [9, 2, 8, 8, 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 2]}}]
solve_arrays_equilibrium_index
equilibrium_index
3
sat
arrays-equilibrium_index-baaf5d4886802bcf
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-baaf5d4886802bcf # domain: arrays # variant: equilibrium_index # difficulty: extreme You are given a 0-indexed integer array A of length 19. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 3, "input": {"array": [3, 6, 6, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}}]
solve_arrays_equilibrium_index
equilibrium_index
3
sat
arrays-monotonic_split-6d182a6e1e8bb38a
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-6d182a6e1e8bb38a # domain: arrays # variant: monotonic_split # difficulty: extreme You are given a 0-indexed non-decreasing integer array A of length 15 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 8, "input": {"array": [1, 1, 3, 3, 5, 6, 7, 8, 9, 9, 9, 9, 9, 9, 9], "threshold": 9}}]
solve_arrays_monotonic_split
monotonic_split
8
sat
arrays-equilibrium_index-f49f4a16245ca727
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-f49f4a16245ca727 # domain: arrays # variant: equilibrium_index # difficulty: extreme You are given a 0-indexed integer array A of length 21. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 7, "input": {"array": [2, 1, 8, 2, 4, 2, 8, 1, 2, 2, 1, 1, 1, 2, 1, 3, 3, 3, 2, 3, 3]}}]
solve_arrays_equilibrium_index
equilibrium_index
7
sat
arrays-equilibrium_index-52e1c7927db90b2c
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-52e1c7927db90b2c # domain: arrays # variant: equilibrium_index # difficulty: extreme You are given a 0-indexed integer array A of length 24. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 7, "input": {"array": [4, 6, 7, 7, 6, 1, 6, 6, 1, 3, 2, 2, 3, 2, 4, 1, 2, 3, 1, 2, 3, 2, 2, 4]}}]
solve_arrays_equilibrium_index
equilibrium_index
7
sat
arrays-monotonic_split-12d78280b716c643
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-12d78280b716c643 # domain: arrays # variant: monotonic_split # difficulty: extreme You are given a 0-indexed non-decreasing integer array A of length 24 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 6, "input": {"array": [1, 3, 4, 6, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], "threshold": 9}}]
solve_arrays_monotonic_split
monotonic_split
6
sat
arrays-equilibrium_index-858735848919498b
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-858735848919498b # domain: arrays # variant: equilibrium_index # difficulty: extreme You are given a 0-indexed integer array A of length 18. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 4, "input": {"array": [6, 1, 7, 5, 1, 2, 1, 3, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1]}}]
solve_arrays_equilibrium_index
equilibrium_index
4
sat
arrays-equilibrium_index-a2fe3e3b0a2a0c97
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-a2fe3e3b0a2a0c97 # domain: arrays # variant: equilibrium_index # difficulty: extreme You are given a 0-indexed integer array A of length 21. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 6, "input": {"array": [2, 6, 9, 4, 8, 9, 3, 2, 1, 3, 3, 2, 1, 5, 3, 5, 2, 3, 3, 3, 2]}}]
solve_arrays_equilibrium_index
equilibrium_index
6
sat
arrays-equilibrium_index-d86846a4332ee097
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-d86846a4332ee097 # domain: arrays # variant: equilibrium_index # difficulty: extreme You are given a 0-indexed integer array A of length 19. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 9, "input": {"array": [9, 4, 1, 3, 6, 9, 6, 9, 9, 5, 9, 5, 4, 9, 7, 5, 4, 7, 6]}}]
solve_arrays_equilibrium_index
equilibrium_index
9
sat
arrays-monotonic_split-4bcce6f584f0cc4f
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-4bcce6f584f0cc4f # domain: arrays # variant: monotonic_split # difficulty: extreme You are given a 0-indexed non-decreasing integer array A of length 17 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 5, "input": {"array": [2, 2, 4, 5, 6, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], "threshold": 8}}]
solve_arrays_monotonic_split
monotonic_split
5
sat
arrays-equilibrium_index-d1cdbb0150804b26
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-d1cdbb0150804b26 # domain: arrays # variant: equilibrium_index # difficulty: extreme You are given a 0-indexed integer array A of length 20. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 5, "input": {"array": [6, 7, 9, 5, 1, 8, 5, 3, 1, 1, 1, 2, 3, 1, 2, 2, 4, 1, 1, 1]}}]
solve_arrays_equilibrium_index
equilibrium_index
5
sat
arrays-monotonic_split-f12c85dd99d5f318
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-f12c85dd99d5f318 # domain: arrays # variant: monotonic_split # difficulty: extreme You are given a 0-indexed non-decreasing integer array A of length 17 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 5, "input": {"array": [1, 2, 3, 3, 4, 5, 5, 5, 7, 8, 9, 9, 9, 9, 9, 9, 9], "threshold": 5}}]
solve_arrays_monotonic_split
monotonic_split
5
sat
arrays-equilibrium_index-79342dd7ca953ba8
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-equilibrium_index-79342dd7ca953ba8 # domain: arrays # variant: equilibrium_index # difficulty: extreme You are given a 0-indexed integer array A of length 15. Every element is a strictly positive integer with 1 <= A[i] <= 9. An index i is an equilibrium ...
import json import sys data = json.load(sys.stdin) array = data["array"] total = sum(array) prefix = 0 answer = -1 for index, value in enumerate(array): suffix = total - prefix - value if prefix == suffix: answer = index break prefix += value print(answer)
[{"expected_output": 4, "input": {"array": [2, 1, 3, 7, 6, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1]}}]
solve_arrays_equilibrium_index
equilibrium_index
4
sat
arrays-monotonic_split-a3471f77dd6a4794
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-a3471f77dd6a4794 # domain: arrays # variant: monotonic_split # difficulty: extreme You are given a 0-indexed non-decreasing integer array A of length 16 with 2 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 5, "input": {"array": [2, 2, 4, 4, 6, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9], "threshold": 8}}]
solve_arrays_monotonic_split
monotonic_split
5
sat
arrays-monotonic_split-df9dba154b9caec2
arrays
extreme
You are an expert competitive programmer. # problem_id: arrays-monotonic_split-df9dba154b9caec2 # domain: arrays # variant: monotonic_split # difficulty: extreme You are given a 0-indexed non-decreasing integer array A of length 18 with 1 <= A[i] <= 9, together with an integer threshold T drawn from the elements of A...
import json import sys data = json.load(sys.stdin) array = data["array"] threshold = data["threshold"] answer = -1 for index, value in enumerate(array): if value >= threshold: answer = index break print(answer)
[{"expected_output": 12, "input": {"array": [1, 2, 2, 3, 4, 4, 4, 6, 6, 8, 8, 8, 9, 9, 9, 9, 9, 9], "threshold": 9}}]
solve_arrays_monotonic_split
monotonic_split
12
sat