Dataset Viewer
Auto-converted to Parquet Duplicate
question_title
stringlengths
3
34
question_content
stringlengths
713
3.03k
platform
stringclasses
1 value
question_id
stringlengths
12
45
contest_id
stringlengths
10
10
contest_date
timestamp[s]date
1011-01-01 00:00:00
2098-01-01 00:00:00
starter_code
stringclasses
1 value
difficulty
stringclasses
3 values
public_test_cases
stringlengths
160
7.6M
private_test_cases
stringlengths
172
35.8M
metadata
stringlengths
86
121
Good Bitstrings
For any two positive integers $a$ and $b$, define the function $\texttt{gen_string}(a,b)$ by the following Python code: def gen_string(a: int, b: int): res = "" ia, ib = 0, 0 while ia + ib < a + b: if ia * b <= ib * a: res += '0' ia += 1 else: res += '1' ib += 1 return res Equivalent C++ code: ...
codeforces
1333_platinum_good_bitstrings
usaco_1333
1333-01-01T00:00:00
# Read input and solve the problem
hard
[{"input": "6\n1 1\n3 5\n4 7\n8 20\n4 10\n27 21", "output": "1\n5\n7\n10\n6\n13", "testtype": "stdin"}, {"input": "10\n85 13\n71 66\n28 66\n29 71\n96 63\n38 31\n17 68\n36 58\n36 4\n63 33", "output": "20\n32\n12\n15\n27\n16\n36\n12\n15\n17", "testtype": "stdin"}, {"input": "10\n906 527\n608 244\n263 174\n839 281\n153 49...
eJyNmU2OrEcRRRmwDaRUjy2U/5nBSpBoZnjgSWPJ7YGFkFgEbI8Z++CcqPbgFUIqW++97vp+MjPixr03ov7x23/953e/yf/++G9++NPf3n74+PHnz7c/lLdW3z/aPLevclZfdbx/xK5ntrJab/W+f9xxopbbekR//xj9rrlKu2fXzaO3n9XKnaft4N52Yw9unrF406k7Zi3r3haTF/NPzHL3qfO8f/R5W+Xme+rlVau22XoZ9bR1374rb3/9+fNrk5dtbP+wgba49/Bnzu0refDr6q0+9fn9T5+fv/z4vc/99PmXHz7e/v5deTrwZoN1...
{"problem_level": "platinum", "contest_year": 1333, "original_problem_id": "1333_platinum_good_bitstrings"}
Pareidolia
"\nPareidolia is the phenomenon where your eyes tend to see familiar patterns in\nimages where none (...TRUNCATED)
codeforces
1330_gold_pareidolia
usaco_1330
1330-01-01T00:00:00
# Read input and solve the problem
hard
"[{\"input\": \"besssie\\n1 1 5 4 6 1 1\", \"output\": \"1\\n4\", \"testtype\": \"stdin\"}, {\"input(...TRUNCATED)
"eJzsvcuO80qTteeBL6TQQ+MflM6Sb8C3YMD/hEkmqSTFY5IUJcOAr8VX6vVE1jYMAzbsidHdH6P72/t9qyQyMzJixYoDuf/X//Z(...TRUNCATED)
"{\"problem_level\": \"gold\", \"contest_year\": 1330, \"original_problem_id\": \"1330_gold_pareidol(...TRUNCATED)
Milk Sum
"\n**Note: The time limit for this problem is 4s, 2x the default.**\nFarmer John's $N$ cows ($1\\le (...TRUNCATED)
codeforces
1326_silver_milk_sum
usaco_1326
1326-01-01T00:00:00
# Read input and solve the problem
medium
"[{\"input\": \"5\\n1 10 4 2 6\\n3\\n2 1\\n2 8\\n4 5\", \"output\": \"55\\n81\\n98\", \"testtype\": (...TRUNCATED)
"eJxMnUmubUmTlSXEQLainQ2vC0aCRDTJRnaClPLPBkJIDIKBMSTWt8z8RCLgj/fevefs7W7FsmXV//nP//X//fP//U//7X/98S9(...TRUNCATED)
"{\"problem_level\": \"silver\", \"contest_year\": 1326, \"original_problem_id\": \"1326_silver_milk(...TRUNCATED)
Field Day
"\n**Note: The time limit for this problem in Python is 15s. Other languages have the default time (...TRUNCATED)
codeforces
1327_silver_field_day
usaco_1327
1327-01-01T00:00:00
# Read input and solve the problem
medium
"[{\"input\": \"5 3\\nGHGGH\\nGHHHH\\nHGHHG\", \"output\": \"5\\n3\\n5\", \"testtype\": \"stdin\"}, (...TRUNCATED)
"eJx8+UGuLcuubIlBgBqSyBZkVtUBsq6KAN0OqJJQIVVSRV1RT5XvbbdhgzHX130fH3HmjvCgk2aDDF//n//z/+3/+3/93/9P//f(...TRUNCATED)
"{\"problem_level\": \"silver\", \"contest_year\": 1327, \"original_problem_id\": \"1327_silver_fiel(...TRUNCATED)
Pareidolia
"\n**Note: The time limit for this problem is 4s, 2x the default.**\nPareidolia is the phenomenon wh(...TRUNCATED)
codeforces
1328_silver_pareidolia
usaco_1328
1328-01-01T00:00:00
# Read input and solve the problem
medium
"[{\"input\": \"bessiebessie\", \"output\": \"14\", \"testtype\": \"stdin\"}, {\"input\": \"abcdefgh(...TRUNCATED)
"eJyMvcmOJD20HuaFH+TirrWRrmQNTyLAK85zcB4NA350f4zMqu7/ygsDjc6qzMgI8vCcb2CQUf/P//4//8e//cv/9n/+X/9qntT(...TRUNCATED)
"{\"problem_level\": \"silver\", \"contest_year\": 1328, \"original_problem_id\": \"1328_silver_pare(...TRUNCATED)
Rotate and Shift
"\n**Note: The time limit for this problem is 4s, 2x the default.**\nTo celebrate the start of sprin(...TRUNCATED)
codeforces
1325_bronze_rotate_and_shift
usaco_1325
1325-01-01T00:00:00
# Read input and solve the problem
easy
"[{\"input\": \"5 3 4\\n0 2 3\", \"output\": \"1 2 3 4 0\", \"testtype\": \"stdin\"}, {\"input\": \"(...TRUNCATED)
"eJzMvc2OJbuSXqlBP0jgjmvgpPG3H6GfQED3sDXQpFRAXQ0EQYDmPelHlq1F3xE7dkZk5jn3VEGD+HInnU53J52k2WfmZv/z//i(...TRUNCATED)
"{\"problem_level\": \"bronze\", \"contest_year\": 1325, \"original_problem_id\": \"1325_bronze_rota(...TRUNCATED)
Bakery
"\nBessie has opened a bakery!\n\nIn her bakery, Bessie has an oven that can produce a cookie in $t_(...TRUNCATED)
codeforces
1302_silver_bakery
usaco_1302
1302-01-01T00:00:00
# Read input and solve the problem
medium
"[{\"input\": \"2\\n\\n3 7 9\\n4 3 18\\n2 4 19\\n1 1 6\\n\\n5 7 3\\n5 9 45\\n5 2 31\\n6 4 28\\n4 1 8(...TRUNCATED)
"eJxk3UvOLEuSJGYOuAQuwFHjHvjT3JwrIcAcsgc9STbQ1QOCaIAL4yq4IsonFn82AVYVsm7eEyfC3R76EBUV/b/+x//l//5//qf(...TRUNCATED)
"{\"problem_level\": \"silver\", \"contest_year\": 1302, \"original_problem_id\": \"1302_silver_bake(...TRUNCATED)
Cow-libi
"\n**Note: The time limit for this problem is 4s, two times the default.**\n\nSomebody has been graz(...TRUNCATED)
codeforces
1303_silver_cow-libi
usaco_1303
1303-01-01T00:00:00
# Read input and solve the problem
medium
"[{\"input\": \"2 4\\n0 0 100\\n50 0 200\\n0 50 50\\n1000 1000 0\\n50 0 200\\n10 0 170\", \"output\"(...TRUNCATED)
"eJxsfUuOdsmSlIRYSKrGpBTvBytBoof0oCeXlvr2AKGW2BQbYwW4+cM8TtUV4lL8mfl950R4+MPc3OL//Of/9n//33/8p//+v//(...TRUNCATED)
"{\"problem_level\": \"silver\", \"contest_year\": 1303, \"original_problem_id\": \"1303_silver_cow-(...TRUNCATED)
Hungry Cow
"\nBessie is a hungry cow. Each day, for dinner, if there is a haybale in the barn,\nshe will eat on(...TRUNCATED)
codeforces
1299_bronze_hungry_cow
usaco_1299
1299-01-01T00:00:00
# Read input and solve the problem
easy
"[{\"input\": \"1 5\\n1 2\", \"output\": \"2\", \"testtype\": \"stdin\"}, {\"input\": \"2 5\\n1 2\\n(...TRUNCATED)
"eJxMvbuxLTuznHsFGjLiWNB4A9cBusAIHgeonKBASlRoES2kQHyZibn/LeyFnqPRjcajUKjKyvrf/+m//Of/83//v//6v/7tv/3(...TRUNCATED)
"{\"problem_level\": \"bronze\", \"contest_year\": 1299, \"original_problem_id\": \"1299_bronze_hung(...TRUNCATED)
Stamp Grid
"\nA stamp painting is a black and white painting on an $N \\times N$ canvas,\nwhere certain cells a(...TRUNCATED)
codeforces
1300_bronze_stamp_grid
usaco_1300
1300-01-01T00:00:00
# Read input and solve the problem
easy
"[{\"input\": \"4\\n\\n2\\n**\\n*.\\n1\\n*\\n\\n3\\n.**\\n.**\\n***\\n2\\n.*\\n**\\n\\n3\\n...\\n.*.(...TRUNCATED)
"eJzsvc3OLMltLXoHF7ivIfSQEIje+pfnntoDT45xemgNNGkLUGtgGAbOkx9c7crg4lokIzLr21u2GuhSa39VTCaDwZ9FRmRW1v/(...TRUNCATED)
"{\"problem_level\": \"bronze\", \"contest_year\": 1300, \"original_problem_id\": \"1300_bronze_stam(...TRUNCATED)
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
7