Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Data processing error: I/O error: Permission denied (os error 13)
Error code:   UnexpectedError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

problem
string
deepseek_reasoning
string
deepseek_solution
string
ground_truth_solution
string
domain
string
source
string
test_cases
string
starter_code
string
final_reasoning_trace
string
conversations
list
The Chef likes to stay in touch with his staff. So, the Chef, the head server, and the sous-chef all carry two-way transceivers so they can stay in constant contact. Of course, these transceivers have a limited range so if two are too far apart, they cannot communicate directly. The Chef invested in top-of-the-line t...
Okay, let's see. I need to solve this problem where three people (Chef, head server, sous-chef) have transceivers that can communicate directly if within R meters. If not, but there's a third person acting as a bridge, then they can still communicate. The goal is to check if all three can communicate with each other, p...
To solve this problem, we need to determine if three people (Chef, head server, and sous-chef) can communicate with each other using transceivers that have a limited range. Communication can be direct if they are within the range or indirect via another person acting as an intermediary. ### Approach 1. **Input Reading...
null
code
code_contests
{"inputs": ["3\n1\n0 1\n0 0\n1 0\n2\n0 1\n0 0\n1 0\n2\n0 0\n0 2\n2 1", "3\n1\n0 1\n0 -1\n1 0\n2\n0 1\n0 0\n1 0\n2\n0 0\n0 2\n2 1", "3\n2\n0 1\n0 -1\n1 0\n2\n0 1\n0 0\n1 0\n2\n0 0\n0 2\n2 1", "3\n2\n0 -1\n0 -1\n1 0\n2\n0 0\n0 0\n1 0\n2\n1 0\n1 2\n2 1", "3\n2\n0 -1\n-1 -1\n2 0\n2\n1 0\n0 -1\n1 -1\n2\n1 0\n1 2\n1 1", "3\n...
<think> Okay, let's see. I need to solve this problem where three people (Chef, head server, sous-chef) have transceivers that can communicate directly if within R meters. If not, but there's a third person acting as a bridge, then they can still communicate. The goal is to check if all three can communicate with each ...
[ { "from": "human", "value": "The Chef likes to stay in touch with his staff. So, the Chef, the head server, and the sous-chef all carry two-way transceivers so they can stay in constant contact. Of course, these transceivers have a limited range so if two are too far apart, they cannot communicate directly....
Frank explained its friend Felman the algorithm of Euclides to calculate the GCD of two numbers. Then Felman implements it algorithm int gcd(int a, int b) { if (b==0) return a; else return gcd(b,a%b); } and it proposes to Frank that makes it but with a little integer and another integer that has up to 250 d...
Okay, let's tackle this problem. So the task is to compute the GCD of two numbers, A and B. But here's the catch: A is a regular integer (up to 40000), but B can be a very large number with up to 250 digits. The standard Euclidean algorithm uses modulo operations, but when B is that big, we can't compute B mod A direct...
To solve this problem, we need to compute the Greatest Common Divisor (GCD) of two numbers, A and B, where A is a small integer (up to 40000) and B can be a very large number with up to 250 digits. The challenge is to efficiently compute the GCD given the constraints on the size of B. ### Approach 1. **Input Handling*...
null
code
code_contests
{"inputs": ["2\n2 6\n10 11", "2\n3 6\n10 11", "2\n1 3\n10 11", "2\n0 6\n10 11", "2\n0 6\n0 11", "2\n3 6\n8 22", "2\n3 6\n8 4", "2\n5 2\n10 2", "2\n4 10\n8 6", "2\n7 14\n8 6", "2\n7 14\n8 4", "2\n2 6\n5 2", "2\n0 14\n16 2", "2\n0 11\n10 1", "2\n0 14\n16 1", "2\n1 3\n10 5", "2\n0 12\n0 11", "2\n3 8\n8 4", "2\n0 5\n8 6", ...
<think> Okay, let's tackle this problem. So the task is to compute the GCD of two numbers, A and B. But here's the catch: A is a regular integer (up to 40000), but B can be a very large number with up to 250 digits. The standard Euclidean algorithm uses modulo operations, but when B is that big, we can't compute B mod ...
[ { "from": "human", "value": "Frank explained its friend Felman the algorithm of Euclides to calculate the GCD \nof two numbers. Then Felman implements it algorithm \n\n\nint gcd(int a, int b)\n{\n\tif (b==0)\n\t\treturn a;\n\telse\n\t\treturn gcd(b,a%b);\n}\n\nand it proposes to Frank that makes it \nbut wi...
"A Little Elephant from the Zoo of Lviv likes lucky strings, i.e., the strings that consist only of (...TRUNCATED)
"Okay, I need to solve this problem where I have to find the number of balanced substrings in a give(...TRUNCATED)
"To solve this problem, we need to determine the number of balanced substrings in a given string of (...TRUNCATED)
null
code
code_contests
"{\"inputs\": [\"4\\n47\\n74\\n477\\n4747477\", \"4\\n47\\n47\\n477\\n4747477\", \"4\\n7\\n47\\n477\(...TRUNCATED)
"<think>\nOkay, I need to solve this problem where I have to find the number of balanced substrings (...TRUNCATED)
[{"from":"human","value":"A Little Elephant from the Zoo of Lviv likes lucky strings, i.e., the stri(...TRUNCATED)
"Given a string s. Can you make it a palindrome by deleting exactly one character? Note that size of(...TRUNCATED)
"Okay, I need to solve this problem where for each given string, I have to determine if deleting exa(...TRUNCATED)
"To solve this problem, we need to determine if we can make a given string a palindrome by deleting (...TRUNCATED)
null
code
code_contests
"{\"inputs\": [\"4\\naaa\\nabc\\nabdbca\\nabba\", \"4\\naaa\\nabc\\nabdbca\\nabca\", \"4\\naaa\\nabc(...TRUNCATED)
"<think>\nOkay, I need to solve this problem where for each given string, I have to determine if del(...TRUNCATED)
[{"from":"human","value":"Given a string s. Can you make it a palindrome by deleting exactly one cha(...TRUNCATED)
"An established group of scientists are working on finding solution to NP hard problems. They claim (...TRUNCATED)
"Okay, I need to solve this subset sum problem. Let's think about how to approach it. The problem st(...TRUNCATED)
"To solve this problem, we need to determine if there exists a subset of a given set of non-negative(...TRUNCATED)
null
code
code_contests
{"inputs": ["2\n5 10\n3 4 6 1 9\n3 2\n1 3 4"], "outputs": ["1\n0"]}
"<think>\nOkay, I need to solve this subset sum problem. Let's think about how to approach it. The p(...TRUNCATED)
[{"from":"human","value":"An established group of scientists are working on finding solution to NP h(...TRUNCATED)
"Let's call a string a phone number if it has length 11 and fits the pattern \"8xxxxxxxxxx\", where (...TRUNCATED)
"Okay, let's see. The problem is about determining the maximum number of phone numbers we can create(...TRUNCATED)
"To solve this problem, we need to determine the maximum number of valid phone numbers that can be f(...TRUNCATED)
null
code
code_contests
"{\"inputs\": [\"22\\n0011223344556677889988\\n\", \"11\\n00000000008\\n\", \"11\\n31415926535\\n\",(...TRUNCATED)
"<think>\nOkay, let's see. The problem is about determining the maximum number of phone numbers we c(...TRUNCATED)
[{"from":"human","value":"Let's call a string a phone number if it has length 11 and fits the patter(...TRUNCATED)
"You are given q queries in the following form:\n\nGiven three integers l_i, r_i and d_i, find minim(...TRUNCATED)
"Okay, let's see. I need to solve this problem where for each query with l, r, d, I have to find the(...TRUNCATED)
"To solve this problem, we need to determine the smallest positive integer \\( x \\) that is divisib(...TRUNCATED)
null
code
code_contests
"{\"inputs\": [\"5\\n2 4 2\\n5 10 4\\n3 10 1\\n1 2 3\\n4 6 5\\n\", \"20\\n1 1000000000 2\\n1 1000000(...TRUNCATED)
"<think>\nOkay, let's see. I need to solve this problem where for each query with l, r, d, I have to(...TRUNCATED)
[{"from":"human","value":"You are given q queries in the following form:\n\nGiven three integers l_i(...TRUNCATED)
"An array of integers p_{1},p_{2}, …,p_{n} is called a permutation if it contains each number from(...TRUNCATED)
"Okay, I need to solve this problem where given the array s, I have to restore the original permutat(...TRUNCATED)
"To solve this problem, we need to reconstruct a permutation of integers from 1 to n given an array (...TRUNCATED)
null
code
code_contests
"{\"inputs\": [\"3\\n0 0 0\\n\", \"5\\n0 1 1 1 10\\n\", \"2\\n0 1\\n\", \"100\\n0 0 57 121 57 0 19 2(...TRUNCATED)
"<think>\nOkay, I need to solve this problem where given the array s, I have to restore the original(...TRUNCATED)
[{"from":"human","value":"An array of integers p_{1},p_{2}, …,p_{n} is called a permutation if it (...TRUNCATED)
"This is the easier version of the problem. In this version 1 ≤ n, m ≤ 100. You can hack this pr(...TRUNCATED)
"Okay, let's try to figure out how to solve this problem. So, the task is, given a sequence of integ(...TRUNCATED)
"To solve this problem, we need to determine the optimal subsequence of a given length for each quer(...TRUNCATED)
null
code
code_contests
"{\"inputs\": [\"3\\n10 20 10\\n6\\n1 1\\n2 1\\n2 2\\n3 1\\n3 2\\n3 3\\n\", \"7\\n1 2 1 3 1 2 1\\n9\(...TRUNCATED)
"<think>\nOkay, let's try to figure out how to solve this problem. So, the task is, given a sequence(...TRUNCATED)
[{"from":"human","value":"This is the easier version of the problem. In this version 1 ≤ n, m ≤ (...TRUNCATED)
"There are n points on a coordinate axis OX. The i-th point is located at the integer point x_i and (...TRUNCATED)
"Okay, let's try to figure out how to solve this problem. The task is to compute the sum of the mini(...TRUNCATED)
"To solve this problem, we need to compute the sum of the minimum possible distances between all pai(...TRUNCATED)
null
code
code_contests
"{\"inputs\": [\"3\\n1 3 2\\n-100 2 3\\n\", \"2\\n2 1\\n-3 0\\n\", \"5\\n2 1 4 3 5\\n2 2 2 3 4\\n\",(...TRUNCATED)
"<think>\nOkay, let's try to figure out how to solve this problem. The task is to compute the sum of(...TRUNCATED)
[{"from":"human","value":"There are n points on a coordinate axis OX. The i-th point is located at t(...TRUNCATED)
End of preview.
README.md exists but content is empty.
Downloads last month
5