prompt
listlengths
1
1
label
stringlengths
0
22
domain
stringclasses
2 values
source
stringclasses
11 values
difficulty
stringclasses
6 values
metadata
unknown
idx
int64
7
9.5k
has_starter
bool
2 classes
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nA solid in the shape of a right circular cone is 4 inches tall and its base has a 3-inch radius. T...
512
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nNarut...
code
taco:hackerearth
UNKNOWN_DIFFICULTY
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"3\\n3 2 5 5\\n8 4 9\\n4 9 7 13\\n9 4 77 85\\n6 4 8 17\\n5 98 74 23 65 45\", \"output\": \"1\"}, {\"input\": \"2\\n5 2 2 5\\n1 2 3 4 5\\n5 2 2 5\\n1 2 3 4 6\", \"output\": \"13\\n5328\"}, {\"input\": \"2\\n15 1...
777
false
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nAn ar...
code
taco:hackerrank
MEDIUM
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"3\\n2 4\\n2 8\\n5 9\\n\", \"output\": \"7\\n9\\n15\\n\"}, {\"input\": \"3\\n3 5\\n4 6\\n15 20\\n\", \"output\": \"5\\n2\\n22\\n\"}], \"fn_name\": null}", "has_tests": true }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nAlice...
code
taco:kattis
HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"3\\n2 3 1\\n3 1 2\\n\", \"output\": \"2\\n\"}, {\"input\": \"6\\n5 1 6 3 2 4\\n4 6 5 1 3 2\\n\", \"output\": \"5\\n\"}, {\"input\": \"8\\n1 4 2 6 7 8 5 3\\n3 6 8 4 7 1 5 2\\n\", \"output\": \"10\\n\"}], \"fn_n...
6,106
false
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nI hav...
code
taco:aizu
UNKNOWN_DIFFICULTY
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"6 1 2 3 4 7\", \"output\": \"1\\n\"}, {\"input\": \"6 106 2 3 4 5\", \"output\": \"13\\n\"}, {\"input\": \"6 2 2 3 4 7\", \"output\": \"2\\n\"}, {\"input\": \"6 159 2 3 4 5\", \"output\": \"8\\n\"}, {\"input\"...
3,668
false
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nAt a strange party, each person knew exactly $22$ others.\n\n1. For any pair of people $X$ and $Y$...
100
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nMake ...
code
taco:codewars
EASY
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"fn\", \"cases\": [{\"input\": [12], \"output\": [15]}, {\"input\": [13], \"output\": [15]}, {\"input\": [99], \"output\": [105]}, {\"input\": [999999], \"output\": [1023459]}, {\"input\": [9999999999], \"output\": [\"There is no possible number...
1,716
true
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nAt a party, every guest is a friend of exactly fourteen other guests (not including themselves). E...
64
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nRead ...
code
taco:codechef
VERY_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"3\\n7 2\\n5 1\\n6 1\\n7 3\\n2 1\\n4 2\\n6 1\\n10 0\", \"output\": \"9\\n12\\n30\"}], \"fn_name\": null}", "has_tests": true }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nLuke,...
code
taco:codechef
MEDIUM_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"2 \\n28 6 2 \\n78 5 3\", \"output\": \"2\\n1\"}], \"fn_name\": null}", "has_tests": true }
463
false
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nGiven...
code
taco:leetcode
MEDIUM
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"fn\", \"cases\": [{\"input\": [\"\\\"croakcroak\\\"\"], \"output\": -1}], \"fn_name\": \"minNumberOfFrogs\"}", "has_tests": true }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nWhat is the value of \\(\\frac{1}{3}\\cdot\\frac{2}{4}\\cdot\\frac{3}{5}\\cdots\\frac{18}{20}\\cdo...
232
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nSanta...
code
taco:codeforces
VERY_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"1 1\\n0\\n\", \"output\": \"0\\n\"}, {\"input\": \"1 1\\n1 1\\n\", \"output\": \"0\\n\"}, {\"input\": \"4 11\\n10 1 11 4 6 9 2 3 10 5 8\\n0\\n1 3\\n9 6 5 2 9 10 4 1 7 8\\n\", \"output\": \"9\\n1 2 1\\n1 2 2\\n...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nLimak...
code
taco:codeforces
VERY_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"10 20\\n26 15 4 9 2 15 15 33 10 16\\n3 1 8 332\\n3 1 10 719\\n3 4 8 659\\n1 7\\n3 3 10 983\\n3 1 9 1087\\n3 3 7 1369\\n1 4\\n3 3 10 1448\\n1 10\\n3 2 9 1496\\n3 1 10 1335\\n1 8\\n3 5 10 2\\n3 6 10 368\\n1 3\\n...
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nIn $\\triangle ABC$, we have $AC = BC = 7$ and $AB = 2$. Suppose that $D$ is a point on line $AB$ ...
3
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nSuppose that $a, b, c$ are complex numbers satisfying the system of equations: \n\\[a^2 = b - c,\...
0
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nYou a...
code
taco:codeforces
VERY_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"1\\n1 1 1 1\\n\", \"output\": \"-1\"}, {\"input\": \"4\\n0 0 999999999 999999999\\n1 1000000000 1000000000 1000000000\\n1000000000 1 1000000000 1000000000\\n1000000000 1000000000 42 42\\n\", \"output\": \"-1\"...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nJohn ...
code
taco:codeforces
MEDIUM_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"99016\\n\", \"output\": \"87\\n011111111111111111111111111111111111111111111111111111111111111111111111111111111111111\\n101111111111111111111111111111111111111111111111111111111111111111111111111111111111111\...
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nOn circle \\(O\\), points \\(C\\) and \\(D\\) are on the same side of diameter \\(\\overline{AB}\\...
31
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nYragl...
code
taco:kattis
HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"2 2\\n1 0\\n0 1\\n3 3\\n1 0 0\\n0 1 0\\n0 0 1\\n\", \"output\": \"0 0\\n1 1\\n\"}, {\"input\": \"2 2\\n1 0\\n0 1\\n3 3\\n0 0 0\\n0 1 0\\n0 0 1\\n\", \"output\": \"1 1\\n\"}], \"fn_name\": null}", "has_tests"...
8,305
false
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nRecall that a palindrome is a number that reads the same forward and backward. Find the greatest i...
585
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nLet $C$ denote the curve $y^2 = \\frac{x(x+1)(2x+1)}{6}$. The points $(\\frac{1}{2}, a)$, $(b, c)$...
101
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nYou a...
code
taco:codechef
MEDIUM
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"2\\n2 4\\n3 3\", \"output\": \"abbbba\\nbabbab\\n-1\"}], \"fn_name\": null}", "has_tests": true }
6,093
false
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nEvery cell of a $3 \\times 3$ board is colored either red or blue. Find the number of all possible...
417
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nHow many gallons of a solution which is $15\\%$ alcohol do we have to mix with a solution that is ...
175
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nFind all prime numbers $p, q, r$ such that $\\frac{p}{q} - \\frac{4}{r+1} = 1$. Please provide the...
37
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nAaron...
code
taco:hackerrank
HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"3\\n\", \"output\": \"2.524412954\\n\"}], \"fn_name\": null}", "has_tests": true }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nThere are four even integers in the top five rows of Pascal's Triangle. How many even integers are...
22
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nDetermine the least possible value of $f(1998)$, where $f: \\mathbb{N} \\to \\mathbb{N}$ is a func...
120
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nLet $f : \\mathbb{R} \\to \\mathbb{R}$ be a function such that $f(1) = 1$ and\n\\[f(x^2 - y^2) = (...
2
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nA seq...
code
taco:codeforces
MEDIUM_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"3\\n6\\n101101\\n10\\n1001101101\\n4\\n1100\\n\", \"output\": \"YES\\n()()()\\n((()))\\nYES\\n()((()))()\\n(()((())))\\nNO\\n\"}, {\"input\": \"3\\n6\\n101101\\n10\\n1001101101\\n4\\n1100\\n\", \"output\": \"Y...
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nConsider all ordered pairs \\((a, b)\\) of positive integers such that \\(\\frac{a^2 + b^2 + 2}{ab...
52
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\n< PRE...
code
taco:codewars
EASY
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"fn\", \"cases\": [{\"input\": [3], \"output\": [\" 111 \\n 222 \\n1233321\\n1233321\\n1233321\\n 222 \\n 111 \"]}, {\"input\": [5], \"output\": [\" 11111 \\n 22222 \\n 33333 \\n 44444 \\n1234555554321\\n123455555...
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nIn a triangle, the ratio of the interior angles is $1 : 5 : 6$, and the longest side has length $1...
3
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nYou a...
code
taco:atcoder
EASY
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"3\\n\", \"output\": \"6\\n\"}, {\"input\": \"10\\n\", \"output\": \"10\\n\"}, {\"input\": \"999999999\\n\", \"output\": \"1999999998\\n\"}, {\"input\": \"1\\n\", \"output\": \"2\\n\"}, {\"input\": \"2\\n\", \"...
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nHow many ordered pairs $(a, b)$ of positive integers satisfy the equation \n\\[a\\cdot b + 63 = 20...
2
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nChef ...
code
taco:codechef
MEDIUM
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"2\\n4\\nBegin on Road A\\nRight on Road B\\nRight on Road C\\nLeft on Road D\\n6\\nBegin on Old Madras Road\\nLeft on Domlur Flyover\\nLeft on 100 Feet Road\\nRight on Sarjapur Road\\nRight on Hosur Road\\nRig...
793
false
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nSpencer is making burritos, each consisting of one wrap and one filling. He has enough filling for...
25
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nIniti...
code
taco:codeforces
MEDIUM_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"4 3\\n1 0 2 3\\n\", \"output\": \"YES\\n1 1 2 3 \\n\"}, {\"input\": \"3 10\\n10 10 10\\n\", \"output\": \"YES\\n10 10 10 \\n\"}, {\"input\": \"5 6\\n6 5 6 2 2\\n\", \"output\": \"NO\\n\"}, {\"input\": \"3 5\\n...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nAfter...
code
taco:atcoder
MEDIUM_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"3 4\\n5 1\\n10 1\\n8 0\\n1 10\\n4 5\\n6 7\\n8 9\\n\", \"output\": \"2\\n1 4\\n\"}, {\"input\": \"4 2\\n2 0\\n3 1\\n5 1\\n7 0\\n1 4\\n4 7\\n\", \"output\": \"-1\\n\"}, {\"input\": \"3 2\\n5 0\\n10 0\\n8 0\\n6 9...
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nA street has 50 houses on each side, for a total of 100 houses. The addresses on the south side of...
245
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nThe polynomial $R(x)$ is the remainder when $x^{2007}$ is divided by $x^2 - 5x + 6$. Express $R(0)...
2005
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nLet $P(z) = z^8 + \\left(4\\sqrt{3} + 6\\right)z^4 - \\left(4\\sqrt{3} + 7\\right)$. What is the m...
10
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nA rectangular box has interior dimensions 6-inches by 5-inches by 10-inches. The box is filled wit...
54
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nLet the sequence $a_{1}, a_{2}, \\ldots$ be defined recursively as follows: $a_{n} = 11a_{n-1} - n...
121
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nThe t...
code
taco:geeksforgeeks
MEDIUM
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"fn\", \"cases\": [{\"input\": \"arr[ ] = {2, 3, 4, 5}\", \"output\": \"5 2 4 3\"}, {\"input\": \"arr[ ] = {1, 1}\", \"output\": \"Not Possible\"}], \"fn_name\": \"reaching_height\"}", "has_tests": true }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nThe integers from $1$ through $9$ inclusive are placed in the squares of a $3 \\times 3$ grid. Eac...
17
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nConsider the polynomials:\n\\[ P(x) = (x + \\sqrt{2})(x^2 - 2x + 2) \\]\n\\[ Q(x) = (x - \\sqrt{2}...
0
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nDmitr...
code
taco:codeforces
MEDIUM_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"5\\n3\\n0 1 3\\n7\\n0 1 2 3 4 3 2\\n4\\n3 0 0 0\\n7\\n4 6 2 3 5 0 5\\n5\\n4 0 1 0 4\\n\", \"output\": \"1 1 0 -1 \\n1 1 2 2 1 0 2 6 \\n3 0 1 4 3 \\n1 0 -1 -1 -1 -1 -1 -1 \\n2 1 0 2 -1 -1 \\n\"}, {\"input\": \"...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nThere...
code
taco:codeforces
HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"1\\n3 31\\n############################..#\\n.............................L.\\n############################..#\\n\", \"output\": \"############################++#\\n+++++++++++++++++++++++++++++L+\\n##########...
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nWill and Lucas are playing a game. Will claims that he has a polynomial $f$ with integer coefficie...
289
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nThere...
code
taco:atcoder
EASY
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"4\\n2 10 8 40\\n\", \"output\": \"2\\n\"}, {\"input\": \"4\\n5 13 8 1000000000\\n\", \"output\": \"1\\n\"}, {\"input\": \"3\\n1000000000 1000000000 1000000000\\n\", \"output\": \"1000000000\\n\"}, {\"input\": ...
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nLet the three sides of a triangle be $\\ell, m, n$, respectively, satisfying $\\ell > m > n$ and $...
3003
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nWhat is the sum of the units digits of all the multiples of $3$ between $0$ and $50$?\n\nRemember ...
78
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nOn equilateral $\\triangle{ABC}$, point D lies on BC a distance 1 from B, point E lies on AC a dis...
30
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nThe a...
code
taco:codeforces
HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"2\\n0 40 100 100\\n60 0 40 40\\n0 60 0 45\\n0 60 55 0\\n\", \"output\": \"1.75\\n\"}, {\"input\": \"3\\n0 0 100 0 100 0 0 0\\n100 0 100 0 0 0 100 100\\n0 0 0 100 100 0 0 0\\n100 100 0 0 0 0 100 100\\n0 100 0 1...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nHavin...
code
taco:codeforces
VERY_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"19 9\\nWWWWBWWBW\\nWBWBWBBWB\\nWWBBWWWBB\\nWWBWWWBWW\\nBWBWBWWWW\\nBBBBWBWWB\\nWWWBBBWBW\\nBWWWBWWWB\\nBBBBWWBWW\\nWWWBBBBBB\\nWBWBWBWWW\\nWBBWWWWBB\\nWWBBWBWWB\\nBBWBBBBWB\\nWBWBBWWWB\\nBWBWWBWBW\\nWWBBBWWBW\...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nThe m...
code
taco:codeforces
VERY_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"1 1\\n0\\n0\\n1 1\\n\", \"output\": \" 0\\n\"}, {\"input\": \"1 1\\n0\\n2\\n1 1\\n\", \"output\": \" ...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nYou m...
code
taco:kattis
HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"SEND+MORE=MONEY\\n\", \"output\": \"9567+1085=10652\\n\"}, {\"input\": \"A+A=A\\n\", \"output\": \"impossible\\n\"}, {\"input\": \"C+B=A\\n\", \"output\": \"2+1=3\\n\"}], \"fn_name\": null}", "has_tests": tr...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nSuppo...
code
taco:codeforces
HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"101\\n\", \"output\": \"101\\n0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nArthu...
code
taco:hackerrank
MEDIUM
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"12\\n\", \"output\": \"3\\n\"}], \"fn_name\": null}", "has_tests": true }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nTwo boards, one four inches wide and the other six inches wide, are nailed together to form an X. ...
19
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nOn a ...
code
taco:kattis
HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"4\\n1 4\\n3 7\\n1 6\\n2 6\\n\", \"output\": \"0\\n1\\n1\\n2\\n\"}, {\"input\": \"5\\n1 3\\n3 5\\n3 9\\n2 4\\n3 8\\n\", \"output\": \"0\\n0\\n0\\n3\\n2\\n\"}], \"fn_name\": null}", "has_tests": true }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nAna, Beatriz, Carlos, Diego, and Emilia play a chess tournament. Each player faces each of the oth...
4
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nEudok...
code
taco:codeforces
MEDIUM
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"ph..qlr.pt\\n\", \"output\": \"NO\\n\"}, {\"input\": \"aa.aa.aaaabbbbccc.ddd.ee\\n\", \"output\": \"YES\\naa.a\\na.aaa\\nabbbbccc.d\\ndd.ee\\n\"}, {\"input\": \"akymwh\\n\", \"output\": \"NO\\n\"}, {\"input\":...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nAfter...
code
taco:codeforces
VERY_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"10 5\\n7\\n7 9\\n3 4\\n5 10\\n1 5\\n3 8\\n4 8\\n2 7\\n10\\n8 10\\n6 9\\n5 10\\n2 3\\n5 6\\n8 8\\n3 5\\n5 7\\n6 6\\n7 9\\n\", \"output\": \"3\\n3\\n4\\n2\\n2\\n1\\n2\\n3\\n1\\n2\\n\"}, {\"input\": \"10 5\\n35\\...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nYou a...
code
taco:codeforces
VERY_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"4 1\\n0 0\\n1 0\\n0 1\\n1 1\\n\", \"output\": \"0 -1\\n0 1\\n2 1\\n\"}, {\"input\": \"18 13922\\n-71 6\\n-15 54\\n11 73\\n-99 -82\\n10 -98\\n81 -28\\n8 -70\\n8 24\\n-19 8\\n20 -70\\n31 5\\n-28 -90\\n-50 58\\n1...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nYou a...
code
taco:hackerrank
MEDIUM
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"10\\n1010\\n\", \"output\": \"489429555\\n\"}], \"fn_name\": null}", "has_tests": true }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nPolyc...
code
taco:codeforces
MEDIUM_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"3\\n3 2\\n1 2 1\\n2 3 1\\n5 7\\n3 2 7\\n3 4 9\\n1 5 5\\n1 2 5\\n4 1 5\\n4 2 7\\n3 1 5\\n4 4\\n1 2 5\\n3 2 2\\n4 1 3\\n3 4 4\\n\", \"output\": \"YES\\n1 1 1\\nYES\\n5 7 9 9 5\\nNO\\n\"}], \"fn_name\": null}", ...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nLet's...
code
taco:codeforces
EASY
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"5\\n1\\n1\\n2\\n01\\n3\\n100\\n4\\n1001\\n5\\n11111\\n\", \"output\": \"1\\n3\\n4\\n8\\n5\\n\"}], \"fn_name\": null}", "has_tests": true }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nIn Occidentalia, there are $20$ different companies, each looking to hire $15$ new employees. A gr...
20
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nFor each integer $1 \\le j \\le 2017$, let $S_j$ denote the set of integers $0 \\le i \\le 2^{2017...
1840
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\n# Cha...
code
taco:codewars
EASY
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"fn\", \"cases\": [{\"input\": [\"2*3*4*5+99\"], \"output\": [\"219\"]}], \"fn_name\": \"e\"}", "has_tests": true }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nSuppose that $x, y, z$ are non-zero real numbers such that:\n\\[\n\\begin{cases}\n x = 2 - \\dfra...
3
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nThere...
code
taco:hackerrank
MEDIUM_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"7\\naab\\ndefgab\\nabcde\\naabcde\\ncedaaa\\nbbbbbbbbbb\\njabjjjad\", \"output\": \"BAD SET\\naabcde\"}, {\"input\": \"4\\naab\\naac\\naacghgh\\naabghgh\\n\", \"output\": \"BAD SET\\naacghgh\"}], \"fn_name\": ...
1,431
false
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nFind the number of distinct values obtained from the expression:\n\n$$ \\frac{n^2 - 2}{n^2 - n + 2...
98
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nCaptain Rusczyk tracked down a pirate who had stolen $2345_{6}$ dollars worth of goods from his sh...
2145
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nConsidering all numbers of the form $n = \\left\\lfloor \\frac{k^3}{2012} \\right\\rfloor$, where ...
1995
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nYou r...
code
taco:codeforces
VERY_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"Ukraine\\n* Friday the 13th\\n* black cat\\n* knock the wood\\nUSA\\n* wishing well\\n* friday the 13th\\nHolland\\nFrance\\n* Wishing Well\\n\", \"output\": \"friday the 13th \\nwishing well \\n\"},...
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nIf you multiply all positive integer factors of $24$, you get $24^x$. Find $x$.\n\nRemember to put...
4
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nAfter...
code
taco:codeforces
HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"3\\n000\\n000\\n000\\n\", \"output\": \"0\\n\"}, {\"input\": \"10\\n1111100000\\n0010100000\\n0110111000\\n0000001000\\n1011001010\\n0010100001\\n0010111000\\n0011001010\\n0000110010\\n0000001100\\n\", \"outpu...
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nFind the sum of the real roots of $f(x) = x^4 + 9x^3 + 18x^2 + 18x + 4$.\n\nRemember to put your a...
-7
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nGiven...
code
taco:hackerearth
HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"12 6\\n3 4 1 1 1 6 \\n1 4 4 5 6 2 \\n6 2 3 6 7 7 \\n1 7 3 3 3 3 \\n5 5 4 1 1 1 \\n5 3 4 3 4 3 \\n1 4 6 2 6 2 \\n3 5 3 3 1 3 \\n3 1 7 5 1 7 \\n5 6 4 7 6 4 \\n7 2 7 3 4 1 \\n5 5 2 2 4 7 \\n3 7 2 4 2 2 \\n4 2 7 3...
9,133
false
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nTaotao wants to buy a bracelet. The bracelets have 7 different beads on them, arranged in a circle...
198
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nGiven...
code
taco:codechef
UNKNOWN_DIFFICULTY
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"2\\n3\\n1 4 5\\n7\\n99 7 9 102 103 16 17\", \"output\": \"1\\n4\\n\"}, {\"input\": \"2\\n3\\n1 4 5\\n7\\n99 13 5 62 103 16 17\", \"output\": \"1\\n5\\n\"}, {\"input\": \"2\\n3\\n0 4 5\\n7\\n36 13 5 62 103 16 2...
757
false
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nTriangle $ABC^{}_{}$ has $AB=9^{}_{}$ and $BC: AC=40: 41^{}_{}$. What's the largest area that this...
820
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nDream...
code
taco:codeforces
VERY_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"1\\n\", \"output\": \"1\\n2\\n\"}, {\"input\": \"1100011110111111111110110001111101110111001100011001101\\n\", \"output\": \" 1624\\n ...
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nLet $ABC$ be an equilateral triangle with side length $10$. A square $PQRS$ is inscribed in it, wi...
10
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nSerej...
code
taco:codeforces
HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"5 5 2\\n1 1 1 1 1\\n1 1 1 1 1\\n1 1 0 1 1\\n1 1 1 1 1\\n1 1 1 1 1\\n\", \"output\": \"1\\n\"}, {\"input\": \"3 4 1\\n1 0 0 0\\n0 1 1 1\\n1 1 1 0\\n\", \"output\": \"-1\\n\"}, {\"input\": \"3 4 1\\n1 0 0 1\\n0 ...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nEhsan...
code
taco:codeforces
MEDIUM
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"90\\n1 1\\n\", \"output\": \"-1.00000000 1.00000000\\n\"}, {\"input\": \"180\\n1 1390\\n\", \"output\": \"-1.00000000 -1390.00000000\\n\"}], \"fn_name\": null}", "has_tests": true }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nAfter...
code
taco:codeforces
EASY
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"1\\n1\\n\", \"output\": \"1\\n1\"}, {\"input\": \"2\\n10\\n\", \"output\": \"2\\n1 0\"}, {\"input\": \"6\\n100011\\n\", \"output\": \"2\\n10001 1\"}, {\"input\": \"4\\n0101\\n\", \"output\": \"2\\n010 1\"}, {\...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\n# Def...
code
taco:codewars
EASY
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"fn\", \"cases\": [{\"input\": [1], \"output\": [\"Automorphic\"]}, {\"input\": [3], \"output\": [\"Not!!\"]}, {\"input\": [6], \"output\": [\"Automorphic\"]}, {\"input\": [9], \"output\": [\"Not!!\"]}, {\"input\": [25], \"output\": [\"Automorph...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nMr. G...
code
taco:geeksforgeeks
EASY
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"fn\", \"cases\": [{\"input\": \"N=4, M=3\\r\\nA[] = {-6, 0, 35, 4}\", \"output\": \"6\"}, {\"input\": \"N=5, M=10\\r\\nA[] = {1, -2, -3, -4, 5}\", \"output\": \"9\"}], \"fn_name\": \"maxProfit\"}", "has_tests": true }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nMary is about to pay for five items at the grocery store. The prices of the items are $7.99, $4.99...
5
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nThere are $10^{2015}$ planets in an Intergalactic empire. Every two planets are connected by a two...
1007
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nFind the greatest integer which doesn't exceed $\\frac{3^{100}+2^{100}}{3^{96}+2^{96}}$. \n\n(A) $...
80
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nHow many integers $N$ less than $1000$ can be written as the sum of $j$ consecutive positive odd i...
15
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\nA sequence of numbers is defined recursively by $a_1 = 1$, $a_2 = \\frac{3}{7}$, and\n\\[a_n=\\fra...
8078
math
dapo-17k
null
{ "domain": "math", "rm_type": "dapo" }
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nIt wa...
code
taco:codeforces
MEDIUM_HARD
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"6\\n2 1 5 2 7 4\\n\", \"output\": \"YES\\n2 3 1 6 \"}, {\"input\": \"5\\n1 3 1 9 20\\n\", \"output\": \"NO\"}, {\"input\": \"4\\n2 2 1 3\\n\", \"output\": \"YES\\n3 4 1 2 \"}, {\"input\": \"58\\n3364 3365 3308...
null
null
[ { "role": "user", "content": "You are given a competitive programming problem. Think step by step, then provide a single complete Python program in a ```python code block. If a starter code / function signature is given, implement it; otherwise read from standard input and write to standard output.\n\nAquaM...
code
taco:codeforces
MEDIUM
{ "domain": "code", "rm_type": "code_sandbox", "tests": "{\"type\": \"stdin\", \"cases\": [{\"input\": \"1\\n64\\n8 7 7 2 4 9 3 7 9 4 7 10 6 7 6 4 9 9 10 2 2 2 10 3 8 9 3 1 5 10 6 5 7 4 3 5 7 10 7 5 8 4 5 7 10 7 10 8 2 3 8 10 1 3 8 3 9 2 9 2 5 10 5 5\\n\", \"output\": \"NO\\n\"}, {\"input\": \"1\\n2\\n4 3\\n\", \...
null
null