Datasets:
problem_id stringlengths 16 16 | statement stringlengths 29 9.15k | tests_json stringlengths 70 1.3M | time_limit_s float64 1 4 | origin_json stringlengths 82 105 |
|---|---|---|---|---|
000324c85302dad4 | Yaroslav, Andrey and Roman can play cubes for hours and hours. But the game is for three, so when Roman doesn't show up, Yaroslav and Andrey play another game.
Roman leaves a word for each of them. Each word consists of 2·n binary characters "0" or "1". After that the players start moving in turns. Yaroslav moves fir... | [["2\n0111\n0001\n", "First\n"], ["3\n110110\n001001\n", "First\n"], ["3\n111000\n000111\n", "Draw\n"], ["4\n01010110\n00101101\n", "First\n"], ["4\n01100000\n10010011\n", "Second\n"], ["4\n10001001\n10101101\n", "Draw\n"], ["3\n000000\n000100\n", "Draw\n"], ["2\n0000\n1110\n", "Second\n"], ["4\n11111111\n10100110\n", ... | 1 | {"source": "deepcoder/primeintellect", "upstream_id": "primeintellect/train-00000-of-00005.parquet#643"} |
000d58490fe3b933 | Alyona decided to go on a diet and went to the forest to get some apples. There she unexpectedly found a magic rooted tree with root in the vertex 1, every vertex and every edge of which has a number written on.
The girl noticed that some of the tree's vertices are sad, so she decided to play with them. Let's call ver... | [["9\n88 22 83 14 95 91 98 53 11\n3 24\n7 -8\n1 67\n1 64\n9 65\n5 12\n6 -80\n3 8\n", "5"], ["6\n60 89 33 64 92 75\n4 50\n1 32\n5 21\n3 77\n1 86\n", "4"], ["9\n59 48 48 14 51 51 86 53 58\n1 -47\n5 10\n8 -6\n9 46\n2 -69\n8 -79\n9 92\n6 12\n", "5"], ["8\n2 19 83 95 9 87 15 6\n6 16\n7 98\n5 32\n7 90\n8 37\n2 -34\n1 -83\n",... | 1 | {"source": "deepcoder/primeintellect", "upstream_id": "primeintellect/train-00002-of-00005.parquet#782"} |
00115d26ec66cca7 | The statement of this problem shares a lot with problem A. The differences are that in this problem, the probability is introduced, and the constraint is different.
A robot cleaner is placed on the floor of a rectangle room, surrounded by walls. The floor consists of n rows and m columns. The rows of the floor are num... | [["10\n8 5279 1 1543 6 1521 6\n25276 2 25276 2 1365 1 36\n49526 2 1 1 9796 2 29\n374 73 225 73 291 27 26\n4786 11 3871 11 2870 7 36\n39 811 14 811 32 455 31\n712 103 659 103 82 50 25\n112 419 1 105 99 285 9\n59 983 59 722 9 791 82\n2 6521 2 467 1 6424 77\n", "256169361\n555555564\n724137942\n57523121\n6513776\n90332295... | 2.87 | {"source": "deepcoder/taco", "upstream_id": "taco/train-00002-of-00004.parquet#623"} |
00125251a44159ba | Today on a lecture about strings Gerald learned a new definition of string equivalency. Two strings a and b of equal length are called equivalent in one of the two cases:
1. They are equal.
2. If we split string a into two halves of the same size a1 and a2, and string b into two halves of the same size b1 and b2... | [["aabb\nabab\n", "NO\n"], ["aaba\nabaa\n", "YES\n"], ["ab\nab\n", "YES\n"], ["abc\nabc\n", "YES\n"], ["hagnzomowtledfdotnll\nledfdotnllomowthagnz\n", "YES\n"], ["baaaaa\nabaaaa\n", "NO\n"], ["aabbaaaa\naaaaabab\n", "NO\n"], ["aab\naba\n", "NO\n"], ["a\na\n", "YES\n"], ["qgiufelsfhanx\naaaaaaaaaaaaa\n", "NO\n"], ["snya... | 1 | {"source": "deepcoder/primeintellect", "upstream_id": "primeintellect/train-00002-of-00005.parquet#1590"} |
0013e5f1fdfb118d | The teacher gave Anton a large geometry homework, but he didn't do it (as usual) as he participated in a regular round on Codeforces. In the task he was given a set of n lines defined by the equations y = k_{i}·x + b_{i}. It was necessary to determine whether there is at least one point of intersection of two of these ... | [["4\n1 2\n1 2\n1 0\n0 1\n0 2\n", "NO"], ["2\n1 3\n1 0\n-1 3\n", "YES"], ["2\n1 3\n1 0\n0 2\n", "YES"], ["2\n1 3\n1 0\n0 3\n", "NO"], ["2\n0 1\n-1000000 1000000\n1000000 -1000000\n", "NO"], ["2\n-1337 1888\n-1000000 1000000\n1000000 -1000000\n", "YES"], ["2\n-1337 1888\n-1000000 1000000\n-999999 -1000000\n", "NO"], ["1... | 1 | {"source": "deepcoder/taco", "upstream_id": "taco/train-00001-of-00004.parquet#1459"} |
0018d7680635ed0f | Polycarp is sad — New Year is coming in few days but there is still no snow in his city. To bring himself New Year mood, he decided to decorate his house with some garlands.
The local store introduced a new service this year, called "Build your own garland". So you can buy some red, green and blue lamps, provide them ... | [["3\n3 3 3\n1 10 2\n2 1 1\n", "Yes\nNo\nYes\n"], ["1\n109 107 7856743\n", "No\n"], ["1\n249342 9240924 10319492\n", "No\n"], ["1\n10123 1854 1\n", "No\n"], ["6\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n", "Yes\nYes\nYes\nYes\nYes\nYes\n"], ["11\n1000000000 500000000 500000000\n1000000000 500000000 499999999\n10000000... | 1 | {"source": "deepcoder/primeintellect", "upstream_id": "primeintellect/train-00004-of-00005.parquet#2760"} |
00192a40107e0bb7 | We have N points in a two-dimensional plane.
The coordinates of the i-th point (1 \leq i \leq N) are (x_i,y_i).
Let us consider a rectangle whose sides are parallel to the coordinate axes that contains K or more of the N points in its interior.
Here, points on the sides of the rectangle are considered to be in the inte... | [["4 3\n-1000000000 -1000000000\n1000000000 1000000000\n-999999999 999999999\n999999999 -999999999", "3999999996000000001"], ["4 2\n0 0\n1 1\n2 2\n3 3", "1"], ["4 4\n1 4\n3 3\n6 2\n8 1", "21"], ["4 3\n-1000000000 -1000000000\n1000000000 1001000000\n-999999999 999999999\n999999999 -999999999", "3999999996000000001\n"], ... | 1 | {"source": "deepcoder/primeintellect", "upstream_id": "primeintellect/train-00002-of-00005.parquet#1231"} |
00240bd9cf7bbf8d | Molly Hooper has n different kinds of chemicals arranged in a line. Each of the chemicals has an affection value, The i-th of them has affection value a_{i}.
Molly wants Sherlock to fall in love with her. She intends to do this by mixing a contiguous segment of chemicals together to make a love potion with total affec... | [["4 2\n2 2 2 2\n", "8\n"], ["4 -3\n3 -6 -3 12\n", "3\n"], ["14 -9\n-2 -4 62 53 90 41 35 21 85 74 85 57 10 39\n", "0\n"], ["20 9\n90 21 -6 -61 14 -21 -17 -65 -84 -75 -48 56 67 -50 16 65 -79 -61 92 85\n", "1\n"], ["89 -7\n5972 4011 3914 670 3727 2913 6935 6927 2118 6645 7141 3585 9811 2859 459 8870 6578 8667 468 5152 32... | 1 | {"source": "deepcoder/primeintellect", "upstream_id": "primeintellect/train-00000-of-00005.parquet#2311"} |
00280cdd3a8f40b5 | A sequence of non-negative integers $a_1, a_2, \dots, a_n$ is called growing if for all $i$ from $1$ to $n - 1$ all ones (of binary representation) in $a_i$ are in the places of ones (of binary representation) in $a_{i + 1}$ (in other words, $a_i \:\&\: a_{i + 1} = a_i$, where $\&$ denotes bitwise AND ). If $n = 1$ the... | [["5\n4\n1 3 7 15\n4\n1 2 4 8\n5\n1 2 3 4 5\n4\n11 13 15 1\n1\n0\n", "0 0 0 0 \n0 1 3 7 \n0 1 0 3 2 \n0 2 0 14 \n0 \n"], ["5\n4\n1 3 7 15\n4\n1 2 4 5\n5\n1 2 3 4 5\n4\n11 13 15 1\n1\n0\n", "0 0 0 0\n0 1 3 2\n0 1 0 3 2\n0 2 0 14\n0\n"], ["5\n4\n1 3 7 15\n4\n1 2 4 5\n5\n1 2 0 4 5\n4\n11 13 15 1\n1\n0\n", "0 0 0 0\n0 1 3 ... | 1 | {"source": "deepcoder/primeintellect", "upstream_id": "primeintellect/train-00004-of-00005.parquet#2990"} |
002a3bdab520fb10 | There is a system of n vessels arranged one above the other as shown in the figure below. Assume that the vessels are numbered from 1 to n, in the order from the highest to the lowest, the volume of the i-th vessel is ai liters.
<image>
Initially, all the vessels are empty. In some vessels water is poured. All the wa... | [["3\n5 10 8\n6\n1 1 12\n2 2\n1 1 6\n1 3 2\n2 2\n2 3\n", "7\n10\n5\n"], ["2\n5 10\n6\n1 1 4\n2 1\n1 2 5\n1 1 4\n2 1\n2 2\n", "4\n5\n8\n"], ["10\n71 59 88 55 18 98 38 73 53 58\n20\n1 5 93\n1 7 69\n2 3\n1 1 20\n2 10\n1 6 74\n1 7 100\n1 9 14\n2 3\n2 4\n2 7\n1 3 31\n2 4\n1 6 64\n2 2\n2 2\n1 3 54\n2 9\n2 1\n1 6 86\n", "0\n0... | 1 | {"source": "deepcoder/primeintellect", "upstream_id": "primeintellect/train-00001-of-00005.parquet#2992"} |
0038e0be09d1f086 | Hilbert's Hotel is a very unusual hotel since the number of rooms is infinite! In fact, there is exactly one room for every integer, including zero and negative integers. Even stranger, the hotel is currently at full capacity, meaning there is exactly one guest in every room. The hotel's manager, David Hilbert himself,... | [["6\n1\n14\n2\n1 -1\n4\n5 5 5 1\n3\n3 2 1\n2\n0 1\n5\n-239 -2 -100 -3 -11\n", "YES\nYES\nYES\nNO\nNO\nYES\n"], ["10\n1\n1000000000\n1\n-1000000000\n2\n1000000000 0\n2\n0 1000000000\n2\n1000000000 1\n2\n1 1000000000\n2\n-1000000000 0\n2\n0 -1000000000\n2\n-1000000000 1\n2\n1 -1000000000\n", "YES\nYES\nYES\nYES\nNO\nNO\... | 1 | {"source": "deepcoder/taco", "upstream_id": "taco/train-00002-of-00004.parquet#1763"} |
00469bfb20ab0ace | There is an infinitely large pond, which we consider as a number line.
In this pond, there are N lotuses floating at coordinates 0, 1, 2, ..., N-2 and N-1.
On the lotus at coordinate i, an integer s_i is written.
You are standing on the lotus at coordinate 0. You will play a game that proceeds as follows:
- 1. Choose ... | [["5\n0 2 5 1 0\n", "3\n"], ["6\n0 10 -7 -4 -13 0\n", "0\n"], ["11\n0 -4 0 -99 31 14 -15 -39 43 18 0\n", "59\n"], ["6\n0 10 -7 -4 -5 0", "5\n"], ["5\n0 2 5 0 0", "2\n"], ["11\n0 -4 0 -99 31 14 -15 -39 43 24 0", "63\n"], ["6\n0 2 -7 -1 -5 0", "0\n"], ["11\n0 -4 0 -99 31 13 -15 -39 64 24 0", "84\n"], ["6\n0 4 -7 -1 -3 0"... | 1 | {"source": "deepcoder/taco", "upstream_id": "taco/train-00003-of-00004.parquet#634"} |
006909719740ac51 | There are two main kinds of events in the life of top-model: fashion shows and photo shoots. Participating in any of these events affects the rating of appropriate top-model. After each photo shoot model's rating increases by a and after each fashion show decreases by b (designers do too many experiments nowadays). Mor... | [["10 1 1 1 2 0 10\n1 1\n2 1\n3 0\n4 0\n5 1\n6 1\n7 1\n8 1\n9 1\n10 1\n", "5\n"], ["10 1 1 1 2 0 10\n1 1\n2 1\n3 0\n4 0\n5 1\n6 1\n14 1\n8 1\n9 1\n10 1\n", "5\n"], ["5 1 1 1 4 0 5\n1 0\n2 1\n3 1\n4 0\n5 0\n", "-1\n"], ["1 1 2 1 2 1 2\n1 1\n", "0\n"], ["5 1 1 0 4 0 5\n1 0\n2 1\n3 1\n4 0\n5 0\n", "-1\n"], ["1 1 2 0 2 1 2... | 1 | {"source": "deepcoder/taco", "upstream_id": "taco/train-00003-of-00004.parquet#563"} |
0069bbe3002f443f | We arrange the numbers between 1 and N (1 <= N <= 10000) in increasing order and decreasing order like this:
1 2 3 4 5 6 7 8 9 . . . N
N . . . 9 8 7 6 5 4 3 2 1
Two numbers faced each other form a pair. Your task is to compute the number of pairs P such that both numbers in the pairs are prime.
Input
Input cont... | [["1\n8\n7\n51", "0\n2\n2\n6\n"], ["1\n10\n7\n51", "0\n0\n2\n6\n"], ["1\n10\n7\n65", "0\n0\n2\n12\n"], ["1\n12\n7\n115", "0\n2\n2\n12\n"], ["1\n12\n9\n115", "0\n2\n3\n12\n"], ["1\n12\n9\n15", "0\n2\n3\n4\n"], ["1\n26\n9\n15", "0\n0\n3\n4\n"], ["1\n26\n11\n15", "0\n0\n2\n4\n"], ["1\n26\n11\n20", "0\n0\n2\n2\n"], ["1\n27... | 1 | {"source": "deepcoder/taco", "upstream_id": "taco/train-00000-of-00004.parquet#1351"} |
competitive-code-curated
Competitive-programming problems graded on hidden stdin/stdout tests, curated
for verifiable RL by the reliquary-competitive-code environment
(reliquary-environments, environments/code/reliquary_competitive_code).
Python 3 only. See NOTICE for sources and licences.
Files
| file | rows |
|---|---|
problems-train.parquet |
6,899 |
problems-eval.parquet |
166 |
problems-qualification.parquet |
208 |
references.parquet |
7,273 (one passing Python 3 solution per problem) |
build_report.json |
drop counts and sha256 of the four files |
Problem columns: problem_id (16 hex), statement, tests_json
([[stdin, stdout], ...]), time_limit_s (CPU seconds), origin_json
(upstream source and row). Tests are stored in row groups and read lazily.
SFT / RL share of train
train is sorted by problem_id (the first 16 hex of a sha256 of the
normalised statement). A problem is for SFT when int(problem_id, 16) < 0x9999999999999999 (60% of the hash space), otherwise for RL, so each share is
a contiguous range of problems-train.parquet:
| use | rows of train | problems |
|---|---|---|
| SFT | [0, 4181) |
4,181 |
| RL | [4181, 6899) |
2,718 |
The rule depends only on the problem's identity: a rebuild keeps every problem on its side.
Build (2026-10-09)
From DeepCoder-Preview-Dataset @177913a7 (taco + primeintellect, 21,294
rows), 32 cores, 1 h 10 min:
| step | count |
|---|---|
| loaded | 21,294 |
| dropped: statement allows several answers | 2,180 |
| dropped: tests contradict a statement example | 388 |
| dropped: overlaps LiveCodeBench | 37 |
| problems after dedup | 8,509 |
| dropped: no passing Python 3 reference | 1,150 |
| dropped: reference too slow | 46 |
| dropped: references disagree | 35 |
| dropped: too few tests | 5 |
| curated | 7,273 (taco 5,316, primeintellect 1,957) |
Most no passing reference drops are primeintellect problems whose upstream
solutions are Python 2 (print x, raw_input).
Grading
Reward 1.0 when the program passes every test within time_limit_s CPU
seconds, else 0.0. Token-wise comparison (yes/no case-insensitive,
decimals within 1e-6). Problems with several valid answers are excluded:
there is no checker.
- Downloads last month
- 64