Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
7
26
split
stringclasses
1 value
source
stringclasses
2 values
revision
stringclasses
2 values
difficulty
stringclasses
2 values
stratum
stringclasses
4 values
subset
stringclasses
7 values
question
stringlengths
48
5.08k
prompt
stringlengths
304
5.25k
mode
stringclasses
2 values
test
stringlengths
183
6.05k
⌀
signatures
stringlengths
10
81
⌀
seed_ids
stringlengths
4
37
⌀
url
stringlengths
38
49
⌀
inputs
listlengths
5
56
⌀
outputs
listlengths
5
56
⌀
source_test_count
int64
5
610
⌀
screen_passes
int64
0
3
screen_rollouts
int64
3
3
kod:Filter_27911_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
easy
KodCode easy
Filter
Given an array A with n elements, where n is a positive integer and A is non-empty, perform a function to reverse the order of the array such that the last element becomes the first element and vice versa. The function should have a time complexity of O(n) and use only a constant amount of extra space. You are not allo...
Given an array A with n elements, where n is a positive integer and A is non-empty, perform a function to reverse the order of the array such that the last element becomes the first element and vice versa. The function should have a time complexity of O(n) and use only a constant amount of extra space. You are not allo...
pytest
from solution import reverse_array def test_reverse_even_length_array(): assert reverse_array([1, 2, 3, 4]) == [4, 3, 2, 1] def test_reverse_odd_length_array(): assert reverse_array([1, 2, 3]) == [3, 2, 1] def test_reverse_single_element_array(): assert reverse_array([1]) == [1] def test_reverse_empty_a...
def reverse_array(A):
['Qwen2-72B-Instruct_66946']
null
null
null
null
1
3
kod:Filter_20541_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
medium
KodCode medium
Filter
I have two lists of different lengths that contain dialogue from different characters. I want to create a conversation between two characters, taking one message from the first character, then one from the second character, etc. Here is an example of my lists: List A: ['msg1', 'msg2', 'msg3', 'msg4'] List B: ['respo...
I have two lists of different lengths that contain dialogue from different characters. I want to create a conversation between two characters, taking one message from the first character, then one from the second character, etc. Here is an example of my lists: List A: ['msg1', 'msg2', 'msg3', 'msg4'] List B: ['respo...
pytest
from solution import create_conversation def test_different_lengths_a_longer(): list_a = ['msg1', 'msg2', 'msg3', 'msg4'] list_b = ['response1', 'response2'] expected = ['msg1', 'response1', 'msg2', 'response2', 'msg3', 'response1', 'msg4', 'response2'] assert create_conversation(list_a, list_b) == exp...
def create_conversation(list_a, list_b):
['Llama-3.3-70B-Instruct_51607']
null
null
null
null
0
3
kod:Evol_28_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
easy
KodCode easy
Evol
You are given a list of integers. The task is to re-arrange the list so that all negative integers appear before all positive integers, while maintaining the relative order of the negative integers and positive integers. The function should not return a new list, but rather modify the original list in-place. For insta...
You are given a list of integers. The task is to re-arrange the list so that all negative integers appear before all positive integers, while maintaining the relative order of the negative integers and positive integers. The function should not return a new list, but rather modify the original list in-place. For insta...
pytest
from solution import rearrange_list def test_rearrange_mixed_list(): nums = [1, -2, 3, -4, 5] rearrange_list(nums) assert nums == [-2, -4, 1, 3, 5] def test_rearrange_mixed_list_with_pos_start(): nums = [-1, 2, -3, 4, -5] rearrange_list(nums) assert nums == [-1, -3, -5, 2, 4] def test_rearran...
def rearrange_list(nums):
[28078]
null
null
null
null
2
3
taco:13983
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
medium
TACO medium
codeforces
The Cereal Guy's friend Serial Guy likes to watch soap operas. An episode is about to start, and he hasn't washed his plate yet. But he decided to at least put in under the tap to be filled with water. The plate can be represented by a parallelepiped k × n × m, that is, it has k layers (the first layer is the upper one...
The Cereal Guy's friend Serial Guy likes to watch soap operas. An episode is about to start, and he hasn't washed his plate yet. But he decided to at least put in under the tap to be filled with water. The plate can be represented by a parallelepiped k × n × m, that is, it has k layers (the first layer is the upper one...
stdio
null
null
null
https://codeforces.com/problemset/problem/60/B
[ "4 10 10\n\n..........\n..........\n..........\n..........\n..........\n..........\n..........\n..........\n..........\n..........\n\n..........\n..........\n..........\n..........\n..........\n..........\n..........\n..........\n..........\n..........\n\n..........\n..........\n..........\n..........\n..........\n...
[ "400", "1", "45", "12\n", "88\n", "3\n", "22\n", "52", "138\n", "1", "5\n", "12\n", "46\n", "3\n", "102\n", "2\n", "10\n", "2\n", "7", "69\n", "22", "40\n", "52\n", "102", "11\n", "2", "64", "13", "52\n", "138\n", "132\n", "2\n" ]
79
0
3
taco:1271
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
medium
TACO medium
codeforces
A new agent called Killjoy invented a virus COVID-2069 that infects accounts on Codeforces. Each account has a rating, described by an integer (it can possibly be negative or very large). Killjoy's account is already infected and has a rating equal to $x$. Its rating is constant. There are $n$ accounts except hers, nu...
A new agent called Killjoy invented a virus COVID-2069 that infects accounts on Codeforces. Each account has a rating, described by an integer (it can possibly be negative or very large). Killjoy's account is already infected and has a rating equal to $x$. Its rating is constant. There are $n$ accounts except hers, nu...
stdio
null
null
null
https://codeforces.com/problemset/problem/1419/C
[ "7\n2 7\n7 1313\n2 14\n8 1211\n2 9\n12 121\n2 121\n121 312\n2 121\n136 121\n2 7\n1313 7\n2 8\n1211 8\n", "1\n2 2\n0 5\n", "1\n4 4\n1 6 6 3\n", "1\n2 1\n-10 13\n", "7\n2 7\n7 1313\n2 8\n8 1211\n2 9\n7 121\n2 121\n121 194\n2 164\n136 121\n2 7\n1313 7\n2 8\n1211 8\n", "1\n3 3\n4 2 3\n", "1\n4 2\n3 1 6 4\n"...
[ "1\n2\n2\n1\n1\n1\n1\n", "2\n", "1\n", "2\n", "1\n1\n2\n1\n2\n1\n1\n", "1\n", "2\n", "2\n", "1\n1\n2\n", "2\n", "1\n1\n2\n1\n2\n1\n1\n", "2\n", "2\n", "2\n", "2\n", "2\n", "1\n", "2\n", "2\n", "2\n", "1\n", "2\n", "1\n", "2\n", "2\n", "2\n", "1\n", "2\n", "2\n...
92
0
3
taco:8501
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
easy
TACO easy
codeforces
Little Petya has recently started attending a programming club. Naturally he is facing the problem of choosing a programming language. After long considerations he realized that Java is the best choice. The main argument in favor of choosing Java was that it has a very large integer data type, called BigInteger. But h...
Little Petya has recently started attending a programming club. Naturally he is facing the problem of choosing a programming language. After long considerations he realized that Java is the best choice. The main argument in favor of choosing Java was that it has a very large integer data type, called BigInteger. But h...
stdio
null
null
null
https://codeforces.com/problemset/problem/66/A
[ "12072227477033521539223864717325060685037419371627121978628725402833000469222026574680655957148434814\n", "6\n", "77837648000267655128696184548375437861\n", "2359707308\n", "2334083498248924849764007740114454487565621932425948046430072197452845278935316358800789014185793377\n", "7060\n", "9223372036854...
[ "BigInteger\n", "byte\n", "BigInteger\n", "long\n", "BigInteger\n", "short\n", "long\n", "BigInteger\n", "BigInteger\n", "BigInteger\n", "BigInteger\n", "BigInteger\n", "short\n", "long\n", "long\n", "BigInteger\n", "long\n", "long\n", "long\n", "BigInteger\n", "BigInteger\n"...
190
1
3
taco:16472
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
easy
TACO easy
codeforces
Ted has a pineapple. This pineapple is able to bark like a bulldog! At time t (in seconds) it barks for the first time. Then every s seconds after it, it barks twice with 1 second interval. Thus it barks at times t, t + s, t + s + 1, t + 2s, t + 2s + 1, etc. [Image] Barney woke up in the morning and wants to eat th...
Ted has a pineapple. This pineapple is able to bark like a bulldog! At time t (in seconds) it barks for the first time. Then every s seconds after it, it barks twice with 1 second interval. Thus it barks at times t, t + s, t + s + 1, t + 2s, t + 2s + 1, etc. [Image] Barney woke up in the morning and wants to eat th...
stdio
null
null
null
https://codeforces.com/problemset/problem/697/A
[ "178769979 103031711 761562532\n", "0 2 1\n", "3 743604 201724\n", "0 2 4\n", "29318 787017 581601530\n", "5 5 13\n", "0 79 4000\n", "50 64536 243790224\n", "0 7 0\n", "54 8901282 197366117\n", "11 2 0\n", "8897216 734348516 783259913\n", "60686899 78474 60704617\n", "456947336 740144 45\n...
[ "NO\n", "NO\n", "NO\n", "YES\n", "NO\n", "NO\n", "NO\n", "NO\n", "YES\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "YES\n", "YES\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "YES\n", "NO\n", "NO\n", "YES\n", "NO\n", "YES\n", ...
278
1
3
taco:1307
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
medium
TACO medium
atcoder
You have N cards. On the i-th card, an integer A_i is written. For each j = 1, 2, ..., M in this order, you will perform the following operation once: Operation: Choose at most B_j cards (possibly zero). Replace the integer written on each chosen card with C_j. Find the maximum possible sum of the integers written on t...
You have N cards. On the i-th card, an integer A_i is written. For each j = 1, 2, ..., M in this order, you will perform the following operation once: Operation: Choose at most B_j cards (possibly zero). Replace the integer written on each chosen card with C_j. Find the maximum possible sum of the integers written on t...
stdio
null
null
null
https://atcoder.jp/contests/abc127/tasks/abc127_d
[ "11 3\n1 1 1 1 1 1 1 1 1 1 1\n3 1000000000\n4 1000000000\n3 1000000000\n", "3 2\n5 1 1\n2 0\n2 0", "10 3\n1 8 2 7 100 4 52 33 13 5\n3 10\n4 30\n1 4", "10 2\n0 8 5 7 100 4 7 33 24 5\n3 10\n4 30\n1 4", "11 1\n-1 1 2 2 1 1 1 0 1 1 1\n3 1000000000\n4 0010101010\n3 1000001001", "3 2\n8 1 1\n0 3\n2 6", "10 1\...
[ "10000000001\n", "7\n", "338\n", "307\n", "3000000010\n", "20\n", "235\n", "7000000007\n", "1000000010\n", "10300043031\n", "333\n", "10000000001", "300\n", "306\n", "14\n", "10300043431\n", "13\n", "16\n", "18\n", "361\n", "367\n", "10300003001\n", "338", "201\n", "3...
108
2
3
taco:728
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
medium
TACO medium
codeforces
The busses in Berland are equipped with a video surveillance system. The system records information about changes in the number of passengers in a bus after stops. If $x$ is the number of passengers in a bus just before the current bus stop and $y$ is the number of passengers in the bus just after current bus stop, th...
The busses in Berland are equipped with a video surveillance system. The system records information about changes in the number of passengers in a bus after stops. If $x$ is the number of passengers in a bus just before the current bus stop and $y$ is the number of passengers in the bus just after current bus stop, th...
stdio
null
null
null
https://codeforces.com/problemset/problem/978/E
[ "102 1\n1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1\n", "2 4\n0 1\n", "8 7\n-5 1 -3 1 -2 9 0 -6\n", "3 0\n-2 -1 0\n", "102 1\n1 1 1 1 1 1 1 0 1 1 1 ...
[ "0\n", "4\n", "0\n", "0\n", "0\n", "3\n", "0\n", "0\n", "0\n", "0\n", "0\n", "0\n", "0\n", "10\n", "0\n", "0\n", "0\n", "13\n", "0\n", "0\n", "1\n", "8\n", "0\n", "6\n", "3\n", "9\n", "0\n", "0\n", "4\n", "999010101\n", "999000101\n", "999000001\n" ]
136
3
3
taco:9578
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
easy
TACO easy
codeforces
Petya loves football very much. One day, as he was watching a football match, he was writing the players' current positions on a piece of paper. To simplify the situation he depicted it as a string consisting of zeroes and ones. A zero corresponds to players of one team; a one corresponds to players of another team. If...
Petya loves football very much. One day, as he was watching a football match, he was writing the players' current positions on a piece of paper. To simplify the situation he depicted it as a string consisting of zeroes and ones. A zero corresponds to players of one team; a one corresponds to players of another team. If...
stdio
null
null
null
https://codeforces.com/problemset/problem/96/A
[ "1000010010100000100010000100001000010000000011000010000100001000010000100001000010000100001000010000\n", "1\n", "10000010100000001000110001010100001001001010011\n", "10100101000\n", "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001\n", "10010001\n", "...
[ "YES\n", "NO\n", "YES\n", "NO\n", "YES\n", "NO\n", "YES\n", "YES\n", "YES\n", "NO\n", "NO\n", "YES\n", "YES\n", "NO\n", "YES\n", "YES\n", "NO\n", "YES\n", "NO\n", "YES\n", "NO\n", "YES\n", "NO\n", "NO\n", "NO\n", "YES\n", "NO\n", "NO\n", "YES\n", "NO\n", "...
138
1
3
kod:Filter_6476_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
easy
KodCode easy
Filter
I am trying to generate a program that chooses the best path between two nodes in a weighted graph. The path with the lowest cost is preferred. The path with the least amount of edges is preferred in case of a tie. Here is the code I have so far: ```python from heapq import heappop, heappush def shortest_path(graph,...
I am trying to generate a program that chooses the best path between two nodes in a weighted graph. The path with the lowest cost is preferred. The path with the least amount of edges is preferred in case of a tie. Here is the code I have so far: ```python from heapq import heappop, heappush def shortest_path(graph,...
pytest
from solution import shortest_path def test_direct_path(): graph = { 'A': {'B': 1}, 'B': {} } assert shortest_path(graph, 'A', 'B') == (['A', 'B'], 1) def test_no_path(): graph = { 'A': {'B': 1}, 'B': {}, 'C': {'D': 1} } assert shortest_path(graph, 'A', ...
def shortest_path(graph, start, end):
['Llama-3.3-70B-Instruct_19005']
null
null
null
null
2
3
taco:13769
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
medium
TACO medium
codeforces
A substring of some string is called the most frequent, if the number of its occurrences is not less than number of occurrences of any other substring. You are given a set of strings. A string (not necessarily from this set) is called good if all elements of the set are the most frequent substrings of this string. Res...
A substring of some string is called the most frequent, if the number of its occurrences is not less than number of occurrences of any other substring. You are given a set of strings. A string (not necessarily from this set) is called good if all elements of the set are the most frequent substrings of this string. Res...
stdio
null
null
null
https://codeforces.com/problemset/problem/886/D
[ "76\namnctposz\nmnctpos\nos\nu\ne\nam\namnc\neamnctpo\nl\nx\nq\nposzq\neamnc\nctposzq\nctpos\nmnc\ntpos\namnctposzql\ntposzq\nmnctposz\nnctpos\nctposzql\namnctpos\nmnct\np\nux\nposzql\ntpo\nmnctposzql\nmnctp\neamnctpos\namnct\ntposzql\nposz\nz\nct\namnctpo\noszq\neamnct\ntposz\ns\nmn\nn\nc\noszql\npo\no\nmnctposzq\...
[ "eamnctposzqlux\n", "z\n", "azycxd\n", "azb\n", "NO\n", "NO\n", "NO\n", "ijngvul\n", "agbcenmzswtyofdvuihjklpqr\n", "ab\n", "NO\n", "osrpxebqtvylckdzajfmiwnh\n", "NO\n", "y\n", "NO\n", "NO\n", "ba\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "NO\n", "nmolpkqjrishtgufvewd...
127
0
3
taco:3691
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
easy
TACO easy
codeforces
There are $n$ products in the shop. The price of the $i$-th product is $a_i$. The owner of the shop wants to equalize the prices of all products. However, he wants to change prices smoothly. In fact, the owner of the shop can change the price of some product $i$ in such a way that the difference between the old price ...
There are $n$ products in the shop. The price of the $i$-th product is $a_i$. The owner of the shop wants to equalize the prices of all products. However, he wants to change prices smoothly. In fact, the owner of the shop can change the price of some product $i$ in such a way that the difference between the old price ...
stdio
null
null
null
https://codeforces.com/problemset/problem/1183/B
[ "5\n8 19551489\n31131899 17585660 3913937 14521321 9846714 96097161 115568124 35051437\n1 93900441\n15578410\n7 19560555\n124492495 53703939 20259503 99698023 98868060 83313210 5487534\n6 72321938\n59271765 72426489 16625497 51598082 31475864 20946400\n7 44965081\n49955408 62397026 39981552 92586939 6608008 4905754...
[ "-1\n109478851\n-1\n88947435\n-1\n", "7\n", "2\n-1\n3\n5\n", "-1\n", "-1\n71294553\n-1\n88947435\n-1\n", "10\n", "200000001\n", "-1\n87869846\n-1\n88947435\n-1\n", "-1\n71294553\n-1\n88947435\n-1\n", "12\n", "-1\n71294553\n-1\n88947435\n-1\n", "10\n", "200000000\n", "-1\n", "2\n-1\n3\n5\...
100
1
3
taco:23737
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
medium
TACO medium
codeforces
You got a box with a combination lock. The lock has a display showing n digits. There are two buttons on the box, each button changes digits on the display. You have quickly discovered that the first button adds 1 to all the digits (all digits 9 become digits 0), and the second button shifts all the digits on the displ...
You got a box with a combination lock. The lock has a display showing n digits. There are two buttons on the box, each button changes digits on the display. You have quickly discovered that the first button adds 1 to all the digits (all digits 9 become digits 0), and the second button shifts all the digits on the displ...
stdio
null
null
null
https://codeforces.com/problemset/problem/496/B
[ "200\n79025531557298703099245700860027432585447902553155729870309924570086002743258544790255315572987030992457008600274325854479025531557298703099245700860027432585447902553155729870309924570086002743258544\n", "1\n2\n", "10\n2462472964\n", "5\n40833\n", "100\n27507429205065137288221591899502928816482588529...
[ "00274325854479025531557298703099245700860027432585447902553155729870309924570086002743258544790255315572987030992457008600274325854479025531557298703099245700860027432585447902553155729870309924570086\n", "0", "0240250742", "00175", "0025296467638071109716496318194954026177110480788491817705371477418866028...
120
0
3
kod:Filter_63972_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
easy
KodCode easy
Filter
Can you provide a Python implementation of the bubble sort algorithm?
Can you provide a Python implementation of the bubble sort algorithm? Implement the required callable(s) in Python 3. Preserve the requested names and signatures. Provide the complete contents of solution.py in one fenced Python code block. Use only the standard library. Required callable signatures: def bubble_sort(...
pytest
# File: test_solution.py from solution import bubble_sort def test_bubble_sort_empty(): assert bubble_sort([]) == [] def test_bubble_sort_single_element(): assert bubble_sort([1]) == [1] def test_bubble_sort_already_sorted(): assert bubble_sort([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5] def test_bubble_sort_r...
def bubble_sort(arr):
['Qwen2.5-Coder-32B-Instruct_129437']
null
null
null
null
3
3
taco:9497
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
easy
TACO easy
codeforces
Tanya is learning how to add numbers, but so far she is not doing it correctly. She is adding two numbers $a$ and $b$ using the following algorithm: If one of the numbers is shorter than the other, Tanya adds leading zeros so that the numbers are the same length. The numbers are processed from right to left (that is,...
Tanya is learning how to add numbers, but so far she is not doing it correctly. She is adding two numbers $a$ and $b$ using the following algorithm: If one of the numbers is shorter than the other, Tanya adds leading zeros so that the numbers are the same length. The numbers are processed from right to left (that is,...
stdio
null
null
null
https://codeforces.com/problemset/problem/1619/C
[ "6\n17236 1106911\n1 5\n108 112\n12345 1023412\n1 11\n1 20\n", "1\n8 13\n", "1\n4 2594\n", "1\n13 716\n", "1\n28 1548\n", "1\n4 948\n", "1\n2 2818\n", "1\n13 3886\n", "1\n4 613\n", "1\n3 333\n", "1\n22 26724\n", "1\n10 988\n", "1\n2 287\n", "1\n35 19714\n", "1\n9 1619\n", "1\n34 1068\n...
[ "3465\n4\n-1\n90007\n10\n-1\n", "5\n", "2590\n", "703\n", "1520\n", "944\n", "2816\n", "3873\n", "69\n", "330\n", "26702\n", "978\n", "285\n", "1949\n", "1610\n", "1034\n", "326\n", "2180\n", "67\n", "-1\n", "155\n", "1715\n", "337\n", "169\n", "2286\n", "1804\n", ...
206
0
3
taco:803
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
easy
TACO easy
codeforces
You are given three strings $a$, $b$ and $c$ of the same length $n$. The strings consist of lowercase English letters only. The $i$-th letter of $a$ is $a_i$, the $i$-th letter of $b$ is $b_i$, the $i$-th letter of $c$ is $c_i$. For every $i$ ($1 \leq i \leq n$) you must swap (i.e. exchange) $c_i$ with either $a_i$ or...
You are given three strings $a$, $b$ and $c$ of the same length $n$. The strings consist of lowercase English letters only. The $i$-th letter of $a$ is $a_i$, the $i$-th letter of $b$ is $b_i$, the $i$-th letter of $c$ is $c_i$. For every $i$ ($1 \leq i \leq n$) you must swap (i.e. exchange) $c_i$ with either $a_i$ or...
stdio
null
null
null
https://codeforces.com/problemset/problem/1301/A
[ "4\naa`\nbbb\nbcc\nabc\nbca\ncca\naabb\nbcaa\nbaba\niim\nmii\niim\n", "1\nab\nab\nbb\n", "4\naa`\nbbb\nbcc\ncba\nbca\ncca\nbbaa\nbcaa\nbaba\niim\nmii\nijm\n", "1\nba\nbb\nbe\n", "4\na`a\ncac\ncac\ncba\ndaa\ncab\nbaab\nadab\nbbaa\nhim\nhim\njmi\n", "1\nba\nca\nda\n", "1\nca\ndb\nbe\n", "4\naa`\nbbc\nca...
[ "NO\nNO\nYES\nYES\n", "NO\n", "NO\nYES\nNO\nNO\n", "NO\n", "YES\nNO\nNO\nNO\n", "NO\n", "NO\n", "NO\nYES\nNO\nNO\n", "YES\nNO\nNO\nNO\n", "NO\n", "YES\nNO\nNO\nNO\n", "YES\nNO\nNO\nNO\n", "NO\n", "YES\nNO\nNO\nNO\n", "NO\n", "NO\nYES\nYES\nNO\n", "NO\n", "YES\nNO\nNO\nNO\n", "NO\...
96
2
3
taco:19611
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
medium
TACO medium
atcoder
We have N bricks arranged in a row from left to right. The i-th brick from the left (1 \leq i \leq N) has an integer a_i written on it. Among them, you can break at most N-1 bricks of your choice. Let us say there are K bricks remaining. Snuke will be satisfied if, for each integer i (1 \leq i \leq K), the i-th of thos...
We have N bricks arranged in a row from left to right. The i-th brick from the left (1 \leq i \leq N) has an integer a_i written on it. Among them, you can break at most N-1 bricks of your choice. Let us say there are K bricks remaining. Snuke will be satisfied if, for each integer i (1 \leq i \leq K), the i-th of thos...
stdio
null
null
null
https://atcoder.jp/contests/abc148/tasks/abc148_d
[ "10\n3 1 10 1 20 2 2 3 -1 6", "1\n1", "3\n0 4 -7", "3\n1 1 3", "10\n3 1 9 1 20 0 2 1 -1 6", "1\n-5", "3\n0 1 -1", "3\n2 -1 -2", "10\n3 1 4 1 5 17 2 6 4 3", "3\n4 0 3", "3\n4 -1 0", "10\n3 1 10 1 20 2 2 3 0 3", "3\n4 0 0", "10\n4 1 4 1 10 31 1 11 0 3", "1\n10", "3\n2 2 2", "1\n2", "...
[ "7\n", "0", "-1\n", "2\n", "8\n", "-1\n", "2\n", "-1\n", "7\n", "-1\n", "-1\n", "7\n", "-1\n", "9\n", "-1\n", "-1", "-1\n", "-1\n", "7\n", "7\n", "7", "7\n", "-1\n", "-1\n", "9\n", "2\n", "-1\n", "-1\n", "-1\n", "9\n", "-1\n", "-1\n" ]
108
1
3
taco:5042
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
easy
TACO easy
codeforces
You are given an array $a_1, a_2, \dots, a_n$ consisting of $n$ distinct integers. Count the number of pairs of indices $(i, j)$ such that $i < j$ and $a_i \cdot a_j = i + j$. -----Input----- The first line contains one integer $t$ ($1 \leq t \leq 10^4$) — the number of test cases. Then $t$ cases follow. The first ...
You are given an array $a_1, a_2, \dots, a_n$ consisting of $n$ distinct integers. Count the number of pairs of indices $(i, j)$ such that $i < j$ and $a_i \cdot a_j = i + j$. -----Input----- The first line contains one integer $t$ ($1 \leq t \leq 10^4$) — the number of test cases. Then $t$ cases follow. The first ...
stdio
null
null
null
https://codeforces.com/problemset/problem/1541/B
[ "3\n2\n2 1\n3\n3 1 5\n5\n3 1 4 10 2\n", "3\n2\n3 1\n3\n6 1 5\n5\n3 1 5 9 2\n", "3\n2\n3 1\n3\n6 2 5\n5\n3 1 4 7 2\n", "3\n2\n3 1\n3\n4 2 5\n5\n3 1 4 7 2\n", "3\n2\n3 2\n3\n2 1 5\n5\n3 1 8 5 2\n", "3\n2\n3 2\n3\n3 1 5\n5\n3 2 7 9 6\n", "3\n2\n3 1\n3\n6 1 5\n5\n3 1 5 8 2\n", "3\n2\n3 1\n3\n3 2 5\n5\n6 1...
[ "0\n2\n3\n", "1\n1\n3\n", "1\n0\n3\n", "1\n0\n3\n", "0\n1\n2\n", "0\n2\n0\n", "1\n1\n3\n", "1\n0\n1\n", "1\n1\n1\n", "0\n1\n2\n", "1\n1\n2\n", "0\n1\n1\n", "1\n1\n3\n", "0\n1\n1\n", "0\n1\n1\n", "1\n1\n3\n", "1\n2\n3\n", "0\n0\n2\n", "0\n1\n1\n", "0\n0\n3\n", "1\n1\n2\n", "...
102
2
3
taco:6556
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
easy
TACO easy
codeforces
You are given a board of size $n \times n$, where $n$ is odd (not divisible by $2$). Initially, each cell of the board contains one figure. In one move, you can select exactly one figure presented in some cell and move it to one of the cells sharing a side or a corner with the current cell, i.e. from the cell $(i, j)$...
You are given a board of size $n \times n$, where $n$ is odd (not divisible by $2$). Initially, each cell of the board contains one figure. In one move, you can select exactly one figure presented in some cell and move it to one of the cells sharing a side or a corner with the current cell, i.e. from the cell $(i, j)$...
stdio
null
null
null
https://codeforces.com/problemset/problem/1353/C
[ "3\n11\n7017\n9273\n", "1\n2119\n", "3\n5\n1563\n5103\n", "1\n145901\n", "3\n7\n4885\n9509\n", "1\n104401\n", "3\n3\n131\n9783\n", "3\n11\n2869\n5405\n", "1\n124495\n", "3\n7\n3005\n3005\n", "3\n3\n5907\n3005\n", "3\n3\n3005\n3005\n", "1\n22411\n", "3\n1\n5\n499993\n", "3\n11\n7511\n2775...
[ "440\n115168355632\n265790540048\n", "3171549680\n", "40\n1272786328\n44295074208\n", "1035269813240600\n", "112\n38857283080\n286604683240\n", "379308627429600\n", "8\n749320\n312100813968\n", "440\n7871732680\n52633933240\n", "643182876820960\n", "112\n9045074040\n9045074040\n", "8\n6870362391...
109
0
3
kod:Filter_7675_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
easy
KodCode easy
Filter
I'm looking for a simple implementation of a binary search algorithm in Python. Do you have one you can share?
I'm looking for a simple implementation of a binary search algorithm in Python. Do you have one you can share? Implement the required callable(s) in Python 3. Preserve the requested names and signatures. Provide the complete contents of solution.py in one fenced Python code block. Use only the standard library. Requi...
pytest
from solution import binary_search def test_target_found(): assert binary_search([1, 2, 3, 4, 5], 3) == 2 def test_target_not_found(): assert binary_search([1, 2, 3, 4, 5], 6) == -1 def test_empty_array(): assert binary_search([], 3) == -1 def test_single_element_array_found(): assert binary_search(...
def binary_search(arr, target):
['Llama-3.3-70B-Instruct_21700']
null
null
null
null
3
3
taco:13954
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
easy
TACO easy
codeforces
You are given a string $s$ consisting only of characters + and -. You perform some process with this string. This process can be described by the following pseudocode: res = 0 for init = 0 to inf cur = init ok = true for i = 1 to |s| res = res + 1 if s[i] == '+' cur = cur ...
You are given a string $s$ consisting only of characters + and -. You perform some process with this string. This process can be described by the following pseudocode: res = 0 for init = 0 to inf cur = init ok = true for i = 1 to |s| res = res + 1 if s[i] == '+' cur = cur ...
stdio
null
null
null
https://codeforces.com/problemset/problem/1373/C
[ "15\n-\n--\n+\n-+\n-\n+\n-\n+\n-\n-+\n+-\n-+\n-+\n+-\n+-\n", "3\n--+-\n---\n++--+-\n", "15\n-\n--\n+\n+-\n-\n+\n-\n+\n-\n+-\n-+\n-+\n-+\n+-\n+-\n", "3\n+---\n---\n--+++-\n", "15\n-\n--\n+\n+-\n-\n+\n-\n+\n-\n-+\n-+\n+-\n+-\n-+\n-+\n", "3\n--+-\n---\n-+-+-+\n", "15\n-\n--\n+\n-+\n-\n+\n-\n+\n-\n+-\n-+\n+...
[ "2\n5\n1\n3\n2\n1\n2\n1\n2\n3\n2\n3\n3\n2\n2\n", "7\n9\n6\n", "2\n5\n1\n2\n2\n1\n2\n1\n2\n2\n3\n3\n3\n2\n2\n", "11\n9\n9\n", "2\n5\n1\n2\n2\n1\n2\n1\n2\n3\n3\n2\n2\n3\n3\n", "7\n9\n7\n", "2\n5\n1\n3\n2\n1\n2\n1\n2\n2\n3\n2\n3\n3\n3\n", "2\n5\n1\n3\n2\n1\n2\n1\n2\n2\n3\n2\n3\n2\n3\n", "2\n5\n1\n2\n2\...
75
0
3
kod:Filter_78504_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
easy
KodCode easy
Filter
Write a Python function that takes a list of integers and returns a new list containing only the very first even number from the original list. If there are no even numbers, the function should return an empty list.
Write a Python function that takes a list of integers and returns a new list containing only the very first even number from the original list. If there are no even numbers, the function should return an empty list. Implement the required callable(s) in Python 3. Preserve the requested names and signatures. Provide th...
pytest
from solution import first_even_number def test_single_even_number(): assert first_even_number([1, 3, 5, 2]) == [2] def test_multiple_even_numbers(): assert first_even_number([2, 4, 6, 8]) == [2] def test_no_even_numbers(): assert first_even_number([1, 3, 5, 7]) == [] def test_empty_list(): assert f...
def first_even_number(lst):
['Qwen2.5-Coder-32B-Instruct_159457']
null
null
null
null
3
3
taco:2325
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
easy
TACO easy
codeforces
Carl is a beginner magician. He has a blue, b violet and c orange magic spheres. In one move he can transform two spheres of the same color into one sphere of any other color. To make a spell that has never been seen before, he needs at least x blue, y violet and z orange spheres. Can he get them (possible, in multiple...
Carl is a beginner magician. He has a blue, b violet and c orange magic spheres. In one move he can transform two spheres of the same color into one sphere of any other color. To make a spell that has never been seen before, he needs at least x blue, y violet and z orange spheres. Can he get them (possible, in multiple...
stdio
null
null
null
https://codeforces.com/problemset/problem/606/A
[ "1000100 1000000 1000000\n1000000 1000000 1000000\n", "5 6 1\n2 7 2\n", "48 17 34\n0 19 24\n", "0 1 3\n1 0 1\n", "134389 303568 749016\n238307 493997 190377\n", "1 0 0\n1 0 0\n", "9 10 0\n0 0 9\n", "500000 1294152 500000\n1000000 0 500000\n", "4 0 4\n1 2 3\n", "10 10 -1\n0 0 11\n", "4 0 3\n2 2 0...
[ "Yes\n", "No\n", "Yes\n", "Yes\n", "No\n", "Yes\n", "Yes\n", "Yes\n", "No\n", "No\n", "Yes\n", "No\n", "Yes\n", "Yes\n", "No\n", "No\n", "Yes\n", "No\n", "Yes\n", "Yes\n", "Yes\n", "No\n", "No\n", "Yes\n", "No\n", "No\n", "No\n", "Yes\n", "No\n", "Yes\n", ...
256
0
3
kod:Filter_80018_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
easy
KodCode easy
Filter
Write a Python program to check if a given number is a palindrome or not. A palindrome is a number that reads the same backward as forward, e.g., 12321 is a palindrome, but 12345 is not. The program should take an integer as input and return True if it is a palindrome, and False otherwise. Use a stack to implement the ...
Write a Python program to check if a given number is a palindrome or not. A palindrome is a number that reads the same backward as forward, e.g., 12321 is a palindrome, but 12345 is not. The program should take an integer as input and return True if it is a palindrome, and False otherwise. Use a stack to implement the ...
pytest
from solution import is_palindrome def test_palindrome_positive_case(): assert is_palindrome(12321) == True def test_palindrome_negative_case(): assert is_palindrome(12345) == False def test_single_digit_number(): assert is_palindrome(7) == True def test_even_length_palindrome(): assert is_palindrom...
def is_palindrome(number):
['Qwen2.5-Math-72B-Instruct_162626']
null
null
null
null
3
3
kod:Filter_45737_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
easy
KodCode easy
Filter
Given the following array, write a Python code snippet to remove all duplicates while preserving the order of the first occurrence of each element.
Given the following array, write a Python code snippet to remove all duplicates while preserving the order of the first occurrence of each element. Implement the required callable(s) in Python 3. Preserve the requested names and signatures. Provide the complete contents of solution.py in one fenced Python code block. ...
pytest
from solution import remove_duplicates def test_remove_duplicates_mixed(): assert remove_duplicates([1, 2, 2, 3, 4, 4, 5]) == [1, 2, 3, 4, 5] def test_remove_duplicates_all_unique(): assert remove_duplicates([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5] def test_remove_duplicates_all_same(): assert remove_duplicat...
def remove_duplicates(arr):
['Qwen2.5-72B-Instruct_97493']
null
null
null
null
3
3
kod:Data_Structure_22834_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
medium
KodCode medium
Data_Structure
### Cycle Sort Implementation and Application #### Objective: Write a function `cycle_sort(arr)` that implements the Cycle Sort algorithm. Your function should sort the array in ascending order with minimal number of writes. #### Input: * An unsorted list `arr` of integers. * Length of the array can vary from 0 to ...
### Cycle Sort Implementation and Application #### Objective: Write a function `cycle_sort(arr)` that implements the Cycle Sort algorithm. Your function should sort the array in ascending order with minimal number of writes. #### Input: * An unsorted list `arr` of integers. * Length of the array can vary from 0 to ...
pytest
from solution import cycle_sort def test_empty_list(): assert cycle_sort([]) == [] def test_single_element_list(): assert cycle_sort([5]) == [5] def test_sorted_list(): assert cycle_sort([1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5] def test_unsorted_list(): assert cycle_sort([5, 3, 1, 4, 2]) == [1, 2, 3, 4, ...
def cycle_sort(arr):
[29]
null
null
null
null
0
3
taco:11148
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
easy
TACO easy
codeforces
The game of Berland poker is played with a deck of $n$ cards, $m$ of which are jokers. $k$ players play this game ($n$ is divisible by $k$). At the beginning of the game, each player takes $\frac{n}{k}$ cards from the deck (so each card is taken by exactly one player). The player who has the maximum number of jokers i...
The game of Berland poker is played with a deck of $n$ cards, $m$ of which are jokers. $k$ players play this game ($n$ is divisible by $k$). At the beginning of the game, each player takes $\frac{n}{k}$ cards from the deck (so each card is taken by exactly one player). The player who has the maximum number of jokers i...
stdio
null
null
null
https://codeforces.com/problemset/problem/1359/A
[ "4\n8 0 2\n4 0 4\n35 1 5\n14 0 9\n", "1\n49 7 7\n", "1\n68 11 3\n", "1\n90 3 6\n", "4\n8 4 2\n4 2 4\n12 3 3\n7 0 7\n", "1\n90 7 7\n", "1\n113 3 5\n", "4\n8 0 2\n4 0 4\n35 1 5\n7 0 9\n", "1\n48 3 6\n", "4\n8 0 2\n3 0 4\n35 6 3\n7 0 9\n", "1\n48 10 4\n", "4\n8 0 2\n4 0 3\n21 6 3\n7 0 9\n", "1\...
[ "0\n0\n1\n0\n", "7\n", "11\n", "3\n", "4\n0\n3\n0\n", "7\n", "3\n", "0\n0\n1\n0\n", "3\n", "0\n0\n6\n0\n", "10\n", "0\n0\n6\n0\n", "4\n", "0\n", "15\n", "9\n", "1\n", "9\n", "7\n", "0\n", "3\n0\n4\n0\n", "3\n0\n4\n0\n", "3\n0\n0\n0\n", "6\n", "3\n0\n3\n0\n", "7\n", ...
108
2
3
kod:Filter_74506_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
medium
KodCode medium
Filter
Can you provide a Python implementation of Floyd-Warshall's algorithm for finding the shortest path between all pairs of nodes in a weighted graph?
Can you provide a Python implementation of Floyd-Warshall's algorithm for finding the shortest path between all pairs of nodes in a weighted graph? Implement the required callable(s) in Python 3. Preserve the requested names and signatures. Provide the complete contents of solution.py in one fenced Python code block. ...
pytest
from solution import floyd_warshall def test_floyd_warshall_basic(): graph = [ [0, 3, float('inf'), 5], [2, 0, float('inf'), 4], [float('inf'), 1, 0, float('inf')], [float('inf'), float('inf'), 2, 0] ] expected = [ [0, 3, 7, 5], [2, 0, 6, 4], [3,...
def floyd_warshall(graph):
['Qwen2.5-Coder-32B-Instruct_151141']
null
null
null
null
1
3
kod:Evol_2729_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
easy
KodCode easy
Evol
Create a function in Python that takes a list of integers and returns a new list containing only the elements that are unique in the original list (appear exactly once). Additionally, the function should maintain the original order of the elements from the input list. Write test cases to validate your implementation, e...
Create a function in Python that takes a list of integers and returns a new list containing only the elements that are unique in the original list (appear exactly once). Additionally, the function should maintain the original order of the elements from the input list. Write test cases to validate your implementation, e...
pytest
from solution import unique_elements def test_empty_list(): assert unique_elements([]) == [] def test_all_identical_elements(): assert unique_elements([1, 1, 1, 1]) == [] def test_no_unique_elements(): assert unique_elements([1, 2, 2, 1, 3, 3]) == [] def test_all_unique_elements(): assert unique_ele...
def unique_elements(lst):
[29147]
null
null
null
null
1
3
taco:15154
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
medium
TACO medium
codeforces
Everyone loves a freebie. Especially students. It is well-known that if in the night before exam a student opens window, opens the student's record-book and shouts loudly three times "Fly, freebie, fly!" — then flown freebie helps him to pass the upcoming exam. In the night before the exam on mathematical analysis n ...
Everyone loves a freebie. Especially students. It is well-known that if in the night before exam a student opens window, opens the student's record-book and shouts loudly three times "Fly, freebie, fly!" — then flown freebie helps him to pass the upcoming exam. In the night before the exam on mathematical analysis n ...
stdio
null
null
null
https://codeforces.com/problemset/problem/386/B
[ "100\n98 63 672 100 254 218 623 415 426 986 920 915 736 795 407 541 382 213 935 743 961 59 660 512 192 935 248 378 739 356 543 714 28 667 602 596 759 791 103 564 225 520 166 542 966 332 983 655 517 273 95 242 593 940 286 236 41 318 941 727 384 225 319 627 982 359 232 769 854 172 643 598 215 231 305 30 347 469 929 9...
[ "100\n", "1\n", "100\n", "3\n", "61\n", "1\n", "6\n", "6\n", "55\n", "3\n", "71\n", "3\n", "6\n", "1\n", "6\n", "25\n", "2\n", "3\n", "2\n", "62\n", "3\n", "6\n", "2\n", "3\n", "41\n", "2\n", "1\n", "2\n", "100\n", "3\n", "6\n", "94\n" ]
136
2
3
taco:13991
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
easy
TACO easy
codeforces
You are given a multiset $S$ initially consisting of $n$ distinct non-negative integers. A multiset is a set, that can contain some elements multiple times. You will perform the following operation $k$ times: Add the element $\lceil\frac{a+b}{2}\rceil$ (rounded up) into $S$, where $a = \operatorname{mex}(S)$ and $b =...
You are given a multiset $S$ initially consisting of $n$ distinct non-negative integers. A multiset is a set, that can contain some elements multiple times. You will perform the following operation $k$ times: Add the element $\lceil\frac{a+b}{2}\rceil$ (rounded up) into $S$, where $a = \operatorname{mex}(S)$ and $b =...
stdio
null
null
null
https://codeforces.com/problemset/problem/1496/B
[ "7\n5 1000000000\n4 2 3 0 1\n4 0\n5 3 0 1\n3 0\n100 0 1\n6 1234567\n1 2 3 4 5 0\n3 114514\n8 0 4\n1 1000100\n0\n1 10000000\n1\n", "1\n1 0\n0\n", "1\n5 3\n0 1 7 29 5\n", "1\n5 3\n0 1 3 24 6\n", "5\n4 0\n0 2 3 4\n3 1\n0 1 4\n3 0\n0 1 4\n3 2\n0 1 2\n3 2\n1 2 3\n", "1\n5 3\n0 1 2 5 4\n", "1\n5 6\n0 1 6 11 5...
[ "1000000005\n4\n3\n1234573\n4\n1000101\n1\n", "1\n", "6\n", "6\n", "4\n4\n3\n5\n3\n", "5\n", "6\n", "5\n", "1\n", "6\n", "6\n", "6\n", "6\n", "4\n3\n4\n5\n3\n", "6\n", "6\n", "6\n", "3\n", "6\n", "4\n4\n3\n4\n3\n", "3\n", "6\n", "6\n", "5\n", "4\n4\n3\n5\n3\n", "6\n...
212
0
3
kod:Filter_21285_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
easy
KodCode easy
Filter
Here is a problem I need help with. Given a string, check if it contains at least one vowel and at least one digit. */ Example: Input: "a1b2c3" Output: "True" Input: "test123" Output: "True" Input: "alles" Output: "False" Input: "1234" Output: "False" And here is the c...
Here is a problem I need help with. Given a string, check if it contains at least one vowel and at least one digit. */ Example: Input: "a1b2c3" Output: "True" Input: "test123" Output: "True" Input: "alles" Output: "False" Input: "1234" Output: "False" And here is the c...
pytest
from solution import check_string def test_check_string_with_vowels_and_digits(): assert check_string("a1b2c3") == True assert check_string("test123") == True def test_check_string_with_only_vowels(): assert check_string("alles") == False def test_check_string_with_only_digits(): assert check_string(...
def check_string(s):
['Llama-3.3-70B-Instruct_53291']
null
null
null
null
0
3
taco:1470
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
medium
TACO medium
codeforces
A bracket sequence is called regular if it is possible to obtain correct arithmetic expression by inserting characters «+» and «1» into this sequence. For example, sequences «(())()», «()» and «(()(()))» are regular, while «)(», «(()» and «(()))(» are not. One day Johnny got bracket sequence. He decided to remove some...
A bracket sequence is called regular if it is possible to obtain correct arithmetic expression by inserting characters «+» and «1» into this sequence. For example, sequences «(())()», «()» and «(()(()))» are regular, while «)(», «(()» and «(()))(» are not. One day Johnny got bracket sequence. He decided to remove some...
stdio
null
null
null
https://codeforces.com/problemset/problem/26/B
[ "))())))))))())))))()()))()())))))))))))()))))))))))))(()))())(()))))(()))))())))((((()()))))()))()))\n", "(\n", "())))))()())())))))())\n", ")())))(\n", "))()()((()()))())()(()(()((()()((((((())()((((())(\n", "()))((\n", "()(((()(()\n", "())((()()())((((((((())(((((((()())()))()((()()())\n", "()()(...
[ "46\n", "0\n", "10\n", "2\n", "34\n", "2\n", "6\n", "36\n", "6\n", "2\n", "2\n", "8\n", "4\n", "10\n", "38\n", "34\n", "38\n", "6\n", "10\n", "6\n", "4\n", "12\n", "6\n", "2\n", "2\n", "2\n", "0\n", "10\n", "2\n", "2\n", "38\n", "28\n" ]
104
3
3
kod:Evol_5690_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
medium
KodCode medium
Evol
Create a function in Python that takes a list of integers and an integer value k, and returns the k most frequent elements in the list. If there is a tie for the k-th place in terms of frequency, return the smallest elements first. Implement your solution with a time complexity better than O(n^2). The function should b...
Create a function in Python that takes a list of integers and an integer value k, and returns the k most frequent elements in the list. If there is a tie for the k-th place in terms of frequency, return the smallest elements first. Implement your solution with a time complexity better than O(n^2). The function should b...
pytest
from solution import most_frequent_elements def test_most_frequent_elements_basic(): assert most_frequent_elements([4, 1, -1, 2, -1, 2, 3], 2) == [-1, 2] def test_most_frequent_elements_tie(): assert most_frequent_elements([1, 2, 3, 1, 2, 3, 1, 2, 3], 2) == [1, 2] def test_most_frequent_elements_all_equa...
def most_frequent_elements(numbers, k):
[41600]
null
null
null
null
2
3
kod:Filter_53830_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
easy
KodCode easy
Filter
Write a python function to determine if a given integer is a palindrome. The function should return `True` if the integer is a palindrome, `False` otherwise.
Write a python function to determine if a given integer is a palindrome. The function should return `True` if the integer is a palindrome, `False` otherwise. Implement the required callable(s) in Python 3. Preserve the requested names and signatures. Provide the complete contents of solution.py in one fenced Python co...
pytest
from solution import is_palindrome def test_positive_palindrome(): assert is_palindrome(121) == True def test_negative_palindrome(): assert is_palindrome(-121) == False # negative numbers cannot be palindrome def test_single_digit(): assert is_palindrome(5) == True def test_non_palindrome(): assert...
def is_palindrome(num):
['Qwen2.5-72B-Instruct_110481']
null
null
null
null
3
3
taco:21942
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
medium
TACO medium
codechef
Read problems statements in Mandarin Chinese and Russian. A new school in Byteland is now in the process of renewing some classrooms with new, stronger and better chairs, so that the students can stay still and pay attention to class :) However, due to budget and logistic reasons, it's only possible to carry a cha...
Read problems statements in Mandarin Chinese and Russian. A new school in Byteland is now in the process of renewing some classrooms with new, stronger and better chairs, so that the students can stay still and pay attention to class :) However, due to budget and logistic reasons, it's only possible to carry a cha...
stdio
null
null
null
https://www.codechef.com/problems/MCHAIRS
[ "2\n8\n49", "2\n1\n2", "2\n8\n4", "2\n3\n4", "2\n14\n2", "2\n3\n2", "2\n0\n9", "2\n2\n10", "2\n16\n9", "2\n6\n8", "2\n0\n11", "2\n14\n1", "2\n0\n17", "2\n10\n0", "2\n0\n5", "2\n8\n5", "2\n6\n5", "2\n10\n4", "2\n1\n5", "2\n3\n0", "2\n1\n3", "2\n2\n8", "2\n1\n1", "2\n8\n1...
[ "255\n949480668\n", "1\n3", "255\n15\n", "7\n15\n", "16383\n3\n", "7\n3\n", "0\n511\n", "3\n1023\n", "65535\n511\n", "63\n255\n", "0\n2047\n", "16383\n1\n", "0\n131071\n", "1023\n0\n", "0\n31\n", "255\n31\n", "63\n31\n", "1023\n15\n", "1\n31\n", "7\n0\n", "1\n7\n", "3\n255\...
102
3
3
taco:10821
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
easy
TACO easy
codeforces
There are n problems prepared for the next Codeforces round. They are arranged in ascending order by their difficulty, and no two problems have the same difficulty. Moreover, there are m pairs of similar problems. Authors want to split problems between two division according to the following rules: Problemset of each...
There are n problems prepared for the next Codeforces round. They are arranged in ascending order by their difficulty, and no two problems have the same difficulty. Moreover, there are m pairs of similar problems. Authors want to split problems between two division according to the following rules: Problemset of each...
stdio
null
null
null
https://codeforces.com/problemset/problem/673/B
[ "100000 10\n99562 484\n1099 99684\n593 99867\n99529 175\n99738 616\n92547 766\n42925 121\n99784 301\n199 87398\n12 99849\n", "2 0\n", "100001 1\n100000 1\n", "55 1\n34 1\n", "100000 10\n99562 479\n643 49292\n593 99867\n99529 175\n99738 616\n99523 766\n99503 121\n51284 158\n199 99199\n15 58732\n", "4 1\n2 ...
[ "41826\n", "1\n", "99999\n", "33\n", "48526\n", "1\n", "3\n", "0\n", "36007\n", "1\n", "28\n", "0\n", "1\n", "98433\n", "1\n", "2\n", "0\n", "54\n", "98433\n", "0\n", "99999\n", "15\n", "1\n", "1\n", "3\n", "57966\n", "0\n", "50518\n", "42084\n", "2\n", "5...
158
0
3
kod:Algorithm_27462_I
train
KodCode/KodCode-Light-RL-10K
dcf78a8bbba9a613b596ce993c4921a38687dfcc
medium
KodCode medium
Algorithm
### Question: Develop a Simple Text Analysis Tool #### Context Text analysis is an essential aspect of natural language processing, where words and their frequencies in a document are often analyzed to understand better the document's content. This task requires implementing a basic text analysis tool that processes a...
### Question: Develop a Simple Text Analysis Tool #### Context Text analysis is an essential aspect of natural language processing, where words and their frequencies in a document are often analyzed to understand better the document's content. This task requires implementing a basic text analysis tool that processes a...
pytest
from solution import word_frequency def test_empty_string(): assert word_frequency("") == {} def test_single_word(): assert word_frequency("hello") == {"hello": 1} def test_multiple_words(): text = "Hello, world! Hello, Programming." assert word_frequency(text) == {'hello': 2, 'world': 1, 'programmin...
def word_frequency(text):
[475]
null
null
null
null
2
3
taco:5546
train
likaixin/TACO-verified
9e68575e01938f016199eda6f07d1a7ce96b35e1
medium
TACO medium
codeforces
A permutation is a sequence of integers from $1$ to $n$ of length $n$ containing each number exactly once. For example, $[1]$, $[4, 3, 5, 1, 2]$, $[3, 2, 1]$ — are permutations, and $[1, 1]$, $[4, 3, 1]$, $[2, 3, 4]$ — no. Permutation $a$ is lexicographically smaller than permutation $b$ (they have the same length $n$...
A permutation is a sequence of integers from $1$ to $n$ of length $n$ containing each number exactly once. For example, $[1]$, $[4, 3, 5, 1, 2]$, $[3, 2, 1]$ — are permutations, and $[1, 1]$, $[4, 3, 1]$, $[2, 3, 4]$ — no. Permutation $a$ is lexicographically smaller than permutation $b$ (they have the same length $n$...
stdio
null
null
null
https://codeforces.com/problemset/problem/1443/E
[ "10 4\n1 2 4\n2 1\n1 1 2\n1 3 4\n", "4 2\n1 2 1\n2 2\n1 2 2\n", "4 3\n1 1 3\n2 2\n1 2 2\n", "4 2\n1 3 2\n2 1\n2 2 2\n", "4 4\n1 2 4\n2 3\n1 1 3\n1 3 4\n", "4 2\n1 2 2\n2 1\n2 2 0\n", "2 3\n1 2 2\n2 1\n1 2 1\n", "4 3\n1 1 4\n2 1\n1 2 2\n", "4 2\n1 2 1\n2 2\n1 0 2\n", "4 2\n1 2 1\n2 2\n0 3 4\n", "...
[ "9\n3\n7\n", "0\n", "6\n3\n", "0\n", "9\n8\n6\n", "2\n", "2\n0\n", "10\n2\n", "0\n", "0\n", "2\n", "9\n4\n10\n", "3\n0\n", "1\n0\n", "2\n", "2\n", "2\n3\n", "6\n0\n", "3\n1\n", "10\n3\n7\n", "7\n7\n9\n", "2\n", "1\n", "0\n", "10\n1\n9\n", "2\n", "9\n3\n9\n", "3\...
62
2
3
End of preview. Expand in Data Studio

RL Lab coding train and dev

These are the frozen Python splits calibrated for Qwen/Qwen3-8B in non-thinking mode. Use train for training and dev for in-loop evaluation. The separate LiveCodeBench holdout is for before/after evaluation.

Source Difficulty Train Dev
TACO-verified Easy 660 66
TACO-verified Medium 400 40
KodCode Easy 280 28
KodCode Medium 160 16
Total 1,500 150

Load the frozen version

from datasets import load_dataset

rl = load_dataset("SJCaldwell/rl-lab-code-train-dev", revision="v1", token=True)
train, dev = rl["train"], rl["dev"]

Each row has a stable id, the exact prompt, source provenance, and the reward-test fields. Send only prompt to the model. For mode == "stdio", the verifier reads paired inputs and outputs. For mode == "pytest", it uses the test suite against solution.py. Fields for the other mode are null. The calibration used a two-second wall-clock limit per candidate solution across its complete suite. For larger TACO suites, the reward uses deterministically selected test cases spanning input sizes.

The starting model measured 33.5% pass@1 and 67.3% pass@16 on dev with 16 fresh completions per problem. Sampling used temperature 0.8, top-p 0.95, top-k 20, a 1,536-token output cap, and seed 20261220. The screen_passes field comes from a separate three-sample screening round.

Provenance and licenses

The source and revision columns pin each row to its upstream dataset.

Downloads last month
41