Dataset Viewer
Auto-converted to Parquet Duplicate
problem_id
stringlengths
32
32
name
stringlengths
2
112
problem
stringlengths
200
14k
test_cases
stringlengths
33
74M
difficulty
stringclasses
33 values
language
sequencelengths
1
1
source
stringclasses
14 values
num_solutions
int64
2
1.12M
starter_code
stringlengths
0
956
subset
stringclasses
3 values
reasoning
stringlengths
1.09k
133k
deepseek_solution
stringlengths
60
15k
correctness
bool
2 classes
reason
stringclasses
3 values
reasoning_tokens
int64
266
92.3k
solution_tokens
int64
16
3.76k
total_tokens
int64
492
93k
problem_tokens
int64
37
13.6k
conversations
listlengths
2
2
system
stringclasses
1 value
formatted_text
stringlengths
2.6k
139k
total_templated_tokens
int64
585
93.1k
34c570004ec7795aaadb7d0ef147acd6
brcktsrm
Problem description. Vipul is a hardworking super-hero who maintains the bracket ratio of all the strings in the world. Recently he indulged himself in saving the string population so much that he lost his ability for checking brackets (luckily, not permanently ).Being his super-hero friend help him in his time of hard...
{"inputs": ["3\n((()))\n(())()\n()(()", "3\n((()))\n(())()\n()())", "3\n((()()\n(())()\n()(()", "3\n((()))\n(())))\n()())", "3\n)))(((\n(())))\n()())", "3\n((()))\n(())()\n))(((", "3\n((()()\n(())()\n()(((", "3\n((()))\n(())()\n()()(", "3\n((()()\n'())()\n()(((", "3\n)))(((\n(())))\n()(*)", "3\n)(()()\n'())()\n()(((", ...
6
[ "PYTHON3" ]
1
2
code_contests
Okay, I need to solve this problem where I have to check if the brackets in a string are balanced. Let's see. The problem says to output YES if the brackets are balanced and NO otherwise. Hmm. So what's a balanced bracket string? Well, I remember that a balanced string requires that every opening bracket has a corresp...
To solve this problem, we need to determine if the brackets in a given string are balanced. A string is considered balanced if every opening bracket '(' has a corresponding closing bracket ')' in the correct order. ### Approach The approach to solve this problem involves using a counter to track the balance of bracket...
false
Code is incorrect.
2,766
489
3,466
211
[ { "content": "Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Problem description.\nVipul is a hardworking super-hero who maintains the bracket ratio of all the strings in the worl...
Your role as an assistant involves thoroughly exploring questions through a systematic long thinking process before providing the final precise and accurate solutions. This requires engaging in a comprehensive cycle of analysis, summarizing, exploration, reassessment, reflection, backtracing, and iteration to develop w...
<|im_start|>system You are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|> <|im_start|>user Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.Problem description. Vipu...
3,558
ef0bd132d1ee833bb59308942bab8a9c
comm3
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...
{"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...
1
[ "PYTHON3" ]
1
2
code_contests
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...
true
5,695
626
6,782
461
[ { "content": "Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.The Chef likes to stay in touch with his staff. So, the Chef, the head server, and the sous-chef all carry two-way tra...
Your role as an assistant involves thoroughly exploring questions through a systematic long thinking process before providing the final precise and accurate solutions. This requires engaging in a comprehensive cycle of analysis, summarizing, exploration, reassessment, reflection, backtracing, and iteration to develop w...
<|im_start|>system You are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|> <|im_start|>user Generate an executable Python function generated from the given prompt. The function should take stdin as input and print the output. Simply call the function after the definition.The Chef likes to stay in...
6,874
749440f73d213d141ea3e1da803f6198
gcd2
"Frank explained its friend Felman the algorithm of Euclides to calculate the GCD \nof two numbers. (...TRUNCATED)
"{\"inputs\": [\"2\\n2 6\\n10 11\", \"2\\n3 6\\n10 11\", \"2\\n1 3\\n10 11\", \"2\\n0 6\\n10 11\", \(...TRUNCATED)
2
[ "PYTHON3" ]
1
2
code_contests
"Okay, let's tackle this problem. So the task is to compute the GCD of two numbers, A and B. But her(...TRUNCATED)
"To solve this problem, we need to compute the Greatest Common Divisor (GCD) of two numbers, A and B(...TRUNCATED)
true
3,805
571
4,578
202
[{"content":"Generate an executable Python function generated from the given prompt. The function sh(...TRUNCATED)
"Your role as an assistant involves thoroughly exploring questions through a systematic long thinkin(...TRUNCATED)
"<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\(...TRUNCATED)
4,671
653443722527be14f1ea12ffbd80a3f3
luckybal
"A Little Elephant from the Zoo of Lviv likes lucky strings, i.e., the strings that consist only of (...TRUNCATED)
"{\"inputs\": [\"4\\n47\\n74\\n477\\n4747477\", \"4\\n47\\n47\\n477\\n4747477\", \"4\\n7\\n47\\n477\(...TRUNCATED)
2
[ "PYTHON3" ]
1
2
code_contests
"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)
true
12,333
774
13,695
588
[{"content":"Generate an executable Python function generated from the given prompt. The function sh(...TRUNCATED)
"Your role as an assistant involves thoroughly exploring questions through a systematic long thinkin(...TRUNCATED)
"<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\(...TRUNCATED)
13,786
713702cb48591218c127ac8b5855b911
prpaln
"Given a string s. Can you make it a palindrome by deleting exactly one character? Note that size of(...TRUNCATED)
"{\"inputs\": [\"4\\naaa\\nabc\\nabdbca\\nabba\", \"4\\naaa\\nabc\\nabdbca\\nabca\", \"4\\naaa\\nabc(...TRUNCATED)
2
[ "PYTHON3" ]
1
2
code_contests
"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)
true
8,091
549
8,845
205
[{"content":"Generate an executable Python function generated from the given prompt. The function sh(...TRUNCATED)
"Your role as an assistant involves thoroughly exploring questions through a systematic long thinkin(...TRUNCATED)
"<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\(...TRUNCATED)
8,937
91659162144fae7c6e65f91d02379043
tf01
"An established group of scientists are working on finding solution to NP hard problems. They claim (...TRUNCATED)
{"inputs": ["2\n5 10\n3 4 6 1 9\n3 2\n1 3 4"], "outputs": ["1\n0"]}
6
[ "PYTHON3" ]
1
2
code_contests
"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)
true
8,983
681
9,917
253
[{"content":"Generate an executable Python function generated from the given prompt. The function sh(...TRUNCATED)
"Your role as an assistant involves thoroughly exploring questions through a systematic long thinkin(...TRUNCATED)
"<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\(...TRUNCATED)
10,009
78e09093cc14a9153fa66da7dded8afd
1012_E. Cycle sort
"You are given an array of n positive integers a_1, a_2, ..., a_n. You can perform the following ope(...TRUNCATED)
"{\"inputs\": [\"5 5\\n3 2 3 1 1\\n\", \"4 3\\n2 1 4 3\\n\", \"2 0\\n2 2\\n\", \"5 0\\n884430748 884(...TRUNCATED)
11
[ "PYTHON3" ]
2
2
code_contests
"Okay, let's see. So the problem is about sorting an array using cyclic shifts with the minimal numb(...TRUNCATED)
"To solve this problem, we need to sort an array using cyclic shifts with the minimum number of oper(...TRUNCATED)
false
Code is incorrect.
15,410
935
17,167
822
[{"content":"Generate an executable Python function generated from the given prompt. The function sh(...TRUNCATED)
"Your role as an assistant involves thoroughly exploring questions through a systematic long thinkin(...TRUNCATED)
"<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\(...TRUNCATED)
17,258
2134415ced87b8fc2bce4549a0aeef7a
1037_E. Trips
"There are n persons who initially don't know each other. On each morning, two of them, who were not(...TRUNCATED)
"{\"inputs\": [\"4 4 2\\n2 3\\n1 2\\n1 3\\n1 4\\n\", \"5 8 2\\n2 1\\n4 2\\n5 4\\n5 2\\n4 3\\n5 1\\n4(...TRUNCATED)
11
[ "PYTHON3" ]
2
2
code_contests
"Okay, I need to solve this programming problem. Let's read the problem carefully.\n\nSo, the proble(...TRUNCATED)
"To solve this problem, we need to determine the maximum number of people that can go on a trip each(...TRUNCATED)
false
Code is incorrect.
15,687
741
17,049
621
[{"content":"Generate an executable Python function generated from the given prompt. The function sh(...TRUNCATED)
"Your role as an assistant involves thoroughly exploring questions through a systematic long thinkin(...TRUNCATED)
"<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\(...TRUNCATED)
17,140
0df7a8f97f44a05d3e4d8a030305533f
1060_A. Phone Numbers
"Let's call a string a phone number if it has length 11 and fits the pattern \"8xxxxxxxxxx\", where (...TRUNCATED)
"{\"inputs\": [\"22\\n0011223344556677889988\\n\", \"11\\n00000000008\\n\", \"11\\n31415926535\\n\",(...TRUNCATED)
7
[ "PYTHON3" ]
2
2
code_contests
"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)
true
2,050
440
2,923
433
[{"content":"Generate an executable Python function generated from the given prompt. The function sh(...TRUNCATED)
"Your role as an assistant involves thoroughly exploring questions through a systematic long thinkin(...TRUNCATED)
"<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\(...TRUNCATED)
3,015
c43bbddcd6fcd849ac321f690995ea54
1081_G. Mergesort Strikes Back
"Chouti thought about his very first days in competitive programming. When he had just learned to wr(...TRUNCATED)
"{\"inputs\": [\"3 2 998244353\\n\", \"9 3 998244353\\n\", \"3 1 998244353\\n\", \"9 4 998244353\\n\(...TRUNCATED)
13
[ "PYTHON3" ]
2
2
code_contests
"Okay, let's see. The problem is to compute the expected number of inversions after running this mod(...TRUNCATED)
"To solve this problem, we need to compute the expected number of inversions after running a modifie(...TRUNCATED)
false
Code is incorrect.
24,785
691
26,148
672
[{"content":"Generate an executable Python function generated from the given prompt. The function sh(...TRUNCATED)
"Your role as an assistant involves thoroughly exploring questions through a systematic long thinkin(...TRUNCATED)
"<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\(...TRUNCATED)
26,239
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
7