problem stringlengths 0 14.3k | solution stringlengths 0 6.9k ⌀ | tests stringlengths 33 74M ⌀ | domain stringclasses 8
values | source stringclasses 85
values | difficulty stringlengths 24 320 ⌀ | metadata stringlengths 2 88M |
|---|---|---|---|---|---|---|
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
In the State of Takahashi in AtCoderian Federation, there are N cities, numbered 1, 2, ..., N.
M bidirectional roads connect these cities.
The i-th road connects City A_i... | null | {"inputs": ["5 5\n1 2\n1 3\n3 4\n3 5\n4 5\n", "5 1\n1 2\n", "4 3\n1 2\n1 3\n2 3\n", "10 39\n7 2\n7 1\n5 6\n5 8\n9 10\n2 8\n8 7\n3 10\n10 1\n8 10\n2 3\n7 4\n3 9\n4 10\n3 4\n6 1\n6 7\n9 5\n9 7\n6 9\n9 4\n4 6\n7 5\n8 3\n2 5\n9 2\n10 7\n8 6\n8 9\n7 3\n5 3\n4 5\n6 3\n2 10\n5 10\n4 2\n6 2\n8 4\n10 6\n", "5 0\n1 2", "1 0\n1 2... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "6/16", "DeepSeek-R1-Distill-Qwen-7B": "10/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
There is a room with n bulbs labeled from 1 to n that all are turned on initially, and four buttons on the wall. Each o... | null | {"entry_point": "Solution().flipLights", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nfrom m... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "14/16", "DeepSeek-R1-Distill-Qwen-7B": "14/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
On a campus represented on the X-Y plane, there are n workers and m bikes, with n <= m.
You are given an array workers ... | null | {"entry_point": "Solution().assignBikes", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nfrom ... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "6/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
You are given a string s consisting of digits from 1 to 9 and an integer k.
A partition of a string s is called good if... | null | {"entry_point": "Solution().minimumPartition", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\n... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "2/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
A string of length 6 consisting of lowercase English letters is said to be coffee-like if and only if its 3-rd and 4-th characters are equal and its 5-th and 6-th charact... | null | {"inputs": ["sippuu\n", "iphone\n", "coffee\n", "dceett\n", "otjjmm\n", "zkrrcc\n", "mdihxy\n", "xuquqw\n", "ilvegx\n", "tcdrzv\n", "abccde\n", "abcdee\n", "abcccc\n", "cofgee", "sjppvv", "uuppis", "ephoni", "cofgef", "uvppis", "eohoni", "fegfoc", "sippvu", "inohoe", "fegeoc", "uvppjs", "innhoe", "feoegc", "sjppvu", "i... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "0/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
For a positive integer n, let us define f(n) as the number of digits in base 10.
You are given an integer S.
Count the number of the pairs of positive integers (l, r) (l ... | null | {"inputs": ["1\n", "2\n", "123\n", "36018\n", "1000\n", "450002\n", "450010\n", "450015\n", "450020\n", "450030\n", "91304885\n", "7803372\n", "89317875\n", "1060874\n", "78876118\n", "18434582\n", "15764866\n", "79528725\n", "52556425\n", "86801054\n", "5400003\n", "5400005\n", "5400019\n", "5400020\n", "5400100\n", "... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-very_hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "16/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
Given two strings s and goal, return true if and only if s can become goal after some number of shifts on s.
A shift on... | null | {"entry_point": "Solution().rotateString", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nfrom... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "0/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "2/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Before the Battle of Kamino the Confederacy of Independent Systems developed the a way to communicate with the far systems. This way is very unique as every word consists... | null | {"inputs": ["10 25 10\nnwlrbbmqbh\ncdarzowkky\nhiddqscdxr\njmowfrxsjy\nbldbefsarc\nbynecdyggx\nxpklorelln\nmpapqfwkho\npkmcoqhnwn\nkuewhsqmgb\nbuqcljjivs\nwmdkqtbxix\nmvtrrbljpt\nnsnfwzqfjm\nafadrrwsof\nsbcnuvqhff\nbsaqxwpqca\ncehchzvfrk\nmlnozjkpqp\nxrjxkitzyx\nacbhhkicqc\noendtomfgd\nwdwfcgpxiq\nvkuytdlcgd\newhtacioh... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium_hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "4/16", "DeepSeek-R1-Distill-Qwen-7B": "12/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
Given the root of a binary tree and two integers p and q, return the distance between the nodes of value p and value q ... | null | {"entry_point": "Solution().findDistance", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nfrom... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "2/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Takahashi wants to be a member of some web service.
He tried to register himself with the ID S, which turned out to be already used by another user.
Thus, he decides to r... | null | {"inputs": ["chokudai\nchokudaiz\n", "snuke\nsnekee\n", "a\naa\n", "c\nbc\n", "irjgore\nqirjgore\n", "iwiwi\niwiwiw\n", "aaaaaaaaaa\naaaaaaaaaaa\n", "vgxgpuamkx\nvgxgpuamkxk\n", "zhkbp\nphykin\n", "e\nzp\n", "vfjaqmop\nodotkrjzr\n", "snuke\nsnelee", "b\nba", "a\nba", "choktdai\nchokudaiz", "nsuke\nsnelee", "choktdai\nb... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "6/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
$n$ students are taking an exam. The highest possible score at this exam is $m$. Let $a_{i}$ be the score of the $i$-th student. You have access to the school database wh... | null | {"inputs": ["2\n4 10\n1 2 3 4\n4 5\n1 2 3 4\n", "27\n1 1\n0\n1 2\n0\n1 5\n0\n1 10\n0\n1 50\n0\n1 100\n0\n1 500\n0\n1 1000\n0\n1 5000\n0\n1 10000\n0\n1 50000\n0\n1 100000\n0\n1 5\n4\n1 5\n5\n1 10\n9\n1 10\n10\n1 100000\n9999\n1 100000\n100000\n1 4999\n386\n1 100000\n1\n4 5\n1 0 0 0\n4 5\n0 1 0 0\n4 5\n0 0 0 0\n4 5\n5 5 ... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "4/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
The function is not returning the correct values. Can you figure out why?
```python
get_planet_name(3) # should return 'Earth'
```
You will use the following starter co... | null | {"fn_name": "get_planet_name", "inputs": ["2", "5", "3", "4", "8", "1"], "outputs": ["\"Venus\"", "\"Jupiter\"", "\"Earth\"", "\"Mars\"", "\"Neptune\"", "\"Mercury\""]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "12/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
Given an array of integers nums and an integer k, return the number of subarrays of nums where the bitwise AND of the e... | null | {"entry_point": "Solution().countSubarrays", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nfr... | code | Skywork/Skywork-OR1-RL-Data/test-code-leetcode-Hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "6/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
You are given a sorted array $a_1, a_2, \dots, a_n$ (for each index $i > 1$ condition $a_i \ge a_{i-1}$ holds) and an integer $k$.
You are asked to divide this array int... | null | {"inputs": ["6 3\n4 8 15 16 23 42\n", "4 4\n1 3 3 7\n", "8 1\n1 1 2 3 5 8 13 21\n", "1 1\n1\n", "5 2\n3 3 4 5 6\n", "1 1\n20\n", "1 1\n56\n", "1 1\n4\n", "5 3\n99 101 103 105 107\n", "1 1\n2\n", "1 1\n1\n", "5 2\n-1 -2 5 -4 8\n", "5 2\n3 3 4 5 6\n", "7 6\n-3 0 -1 -2 -2 -4 -1\n", "1 1\n4\n", "1 1\n2\n", "4 1\n3 -1 6 0\n... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "8/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
How many licks does it take to get to the tootsie roll center of a tootsie pop?
A group of engineering students from Purdue University reported that its licking machine,... | null | {"fn_name": "total_licks", "inputs": ["{\"freezing temps\": 10, \"clear skies\": -2}", "{\"happiness\": -5, \"clear skies\": -2}", "{}", "{\"dragons\": 100, \"evil wizards\": 110, \"trolls\": 50}", "{\"white magic\": -250}"], "outputs": ["\"It took 260 licks to get to the tootsie roll center of a tootsie pop. The tough... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "14/16", "DeepSeek-R1-Distill-Qwen-7B": "10/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
A simple recommendation system would recommend a user things liked by a certain number of their friends. In this problem you will implement part of such a system.
You ar... | null | {"inputs": ["3 3 2\nYYY\nNNN\nYNY\n", "4 4 1\nNNNY\nNNYN\nNYNN\nYNNN\n", "3 5 2\nNYNNY\nYNNNN\nNNYYN\n", "1 10 1\nYYYNYNNYNN\n", "10 1 5\nY\nN\nN\nN\nY\nN\nN\nY\nN\nN\n", "10 10 1\nNNNNNNNNNN\nNNNNNNNNNN\nNNNNNNNNNN\nNNNNNNNNNN\nNNNNNNNNNN\nNNNNNNNNNN\nNNNNNNNNNN\nNNNNNNNNNN\nNNNNNNNNNN\nNNNNNNNNNN\n", "10 10 10\nYYYYY... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "0/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Alice and Bob begin their day with a quick game. They first choose a starting number X_0 ≥ 3 and try to reach one million by the process described below.
Alice goes fir... | null | {"inputs": ["14\n", "20\n", "8192\n", "1000000\n", "959806\n", "1452\n", "4\n", "6\n", "8\n", "9\n", "10\n", "12\n", "15\n", "16\n", "110880\n", "166320\n", "221760\n", "277200\n", "332640\n", "498960\n", "554400\n", "665280\n", "720720\n", "510510\n", "570570\n", "690690\n", "959818\n", "959878\n", "959902\n", "974847... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium_hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "14/16", "DeepSeek-R1-Distill-Qwen-32B": "8/16", "DeepSeek-R1-Distill-Qwen-7B": "8/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
Given an array of integers arr, a lucky integer is an integer that has a frequency in the array equal to its value.
Ret... | null | {"entry_point": "Solution().findLucky", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nfrom ma... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "0/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "2/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Read problems statements in [Hindi], [Mandarin Chinese], [Russian], [Vietnamese], and [Bengali] as well.
Chef is taking a cooking exam. The exam consists of $N$ multiple... | null | {"inputs": ["3\n6\nABCDAB\nABCDAB\n8\nDDCABCCA\nDNCBBBBA\n3\nCDD\nNDC"], "outputs": ["6\n3\n1"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "14/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "12/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
The Academy is a school where each common area is laid out on an $m\times n$ grid and each cell in the grid is $\mbox{1}$ meter by $\mbox{1}$ meter. Danielle is their new... | null | {"inputs": ["2\n3 3\n3 4\n"], "outputs": ["36\n78\n"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "4/16", "DeepSeek-R1-Distill-Qwen-7B": "12/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Yet another Armageddon is coming! This time the culprit is the Julya tribe calendar.
The beavers in this tribe knew math very well. Smart Beaver, an archaeologist, got ... | null | {"inputs": ["24\n", "0\n", "3\n", "8\n", "9\n", "10\n", "31\n", "701\n", "222\n", "156\n", "12343\n", "7984\n", "1000000\n", "1\n", "3\n", "5\n", "11\n", "77\n", "216\n", "1468\n", "1995\n", "11010\n", "47320\n", "258634\n", "1000000\n", "47320\n", "222\n", "9\n", "1\n", "701\n", "11\n", "258634\n", "1995\n", "0\n", "7... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "16/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Little Petya likes to play very much. And most of all he likes to play the following game:
He is given a sequence of N integer numbers. At each step it is allowed to inc... | null | {"inputs": ["5\n0 0 0 0 0\n", "2\n10 2\n", "20\n10 5 3 1 3 7 7 6 8 3 6 2 9 10 5 2 10 9 10 4\n", "10\n8 8 2 2 2 2 10 10 10 8\n", "5\n1 2 3 1 1\n", "20\n10 6 1 9 10 10 7 0 10 5 9 1 5 7 4 9 3 9 7 2\n", "20\n7 7 7 7 7 7 10 10 10 10 23 21 23 20 22 23 22 23 95 97\n", "7\n1000000000 -1000000000 1000000000 -1000000000 10000000... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "16/16", "DeepSeek-R1-Distill-Qwen-7B": "14/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
So the Beautiful Regional Contest (BeRC) has come to an end! n students took part in the contest. The final standings are already known: the participant in the i-th place... | null | {"inputs": ["5\n12\n5 4 4 3 2 2 1 1 1 1 1 1\n4\n4 3 2 1\n1\n1000000\n20\n20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1\n32\n64 64 63 58 58 58 58 58 37 37 37 37 34 34 28 28 28 28 28 28 24 24 19 17 17 17 17 16 16 16 16 11\n", "5\n12\n5 4 4 3 2 2 1 1 1 1 1 1\n4\n4 3 2 1\n1\n1000000\n20\n20 19 18 17 16 15 14 13 12 11 ... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "16/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
You are given an array points representing integer coordinates of some points on a 2D-plane, where points[i] = [xi, yi]... | null | {"entry_point": "Solution().minCostConnectPoints", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "10/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "4/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
The only difference between the easy and the hard versions is constraints.
A subsequence is a string that can be derived from another string by deleting some or no symbo... | null | {"inputs": ["4 5\nasdf\n", "5 6\naaaaa\n", "5 7\naaaaa\n", "10 100\najihiushda\n", "1 2\nu\n", "1 5\nw\n", "1 10\ns\n", "1 25\no\n", "1 50\ns\n", "1 100\np\n", "5 2\nufdpx\n", "5 5\nwnxcc\n", "5 10\nbzitq\n", "5 25\nwjsel\n", "5 50\nbhhaj\n", "5 100\nnvyoj\n", "10 2\nmllbxoykle\n", "10 5\nnrdmcxnnbb\n", "10 10\nhittmcs... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "2/16", "DeepSeek-R1-Distill-Qwen-7B": "12/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
A line on the plane is described by an equation Ax + By + C = 0. You are to find any point on this line, whose coordinates are integer numbers from - 5·1018 to 5·1018 in... | null | {"inputs": ["2 5 3"], "outputs": ["6 -3"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-unknown_difficulty | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Little Johnny has recently learned about set theory. Now he is studying binary relations. You've probably heard the term "equivalence relation". These relations are very ... | null | {"inputs": ["4\n", "5\n", "4000\n", "3000\n", "42\n", "3555\n", "2999\n", "999\n", "3789\n", "6\n", "133\n", "2000\n", "8\n", "345\n", "3333\n", "2345\n", "1730\n", "3999\n", "555\n", "2500\n", "20\n", "666\n", "2780\n", "10\n", "7\n", "777\n", "9\n", "1234\n", "76\n", "18\n", "1627\n", "3334\n", "193\n", "2291\n", "26... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "2/16", "DeepSeek-R1-Distill-Qwen-7B": "10/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
You are participating in an online chess tournament. There is a chess round that starts every 15 minutes. The first rou... | null | {"entry_point": "Solution().numberOfRounds", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nfr... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "2/16", "DeepSeek-R1-Distill-Qwen-7B": "14/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
There are $N$ colors of beads. You have $b_i$ beads of the $i^{\mbox{th}}$ color. You want to make an ornament by joining all the beads together. You create the ornament ... | null | {"inputs": ["5\n2\n2 1\n2\n2 2\n1\n4\n2\n3 1\n5\n1 1 1 1 1\n"], "outputs": ["2\n4\n16\n9\n125\n"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "16/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
A border of a string is a proper prefix of it that is also a suffix. For example:
a and abra are borders of abracadabra,
kan and kankan are borders of kankankan.
de is ... | null | {"inputs": ["ababa\n", "aaaa\n", "abcacb\n"], "outputs": ["5\n", "10\n", "3\n"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "14/16", "DeepSeek-R1-Distill-Qwen-7B": "14/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
You are given a 0-indexed array nums containing n integers.
At each second, you perform the following operation on the ... | null | {"entry_point": "Solution().minimumSeconds", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nfr... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "4/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
We have a country containing _N _cities. Each day we choose 2 cities such that there is no road between them and build a road between them. We choose each pair of nonadja... | null | {"inputs": ["3\n", "4\n"], "outputs": ["2\n", "3\n"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium_hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "10/16", "DeepSeek-R1-Distill-Qwen-32B": "10/16", "DeepSeek-R1-Distill-Qwen-7B": "4/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
One day, Ikta, an elementary school student, received a piece of paper with mathematical formulas from his grandfather. Apparently, the grandfather will give you as much ... | null | {"inputs": ["(1989967-3*2-211+4487)", "3-2)3", "(5-3*4)+(0-2+1)", "3)2-3", "0-2+3-4+5-6*0", "(1998967-3*1-211+4487)", "(5-3*4)*(0-1+1)", "(199896743*1-211+4-87)", "(5-3*4)*(0-1+2)", "0*6-5+5-3+2-0", "(199876743*1-211+4-89)", "(5-3*3)*(0-1+2)", "(199877743*1-211+4-89)", "3*1-3", "(199896743*1-201+4-87)", "0*6-5+5-2+2-0"... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-unknown_difficulty | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "16/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
An online contest will soon be held on ForceCoders, a large competitive programming platform. The authors have prepared $n$ problems; and since the platform is very popul... | null | {"inputs": ["3\n1 2\n1 2\n1 2\n", "2\n42 1337\n13 420\n", "2\n1 1\n0 0\n", "2\n1 1\n1 1\n", "2\n1 1\n0 1\n", "2\n0 1\n0 1\n", "2\n0 0\n0 1\n", "2\n0 0\n0 1\n", "2\n0 0\n0 1\n", "2\n0 1\n1 1\n", "2\n10 34\n17 26\n", "2\n12 19\n39 69\n", "2\n25 29\n29 78\n", "2\n3 38\n52 99\n", "2\n14 49\n41 52\n", "2\n21 93\n15 70\n", "... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "16/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
There are $n$ people sitting in a circle, numbered from $1$ to $n$ in the order in which they are seated. That is, for all $i$ from $1$ to $n-1$, the people with id $i$ a... | null | {"inputs": ["6\n", "16\n", "2\n", "25\n", "36\n", "14732891\n", "536870912\n", "17239871\n", "11\n", "3\n", "4\n", "5\n", "798324712\n", "999999999\n", "536870912\n", "88888888\n", "798324712\n", "800000000\n", "669278610\n", "999999999\n", "900000000\n", "25\n", "551350800\n", "735134400\n", "11\n", "5\n", "14732891\n... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "14/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
You are going to eat X red apples and Y green apples.
You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, an... | null | {"inputs": ["1 2 2 2 1\n2 4\n5 1\n3\n", "2 2 2 2 2\n8 6\n9 1\n2 1\n", "2 2 4 4 4\n11 12 13 14\n21 22 23 24\n1 2 3 4\n", "2 2 2 2 3\n8 6\n9 1\n2 1", "1 2 2 2 1\n3 4\n5 1\n3", "2 2 4 4 4\n11 12 13 14\n21 22 23 22\n1 2 3 4", "2 2 2 2 3\n8 1\n9 1\n2 1", "0 2 2 2 3\n8 1\n9 1\n2 1", "2 1 4 4 4\n11 12 13 14\n21 22 23 22\n0 2 ... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "16/16", "DeepSeek-R1-Distill-Qwen-7B": "14/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
As you may know, once some people pass their teens, they jokingly only celebrate their 20th or 21st birthday, forever. With some maths skills, that's totally possible - y... | null | {"fn_name": "womens_age", "inputs": ["32", "39", "22", "65", "83"], "outputs": ["\"32? That's just 20, in base 16!\"", "\"39? That's just 21, in base 19!\"", "\"22? That's just 20, in base 11!\"", "\"65? That's just 21, in base 32!\"", "\"83? That's just 21, in base 41!\""]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "14/16", "DeepSeek-R1-Distill-Qwen-7B": "4/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Programmers' kids solve this riddle in 5-10 minutes. How fast can you do it?
-----Input-----
The input contains a single integer n (0 ≤ n ≤ 2000000000).
-----Output-... | null | {"inputs": ["11\n", "14\n", "61441\n", "571576\n", "2128506\n", "0\n", "2000000000\n", "143165576\n", "1741\n", "1919020031\n", "1795248373\n", "1818960378\n", "1285316221\n", "1309028227\n", "1304312649\n", "1180540990\n", "1204252996\n", "1199537418\n", "1075765759\n", "724264821\n", "747976826\n", "624205168\n", "61... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "16/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Gleb ordered pizza home. When the courier delivered the pizza, he was very upset, because several pieces of sausage lay on the crust, and he does not really like the crus... | null | {"inputs": ["8 4\n7\n7 8 1\n-7 3 2\n0 2 1\n0 -2 2\n-3 -3 1\n0 6 2\n5 3 1", "10 8\n4\n0 0 9\n0 0 10\n1 0 1\n1 0 2", "1 0\n1\n1 1 0\n", "3 0\n5\n3 0 0\n0 3 0\n-3 0 0\n0 -3 0\n3 0 1\n", "5 3\n1\n500 500 10\n", "9 0\n5\n8 1 0\n8 2 0\n8 3 0\n-8 3 0\n-8 2 0\n", "10 2\n11\n1 1 0\n2 2 3\n3 3 0\n4 4 0\n5 5 0\n6 6 0\n7 7 4\n8 8 ... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "6/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
You are given two strings $s$ and $t$. Both strings have length $n$ and consist of lowercase Latin letters. The characters in the strings are numbered from $1$ to $n$.
Y... | null | {"inputs": ["6\nabcdef\nabdfec\n", "4\nabcd\naccd\n", "50\nnyqahbyyoxltryqdmvenemaqnbakglgqolxnaifnqtoclnnqia\nnyqahbyyoxltryqdmvenemaqnbakglgqolxnaifnqtoclnnqia\n", "50\nnyqahbyyoxltryqdmvenemaqnbakglgqolxnaifnqtoclnnqia\nnyqahbyyoxluryqdmvenemaqnbakglgqolxnaifnqtoclnnqia\n", "50\nvpdgzvgvgbichiiqdhytvcooetcgeecyueoyl... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "2/16", "DeepSeek-R1-Distill-Qwen-7B": "12/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
Given two strings s and t, return the number of distinct subsequences of s which equals t.
The test cases are generated... | null | {"entry_point": "Solution().numDistinct", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nfrom ... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "8/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
There are two rival donut shops.
The first shop sells donuts at retail: each donut costs a dollars.
The second shop sells donuts only in bulk: box of b donuts costs c d... | null | {"inputs": ["9\n5 10 4\n4 5 20\n2 2 3\n1 100000007 100000008\n1 100000007 100000009\n1 100000007 100000008\n1 1000000000 1000000000\n1 1000000000 999999999\n3 4 12\n", "3\n1 999999999 1000000000\n1 1000000000 1000000000\n1 1000000000 999999999\n", "1\n1 1000000000 999999999\n", "1\n1 499999999 499999998\n", "1\n2 99999... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "10/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Each army fighting the world war Z is denoted with a word consisting any combination of 26 alphabets. An army is a match for his/her opponent if and only if his name is a... | null | {"inputs": ["3\nman app\na b\nabcde edcba"], "outputs": ["No\nNo\nYes"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "0/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
At Akabe High School, which is a programmer training school, the roles of competition programmers in team battles are divided into the following three types.
C: | Coder |... | null | {"inputs": ["4\n3 0 0\n1 1 1\n9 4 2\n0 1 2", "4\n2 0 0\n1 1 1\n9 4 2\n0 1 2", "4\n3 0 1\n1 1 1\n9 4 1\n0 1 2", "4\n3 0 0\n1 2 1\n0 4 2\n0 1 2", "4\n0 0 0\n1 2 1\n0 4 2\n0 1 3", "4\n2 1 0\n2 2 2\n9 8 2\n0 1 3", "4\n0 1 2\n3 0 2\n9 19 0\n0 2 3", "4\n0 1 2\n3 0 2\n9 0 0\n0 2 3", "4\n3 0 0\n1 2 1\n12 4 2\n0 1 2", "4\n0 0 0... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-unknown_difficulty | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "14/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
William has array of $n$ numbers $a_1, a_2, \dots, a_n$. He can perform the following sequence of operations any number of times:
Pick any two items from array $a_i$ and... | null | {"inputs": ["5\n3\n6 4 2\n5\n1 2 3 4 5\n1\n10\n3\n2 3 4\n15\n8 8 8 8 8 8 8 8 8 8 8 8 8 8 8\n"], "outputs": ["50\n46\n10\n26\n35184372088846\n"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "12/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "6/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Jeel and Ashish play a game on an $n \times m$ matrix. The rows are numbered $1$ to $n$ from top to bottom and the columns are numbered $1$ to $m$ from left to right. The... | null | {"inputs": ["4\n1 1\n0\n1 3\n0 0 5\n2 2\n0 1\n1 0\n3 3\n1 2 3\n4 5 6\n7 8 9\n", "3\n5 5\n0 0 0 0 0\n0 0 0 0 0\n0 0 0 0 0\n0 0 0 0 0\n0 0 0 0 0\n4 4\n0 0 3 0\n0 2 0 0\n2 0 0 0\n0 0 0 0\n5 5\n0 3 4 5 0\n7 8 9 10 11\n12 13 14 15 16\n17 18 19 20 21\n0 22 23 24 0\n", "5\n4 4\n0 2 3 4\n0 3 3 6\n4 1 7 7\n5 4 7 0\n4 4\n0 2 3 0... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-very_hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "14/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Bob came to a cash & carry store, put n items into his trolley, and went to the checkout counter to pay. Each item is described by its price ci and time ti in seconds tha... | null | {"inputs": ["5\n0 968804136\n0 736567537\n2 343136264\n0 259899572\n1 425744418\n", "5\n0 51690939\n0 62436494\n0 39009053\n0 70426298\n0 631569476\n", "5\n5 491957578\n4 747764103\n3 446810728\n4 896625835\n4 190748656\n", "2\n2 87623264\n0 864627704\n", "10\n3 512981548\n0 214269975\n2 603901234\n3 772872647\n0 22428... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "10/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
We have the first value of a certain sequence, we will name it ```initVal```.
We define pattern list, ```patternL```, an array that has the differences between contiguou... | null | {"fn_name": "sumDig_nthTerm", "inputs": ["10\n[2, 1, 3]\n6", "10\n[2, 1, 3]\n15", "10\n[2, 1, 3]\n50", "10\n[2, 1, 3]\n78", "10\n[2, 1, 3]\n157", "10\n[2, 2, 5, 8]\n6", "10\n[2, 2, 5, 8]\n15", "10\n[2, 2, 5, 8]\n50", "10\n[2, 2, 5, 8]\n78", "10\n[2, 2, 5, 8]\n157", "100\n[2, 2, 5, 8]\n6", "100\n[2, 2, 5, 8]\n15", "100\... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "6/16", "DeepSeek-R1-Distill-Qwen-32B": "8/16", "DeepSeek-R1-Distill-Qwen-7B": "12/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Chef has two arrays A and B of the same size N.
In one operation, Chef can:
Choose two integers i and j (1 ≤ i, j ≤ N) and swap the elements A_{i} and B_{j}.
Chef came ... | null | {"inputs": ["3\n3\n2 1 3\n1 4 1\n4\n2 1 4 3\n3 2 6 2\n5\n2 8 4 9 7\n7 3 6 8 4\n"], "outputs": ["0\n1\n2"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "4/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
# Your Task
You have a cuboid with dimensions x,y,z ∈ ℕ. A subcuboid of this cuboid has dimensions length, width, height ∈ ℕ where 1≤length≤x, 1≤width≤y, 1≤height≤z. If t... | null | {"fn_name": "subcuboids", "inputs": ["1\n1\n1", "2\n2\n2", "2\n3\n3", "4\n5\n6", "3\n7\n11"], "outputs": ["1", "27", "108", "3150", "11088"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "14/16", "DeepSeek-R1-Distill-Qwen-32B": "14/16", "DeepSeek-R1-Distill-Qwen-7B": "2/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Chef has decided to start a new software company, the company's building has N offices numbered from 0 to N-1 and there's a computer in each office.
All offices' compute... | null | {"inputs": ["1\n4 10 20\n123456789012 4567890123456\n11111111111111 2222222222222\n101010101010 2323232323232\n112358132134 1928374655647\n999999555555 5555559999999\n234123124155 1241352352345\n234213515123 1231245551223\n523432523332 1234124515123"], "outputs": ["0111\n1000\n1000\n1000"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-very_hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "12/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
One tradition of welcoming the New Year is launching fireworks into the sky. Usually a launched firework flies vertically upward for some period of time, then explodes, s... | null | {"inputs": ["4\n4 2 2 3\n", "6\n1 1 1 1 1 3\n", "1\n3\n", "7\n5 3 3 5 5 4 4\n", "8\n3 3 3 3 3 3 3 1\n", "15\n4 4 4 3 2 1 5 3 5 3 4 1 2 4 4\n", "20\n4 5 3 4 5 4 2 4 2 1 5 3 3 1 4 1 2 4 4 3\n", "28\n1 3 4 4 4 3 1 4 5 1 3 5 3 2 5 1 4 4 5 3 4 2 5 4 2 5 3 2\n", "30\n1 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "16/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
From an array A containing N integers, you construct a binary string S of length (N - 1) as follows. For all 1 ≤ i < N:
If A_{i} < A_{i+1}, then S_{i} = 0.
If A_{i} > A_{... | null | {"inputs": ["3\n2\n0\n7\n000111\n6\n11100\n"], "outputs": ["1\n1\n2\n"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "6/16", "DeepSeek-R1-Distill-Qwen-7B": "12/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Take a string and return a hash with all the ascii values of the characters in the string.
Returns nil if the string is empty.
The key is the character, and the value is ... | null | {"fn_name": "char_to_ascii", "inputs": ["\"\"", "\"a\"", "\"aaa\"", "\"hello world\"", "\"ABaa ^\""], "outputs": ["null", "{\"a\": 97}", "{\"a\": 97}", "{\"h\": 104, \"e\": 101, \"l\": 108, \"o\": 111, \"w\": 119, \"r\": 114, \"d\": 100}", "{\"A\": 65, \"B\": 66, \"a\": 97}"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "8/16", "DeepSeek-R1-Distill-Qwen-7B": "14/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Lucy loves to travel. Luckily she is a renowned computer scientist and gets to travel to international conferences using her department's budget.
Each year, Society for ... | null | {"fn_name": "conference_picker", "inputs": ["[]\n[\"Philadelphia\", \"Osaka\", \"Tokyo\", \"Melbourne\"]", "[]\n[\"Brussels\", \"Madrid\", \"London\"]", "[]\n[\"Sydney\", \"Tokyo\"]", "[\"London\", \"Berlin\", \"Mexico City\", \"Melbourne\", \"Buenos Aires\", \"Hong Kong\", \"Madrid\", \"Paris\"]\n[\"Berlin\", \"Melbou... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "14/16", "DeepSeek-R1-Distill-Qwen-7B": "12/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Given a string consisting of the letters $\textbf{a}$, $\textbf{b}$ and $\textbf{c}$, we can perform the following operation:
Take any two adjacent distinct characters ... | null | {"inputs": ["3 \ncab \nbcab \nccccc\n"], "outputs": ["2 \n1 \n5\n"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium_hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "6/16", "DeepSeek-R1-Distill-Qwen-7B": "8/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
And again a misfortune fell on Poor Student. He is being late for an exam.
Having rushed to a bus stop that is in point (0, 0), he got on a minibus and they drove along ... | null | {"inputs": ["2 1 1\n0 100000\n-100000 -100000\n", "55 11 44\n0 3343 3387 3470 3825 3832 3971 4026 4043 4389 4492 4886 5015 5084 5161 5436 5595 5616 5677 5987 6251 6312 6369 6469 6487 6493 6507 6641 6928 7067 7159 7280 7303 7385 7387 7465 7536 7572 7664 7895 7921 7955 8110 8191 8243 8280 8523 8525 8581 8877 9221 9462 95... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "8/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Bob is a competitive programmer. He wants to become red, and for that he needs a strict training regime. He went to the annual meeting of grandmasters and asked $n$ of th... | null | {"inputs": ["6\n603\n006\n205\n228\n1053\n0000000000000000000000000000000000000000000000\n", "15\n5318008\n379009\n06\n79153975193751375917591379919397337913333535330\n791539751937513759175913799193973379133301353533\n123456789023487138475693874561834576138495713485673485364857638475673465873457346581495713641\n7915397... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "4/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Recently, Chef visited his doctor. The doctor advised Chef to drink at least 2000 ml of water each day.
Chef drank X ml of water today. Determine if Chef followed the d... | null | {"inputs": ["3\n2999\n1450\n2000\n"], "outputs": ["YES\nNO\nYES\n"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "2/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
A string is called a happy prefix if is a non-empty prefix which is also a suffix (excluding itself).
Given a string s,... | null | {"entry_point": "Solution().longestPrefix", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nfro... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "6/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "2/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
G --Derangement / Derangement
Story
Person D is doing research on permutations. At one point, D found a permutation class called "Derangement". "It's cool to have a per... | null | {"inputs": ["5\n2 1 3 5 4", "5\n2 1 0 5 4", "5\n4 1 0 5 4", "5\n4 1 0 5 6", "5\n4 0 0 5 6", "5\n4 0 0 10 6", "5\n4 0 0 10 12", "5\n4 0 0 10 3", "5\n4 0 0 11 3", "5\n4 0 0 0 3", "5\n4 0 1 0 3", "5\n7 0 1 0 3", "5\n7 0 2 0 3", "5\n7 1 2 0 3", "5\n2 1 0 1 4", "5\n4 1 0 5 2", "5\n4 1 0 5 3", "5\n4 0 0 5 2", "5\n6 0 0 10 6"... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-unknown_difficulty | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "14/16", "DeepSeek-R1-Distill-Qwen-7B": "14/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
The tycoon of a winery empire in Mondstadt, unmatched in every possible way. A thinker in the Knights of Favonius with an exotic appearance.
This time, the brothers are ... | null | {"inputs": ["20\n5\nDKDKD\n4\nKDKD\n2\nKD\n2\nKD\n1\nD\n3\nKDK\n3\nDKD\n4\nKDKD\n3\nDKD\n2\nDK\n1\nK\n4\nKDKD\n1\nD\n2\nKD\n3\nKDK\n3\nDKD\n1\nK\n2\nKD\n2\nKD\n2\nKD\n", "10\n9\nDDDDDDKDD\n10\nKKDDDDKKDK\n7\nKKDDKDK\n13\nKKKDDKDDDKKKD\n14\nKDDDDKDDKDKDKK\n9\nKKDDKDDKD\n14\nDKDKKKKKDDDKKK\n10\nKDKKDKKKKD\n11\nDDKDKKDDKK... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "12/16", "DeepSeek-R1-Distill-Qwen-32B": "6/16", "DeepSeek-R1-Distill-Qwen-7B": "8/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
Given an integer n, return the decimal value of the binary string formed by concatenating the binary representations of... | null | {"entry_point": "Solution().concatenatedBinary", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "12/16", "DeepSeek-R1-Distill-Qwen-32B": "6/16", "DeepSeek-R1-Distill-Qwen-7B": "12/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
The little girl loves the problems on array queries very much.
One day she came across a rather well-known problem: you've got an array of n elements (the elements of th... | null | {"inputs": ["3 3\n5 3 2\n1 2\n2 3\n1 3\n", "5 3\n5 2 4 1 3\n1 5\n2 3\n2 3\n", "34 21\n23 38 16 49 44 50 48 34 33 19 18 31 11 15 20 47 44 30 39 33 45 46 1 13 27 16 31 36 17 23 38 5 30 16\n8 16\n14 27\n8 26\n1 8\n5 6\n23 28\n4 33\n13 30\n12 30\n11 30\n9 21\n1 14\n15 22\n4 11\n5 24\n8 20\n17 33\n6 9\n3 14\n25 34\n10 17\n"... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "6/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Takahashi has a maze, which is a grid of H \times W squares with H horizontal rows and W vertical columns.
The square at the i-th row from the top and the j-th column is ... | null | {"inputs": ["3 3\n...\n...\n...\n", "3 5\n...#.\n.#.#.\n.#...\n", "20 20\n....................\n###################.\n....................\n.###################\n....................\n###################.\n....................\n.###################\n....................\n###################.\n....................\n.###... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "2/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Read problems statements in Mandarin Chinese and Russian as well.
There are 100 houses located on a straight line. The first house is numbered 1 and the last one is num... | null | {"inputs": ["3\n4 7 8\n12 52 56 8\n2 10 2\n21 75\n2 5 8\n10 51", "3\n4 7 8\n12 52 56 8\n2 11 2\n21 75\n2 5 8\n10 51", "3\n4 7 8\n19 52 56 8\n2 20 2\n21 75\n2 5 8\n10 51", "3\n4 7 8\n12 52 56 8\n2 10 2\n21 75\n2 5 8\n10 49", "3\n4 7 8\n19 52 56 8\n2 20 2\n21 75\n2 7 8\n10 51", "3\n4 7 8\n7 52 56 8\n2 11 2\n21 75\n2 9 8\... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "10/16", "DeepSeek-R1-Distill-Qwen-7B": "14/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Abhi is a salesman. He was given two types of candies, which he is selling in N different cities.
For the prices of the candies to be valid, Abhi's boss laid down the fo... | null | {"inputs": ["4\n3\n4 8 4 6 7 3\n3\n4 8 6 8 7 8\n2\n2 4 5 3\n4\n8 7 9 8 4 6 2 8\n"], "outputs": ["Yes\nNo\nYes\nNo"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "4/16", "DeepSeek-R1-Distill-Qwen-32B": "2/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:
Tetrahedron. Tetrahedron has 4 triangular faces. ... | null | {"inputs": ["4\nIcosahedron\nCube\nTetrahedron\nDodecahedron\n", "3\nDodecahedron\nOctahedron\nOctahedron\n", "25\nIcosahedron\nOctahedron\nTetrahedron\nDodecahedron\nCube\nIcosahedron\nOctahedron\nCube\nTetrahedron\nIcosahedron\nIcosahedron\nTetrahedron\nOctahedron\nDodecahedron\nIcosahedron\nOctahedron\nIcosahedron\n... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "0/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Let's define $f(x)$ for a positive integer $x$ as the length of the base-10 representation of $x$ without leading zeros. I like to call it a digital logarithm. Similar to... | null | {"inputs": ["4\n1\n1\n1000\n4\n1 2 3 4\n3 1 4 2\n3\n2 9 3\n1 100 9\n10\n75019 709259 5 611271314 9024533 81871864 9 3 6 4865\n9503 2 371245467 6 7 37376159 8 364036498 52295554 169\n"], "outputs": ["2\n0\n2\n18\n"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "16/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Concatenate
Two or more arrays can be concatenated together using the concatenate function with a
tuple of the arrays to be joined:
import numpy
array_1 = numpy.arra... | null | {"inputs": ["4 3 2\n1 2\n1 2 \n1 2\n1 2\n3 4\n3 4\n3 4 \n"], "outputs": ["[[1 2]\n [1 2]\n [1 2]\n [1 2]\n [3 4]\n [3 4]\n [3 4]] \n"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "14/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
There is an undirected connected tree with n nodes labeled from 0 to n - 1 and n - 1 edges.
You are given a 0-indexed i... | null | {"entry_point": "Solution().minimumScore", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nfrom... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "2/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
As we all know Barney's job is "PLEASE" and he has not much to do at work. That's why he started playing "cups and key". In this game there are three identical cups arran... | null | {"inputs": ["1\n2\n", "3\n1 1 1\n", "1\n983155795040951739\n", "2\n467131402341701583 956277077729692725\n", "10\n217673221404542171 806579927281665969 500754531396239406 214319484250163112 328494187336342674 427465830578952934 951554014286436941 664022909283791499 653206814724654845 66704816231807388\n", "8\n137264686... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "2/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Bertown is a city with $n$ buildings in a straight line.
The city's security service discovered that some buildings were mined. A map was compiled, which is a string of ... | null | {"inputs": ["2\n1 1\n01000010\n5 1\n01101110\n", "2\n1 1\n01000110\n5 1\n01101110\n", "2\n2 1\n01000110\n5 1\n01101110\n", "2\n2 1\n01000110\n5 1\n01101101\n", "2\n2 1\n11000111\n5 1\n01101001\n", "2\n1 1\n01000010\n10 1\n01101110\n", "2\n1 1\n01000110\n5 2\n01101110\n", "2\n1 1\n11000111\n5 1\n01101001\n", "2\n0 1\n11... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "4/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
Given the array queries of positive integers between 1 and m, you have to process all queries[i] (from i=0 to i=queries... | null | {"entry_point": "Solution().processQueries", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nfr... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "10/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
You are a *khm*mad*khm* scientist and you decided to play with electron distribution among atom's shells.
You know that basic idea of electron distribution is that electr... | null | {"fn_name": "atomic_number", "inputs": ["1", "10", "11", "22", "23", "47", "50", "52", "60", "61"], "outputs": ["[1]", "[2, 8]", "[2, 8, 1]", "[2, 8, 12]", "[2, 8, 13]", "[2, 8, 18, 19]", "[2, 8, 18, 22]", "[2, 8, 18, 24]", "[2, 8, 18, 32]", "[2, 8, 18, 32, 1]"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "4/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
As you must know, the maximum clique problem in an arbitrary graph is NP-hard. Nevertheless, for some graphs of specific kinds it can be solved effectively.
Just in case... | null | {"inputs": ["8\n3 4 6 8 10 18 21 24\n", "5\n2 3 4 8 16\n", "2\n10 20\n", "2\n10 21\n", "5\n250000 333333 500000 666666 1000000\n", "50\n1 2 5 7 9 14 19 24 25 29 31 34 37 40 43 44 46 53 54 57 58 59 60 61 62 64 66 68 69 70 72 75 78 79 80 81 82 84 85 86 87 88 89 90 91 92 93 94 96 98\n", "20\n1 2 4 8 16 32 64 128 256 512 1... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "8/16", "DeepSeek-R1-Distill-Qwen-7B": "6/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
During the NBA playoffs, we always set the rather strong team to play with the rather weak team, like making the rank 1... | null | {"entry_point": "Solution().findContestMatch", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\n... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
Implement a basic calculator to evaluate a simple expression string.
The expression string contains only non-negative i... | null | {"entry_point": "Solution().calculate", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nfrom ma... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "14/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
A jail has a number of prisoners and a number of treats to pass out to them. Their jailer decides the fairest way to divide the treats is to seat the prisoners around a ... | null | {"inputs": ["2\n5 2 1\n5 2 2\n", "2\n7 19 2\n3 7 3\n"], "outputs": ["2\n3\n", "6\n3\n"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "4/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "2/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
A sentence is a list of words that are separated by a single space with no leading or trailing spaces.
For example, "H... | null | {"entry_point": "Solution().isCircularSentence", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "6/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Misha and Vanya have played several table tennis sets. Each set consists of several serves, each serve is won by one of the players, he receives one point and the loser r... | null | {"inputs": ["11 11 5\n", "11 2 3\n", "1 5 9\n", "2 3 3\n", "1 1000000000 1000000000\n", "2 3 5\n", "1000000000 1000000000 1000000000\n", "1 0 1\n", "101 99 97\n", "1000000000 0 1\n", "137 137 136\n", "255 255 255\n", "1 0 1000000000\n", "123 456 789\n", "666666 6666666 666665\n", "1000000000 999999999 999999999\n", "10... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "12/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
There are N turkeys. We number them from 1 through N.
M men will visit here one by one. The i-th man to visit will take the following action:
* If both turkeys x_i and ... | null | {"inputs": ["4 1\n1 2\n3 4\n2 3", "10 10\n8 9\n2 8\n4 6\n4 9\n7 8\n2 9\n1 8\n3 4\n3 4\n2 7", "3 2\n1 2\n2 2", "4 3\n1 2\n3 4\n2 2", "6 1\n1 2", "1 1\n1 2\n3 4\n2 3", "10 10\n8 9\n2 8\n7 6\n4 9\n7 8\n2 9\n1 8\n3 4\n3 4\n2 7", "3 0\n1 2\n2 2", "10 1\n8 9\n2 8\n4 6\n4 9\n7 8\n2 8\n1 8\n3 4\n3 4\n3 7", "7 1\n1 2", "7 0\n1 ... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-unknown_difficulty | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "16/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Let's write all the positive integer numbers one after another from $1$ without any delimiters (i.e. as a single string). It will be the infinite sequence starting with 1... | null | {"inputs": ["7\n", "21\n", "1\n", "2\n", "3\n", "4\n", "5\n", "6\n", "8\n", "9\n", "10\n", "12\n", "188\n", "189\n", "190\n", "191\n", "192\n", "193\n", "194\n", "195\n", "196\n", "197\n", "198\n", "199\n", "200\n", "300\n", "400\n", "417\n", "521\n", "511\n", "2878\n", "2879\n", "2880\n", "2881\n", "2882\n", "2883\n",... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium_hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "12/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
ZS the Coder and Chris the Baboon has arrived at Udayland! They walked in the park where n trees grow. They decided to be naughty and color the trees in the park. The tre... | null | {"inputs": ["3 2 2\n0 0 0\n1 2\n3 4\n5 6\n", "3 2 2\n2 1 2\n1 3\n2 4\n3 5\n", "3 2 2\n2 0 0\n1 3\n2 4\n3 5\n", "3 2 3\n2 1 2\n1 3\n2 4\n3 5\n", "3 2 3\n0 0 0\n10 30000\n20000 1000000000\n1000000000 50000\n", "4 2 1\n0 0 0 0\n10 30000\n20000 1000000000\n1000000000 50000\n55 55\n", "4 2 1\n0 0 0 2\n10 30000\n20000 100000... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium_hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "8/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
You are given a string word and an integer k.
A substring s of word is complete if:
Each character in s occurs exactly... | null | {"entry_point": "Solution().countCompleteSubstrings", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator imp... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "4/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
You are given a 2D integer array ranges and two integers left and right. Each ranges[i] = [starti, endi] represents an ... | null | {"entry_point": "Solution().isCovered", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nfrom ma... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "6/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Given an integer $n$, find each $\boldsymbol{x}$ such that:
$0\leq x\leq n$
$n+x=n\oplus x$
where $\oplus$ denotes the bitwise XOR operator. Return the number of $\bold... | null | {"inputs": ["5\n", "10\n"], "outputs": ["2\n", "4\n"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "10/16", "DeepSeek-R1-Distill-Qwen-32B": "4/16", "DeepSeek-R1-Distill-Qwen-7B": "10/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
The hash of a 0-indexed string s of length k, given integers p and m, is computed using the following function:
hash(s... | null | {"entry_point": "Solution().subStrHash", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nfrom m... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "2/16", "DeepSeek-R1-Distill-Qwen-7B": "14/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
INTERCAL is the oldest of esoteric programming languages. One of its many weird features is the method of character-based output, known as Turing Tape method. It converts... | null | {"inputs": ["|wB6qdp/]MLcsaTcq*k`ORMsjdW{\"i5gD_@ap*L0.QbDx:pW3-=-;G~#5EeY\n", "+Ya%7i6_H%Mg0<AJv3`\n", "Cx!j6$!}KHn3. cp}(gy\\\n", "]d4VJczIDtIbTWb^j?QeAX%T%}I+tL:t8\n", "o2^\"t\n", "YbX.ksH*-e.D~sz$0C6x*-#7cX}@lz<\n", "xudk2tAoF>1A>~l)7-Pv5'KUF<(-y;7^7e;y^r</tiv,t]`^_%T}Xu#i8c\n", "1f$k9Zc(PM'D?xVLWm.Y}o$5g`bRxd9Jl$L... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Find the sum of the weights of edges of the Minimum-Cost Arborescence with the root r for a given weighted directed graph G = (V, E).
Constraints
* 1 ≤ |V| ≤ 100
* 0 ≤ ... | null | {"inputs": ["4 6 0\n0 1 3\n0 2 2\n2 0 1\n2 3 2\n3 0 1\n3 1 5", "6 10 0\n0 2 7\n0 1 1\n0 3 5\n1 4 9\n2 1 6\n1 3 2\n3 4 3\n4 2 2\n1 5 8\n3 5 3", "4 6 0\n0 1 1\n0 2 2\n2 0 1\n2 3 2\n3 0 1\n3 1 5", "4 6 0\n0 1 1\n0 2 2\n3 1 1\n2 3 3\n3 0 0\n0 1 7", "6 10 0\n0 2 7\n0 1 1\n0 3 5\n1 4 9\n2 1 6\n1 3 2\n3 1 3\n4 2 2\n1 5 8\n3 5... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-unknown_difficulty | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "16/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
# Task
**_Given_** a **_list of digits_**, *return the **_smallest number_** that could be formed from these digits, using the digits only once (ignore duplicates).*
__... | null | {"fn_name": "min_value", "inputs": ["[1, 3, 1]", "[4, 7, 5, 7]", "[4, 8, 1, 4]", "[5, 7, 9, 5, 7]", "[6, 7, 8, 7, 6, 6]", "[5, 6, 9, 9, 7, 6, 4]", "[1, 9, 1, 3, 7, 4, 6, 6, 7]", "[3, 6, 5, 5, 9, 8, 7, 6, 3, 5, 9]"], "outputs": ["13", "457", "148", "579", "678", "45679", "134679", "356789"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "14/16", "DeepSeek-R1-Distill-Qwen-32B": "14/16", "DeepSeek-R1-Distill-Qwen-7B": "14/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
ATMs of a well-known bank of a small country are arranged so that they can not give any amount of money requested by the user. Due to the limited size of the bill dispens... | null | {"inputs": ["27 20\n2 12 34 48 68 70 102 136 140 210 230 756 2268 4464 7378 8928 49630 71424 142848 144096 376278 688296 752556 1069810 1343724 3209430 5744760\n20\n18189038\n572752\n5\n51291\n584\n6108\n3209440\n100315\n368\n1122\n46\n26\n280\n256\n567936\n2800\n1454352\n1196050\n73582149\n149765054\n", "5 5\n1 2 3 6 ... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "12/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "6/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
We have a grid with H rows and W columns. At first, all cells were painted white.
Snuke painted N of these cells. The i-th ( 1 \leq i \leq N ) cell he painted is the cell... | null | {"inputs": ["4 5 8\n1 1\n1 4\n1 5\n2 3\n3 1\n3 2\n3 4\n4 4\n", "10 10 20\n1 1\n1 4\n1 9\n2 5\n3 10\n4 2\n4 7\n5 9\n6 4\n6 6\n6 7\n7 1\n7 3\n7 7\n8 1\n8 5\n8 10\n9 2\n10 4\n10 9\n", "1000000000 1000000000 0\n", "1000000000 1000000001 0", "4 5 8\n1 1\n1 4\n0 5\n2 3\n3 1\n3 2\n3 4\n4 4", "10 10 20\n1 1\n1 4\n1 9\n2 5\n3 1... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "14/16"} | {} |
You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
### Question:
The width of a sequence is the difference between the maximum and minimum elements in the sequence.
Given an array of i... | null | {"entry_point": "Solution().sumSubseqWidths", "import_prefix": "import collections\nimport string\nimport math\nimport datetime\n\nfrom typing import *\nfrom functools import *\nfrom collections import *\nfrom itertools import *\nfrom heapq import *\nfrom bisect import *\nfrom string import *\nfrom operator import *\nf... | code | Skywork/Skywork-OR1-RL-Data/train-code-leetcode-Hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "2/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Students are taught to add multi-digit numbers from right-to-left one digit at a time.
Many find the "carry" operation - in which 1 is carried from one digit position
to ... | null | {"inputs": ["3\n5555555555 5555555555\n1111111111 1111111111\n5111111111 5111111111", "3\n123 456\n555 555\n123 594"], "outputs": ["10 carry operations\nNo carry operation\n1 carry operation", "No carry operation\n3 carry operations\n1 carry operation"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-unknown_difficulty | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "2/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Given an array of bird sightings where every element represents a bird type id, determine the id of the most frequently sighted type. If more than 1 type has been spotte... | null | {"inputs": ["6\n1 4 4 4 5 3\n", "11\n1 2 3 4 5 4 3 2 1 3 4\n"], "outputs": ["4\n", "3\n"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "6/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "4/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Lunar New Year is approaching, and Bob is planning to go for a famous restaurant — "Alice's".
The restaurant "Alice's" serves $n$ kinds of food. The cost for the $i$-th ... | null | {"inputs": ["8 5\n8 6 2 1 4 5 7 5\n6 3 3 2 6 2 3 2\n2 8\n1 4\n4 7\n3 4\n6 10\n", "6 6\n6 6 6 6 6 6\n6 66 666 6666 66666 666666\n1 6\n2 6\n3 6\n4 6\n5 6\n6 66\n", "6 6\n6 6 6 6 6 6\n6 66 666 6666 66666 666666\n1 6\n2 13\n3 6\n4 11\n5 6\n6 6\n", "1 1\n411017\n129875\n1 8160563\n", "10 15\n132 138 38 75 14 115 129 68 119 ... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "0/16", "DeepSeek-R1-Distill-Qwen-7B": "14/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Pasha has many hamsters and he makes them work out. Today, n hamsters (n is even) came to work out. The hamsters lined up and each hamster either sat down or stood up.
F... | null | {"inputs": ["4\nxxXx\n", "2\nXX\n", "6\nxXXxXx\n", "4\nxXXX\n", "2\nXx\n", "22\nXXxXXxxXxXxXXXXXXXXXxx\n", "30\nXXxXxxXXXXxxXXxxXXxxxxXxxXXXxx\n", "104\nxxXxXxxXXXxxXxXxxXXXxxxXxxXXXxxXXXxXxXxXXxxXxxxxxXXXXxXXXXxXXXxxxXxxxxxxxXxxXxXXxxXXXXxXXXxxXXXXXXXXXxXX\n", "78\nxxxXxxXxXxxXxxxxxXxXXXxXXXXxxxxxXxXXXxxXxXXXxxxxXxxXX... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-easy | {"DeepSeek-R1-Distill-Qwen-1.5B": "14/16", "DeepSeek-R1-Distill-Qwen-32B": "4/16", "DeepSeek-R1-Distill-Qwen-7B": "14/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
The kingdom of Zion has cities connected by bidirectional roads. There is a unique path between any pair of cities. Morpheus has found out that the machines are planning... | null | {"inputs": ["5 3\n2 1 8\n1 0 5\n2 4 5\n1 3 4\n2\n4\n0\n"], "outputs": ["10\n"]} | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-medium_hard | {"DeepSeek-R1-Distill-Qwen-1.5B": "16/16", "DeepSeek-R1-Distill-Qwen-32B": "6/16", "DeepSeek-R1-Distill-Qwen-7B": "16/16"} | {} |
You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.
Write a program which prints the central coordinate $(p_x, p_y)$ and the radius $r$ of a circumscribed circle of a triangle which is constructed by three points $(x_1, y_... | null | {"inputs": ["1\n0.0 0.0 2.0 0.5127281311709682 2.0 2.0", "1\n0.0 0.0 2.4487612247110815 0.5127281311709682 2.0 2.0", "1\n0.0 0.0 2.4487612247110815 0.5127281311709682 2.0 2.033916337250816", "1\n0.0 0.8678187768154128 2.4487612247110815 0.5127281311709682 2.0 2.033916337250816", "1\n0.6737465592371317 0.867818776815412... | code | Skywork/Skywork-OR1-RL-Data/train-code-taco-unknown_difficulty | {"DeepSeek-R1-Distill-Qwen-1.5B": "10/16", "DeepSeek-R1-Distill-Qwen-32B": "2/16", "DeepSeek-R1-Distill-Qwen-7B": "0/16"} | {} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.