question_title stringlengths 2 58 | question_content stringlengths 92 7.2k | platform stringclasses 1
value | question_id stringclasses 45
values | contest_id int64 0 1.01k | contest_date stringdate 2025-01-20 20:58:05 2025-01-20 20:58:05 | starter_code stringclasses 1
value | difficulty stringclasses 3
values | public_test_cases stringclasses 1
value | private_test_cases stringclasses 1
value | metadata stringclasses 1
value | code stringlengths 12 11.9k | iids_state listlengths 0 2.98k | iids_null_code listlengths 5 5 | iids_code listlengths 5 3k | iids_correct_completion listlengths 0 2.98k | input_ids listlengths 4.1k 6.45k | labels listlengths 4.1k 6.45k | attention_mask listlengths 4.1k 6.45k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Uncowed Forces | Kevin Sun has just finished competing in Codeforces Round #334! The round was 120 minutes long and featured five problems with maximum point values of 500, 1000, 1500, 2000, and 2500, respectively. Despite the challenging tasks, Kevin was uncowed and bulldozed through all of them, distinguishing himself from the herd a... | codeforces | A | 604 | 2025-01-20 20:58:05.360400 | medium | [] | [] | [] | import sys
import threading
def main():
import sys
sys.setrecursionlimit(1 << 25)
# Read input
header = sys.stdin.readline().strip().split()
i, W, N, M, x0, y0, C, D, K, E = map(int, header)
# Initialize grid: store walls and doors
from collections import defaultdict
walls = defaultd... | [
128000,
475,
5826,
198,
475,
31259,
271,
755,
1925,
4019,
262,
1179,
5826,
198,
262,
5826,
995,
2827,
35380,
9696,
7,
16,
1134,
220,
914,
696,
262,
674,
4557,
1988,
198,
262,
4342,
284,
5826,
44284,
32900,
1020,
13406,
1020,
7105,
746... | [
[
128000,
475,
5826,
198,
475,
31259,
271,
755,
1925,
4019,
262,
1179,
5826,
198,
262,
5826,
995,
2827,
35380,
9696,
7,
16,
1134,
220,
914,
696,
262,
674,
4557,
1988,
198,
262,
4342,
... | [
128000,
475,
5826,
198,
475,
31259,
271,
755,
1925,
4019,
262,
1179,
5826,
198,
262,
5826,
995,
2827,
35380,
9696,
7,
16,
1134,
220,
914,
696,
262,
674,
4557,
1988,
198,
262,
4342,
284,
5826,
44284,
32900,
1020,
13406,
1020,
7105,
746... | [
128000,
475,
5826,
198,
475,
31259,
271,
755,
1925,
4019,
262,
1179,
5826,
198,
262,
5826,
995,
2827,
35380,
9696,
7,
16,
1134,
220,
914,
696,
262,
674,
4557,
1988,
198,
262,
4342,
284,
5826,
44284,
32900,
1020,
13406,
1020,
7105,
746... | [
128000,
128006,
9125,
128007,
271,
38766,
1303,
33025,
2696,
25,
6790,
220,
2366,
18,
198,
15724,
2696,
25,
220,
1627,
10263,
220,
2366,
19,
271,
2675,
527,
46927,
264,
3823,
304,
264,
10344,
2082,
9659,
3465,
13,
4718,
3560,
374,
311,
... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | |
Word Capitalization | Capitalization is writing a word with its first letter as a capital letter. Your task is to capitalize the given word.
Note, that during capitalization all the letters except the first one remains unchanged.A single line contains a non-empty word. This word consists of lowercase and uppercase English letters. The leng... | codeforces | A | 281 | 2025-01-20 20:58:05.360400 | easy | [] | [] | [] | import sys
# Read input
m = list(map(int, sys.stdin.readline().split())) # submission times
w = list(map(int, sys.stdin.readline().split())) # wrong submissions
hs, hu = map(int, sys.stdin.readline().split()) # hacks
# Maximum point values for the problems
points = [500, 1000, 1500, 2000, 2500]
# Calculate total... | [
128000,
475,
5826,
271,
2,
4557,
1988,
198,
76,
284,
1160,
9325,
1577,
11,
5826,
44284,
32900,
1020,
7105,
10340,
220,
674,
21142,
3115,
198,
86,
284,
1160,
9325,
1577,
11,
5826,
44284,
32900,
1020,
7105,
10340,
220,
674,
5076,
37935,
... | [
[
128000,
475,
5826,
271,
2,
4557,
1988,
198,
76,
284,
1160,
9325,
1577,
11,
5826,
44284,
32900,
1020,
7105,
10340,
220,
674,
21142,
3115,
198,
86,
284,
1160,
9325,
1577,
11,
5826,
442... | [
128000,
475,
5826,
271,
2,
4557,
1988,
198,
76,
284,
1160,
9325,
1577,
11,
5826,
44284,
32900,
1020,
7105,
10340,
220,
674,
21142,
3115,
198,
86,
284,
1160,
9325,
1577,
11,
5826,
44284,
32900,
1020,
7105,
10340,
220,
674,
5076,
37935,
... | [
128000,
475,
5826,
271,
2,
4557,
1988,
198,
76,
284,
1160,
9325,
1577,
11,
5826,
44284,
32900,
1020,
7105,
10340,
220,
674,
21142,
3115,
198,
86,
284,
1160,
9325,
1577,
11,
5826,
44284,
32900,
1020,
7105,
10340,
220,
674,
5076,
37935,
... | [
128000,
128006,
9125,
128007,
271,
38766,
1303,
33025,
2696,
25,
6790,
220,
2366,
18,
198,
15724,
2696,
25,
220,
1627,
10263,
220,
2366,
19,
271,
2675,
527,
46927,
264,
3823,
304,
264,
10344,
2082,
9659,
3465,
13,
4718,
3560,
374,
311,
... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | |
Ciel and Flowers | "Fox Ciel has some flowers: *r* red flowers, *g* green flowers and *b* blue flowers. She wants to us(...TRUNCATED) | codeforces | B | 322 | 2025-01-20 20:58:05.360400 | medium | [] | [] | [] | word = input()
capitalized_word = word[0].upper() + word[1:]
print(capitalized_word)
| [
128000,
1178,
284,
1988,
746,
66163,
1534,
13843
] | [[128000,1178,284,1988,746,66163,1534,13843,284,3492,79598,368,220,674,1115,690,53825,279,1176,6661,(...TRUNCATED) | [128000,1178,284,1988,746,66163,1534,13843,284,3492,58,15,948,13886,368,489,3492,58,16,25106,1374,52(...TRUNCATED) | [
128000,
1178,
284,
1988,
746,
66163,
1534,
13843,
284,
3492,
58
] | [128000,128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,198,15724,2696,25,220,1627,(...TRUNCATED) | [-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | |
Snow Footprints | "There is a straight snowy road, divided into *n* blocks. The blocks are numbered from 1 to *n* from(...TRUNCATED) | codeforces | A | 298 | 2025-01-20 20:58:05.360400 | medium | [] | [] | [] | "n = int(input())\nroad = input().strip()\n\n# Find the first and last footprint\nfirst = None\nlast(...TRUNCATED) | [128000,77,284,528,5498,2455,8714,284,1988,1020,13406,2892,2,7531,279,1176,323,1566,43972,198,3983,2(...TRUNCATED) | [[128000,77,284,528,5498,2455,8714,284,1988,1020,13406,2892,2,7531,279,1176,323,1566,43972,198,3983,(...TRUNCATED) | [128000,77,284,528,5498,2455,8714,284,1988,1020,13406,2892,2,7531,279,1176,323,1566,43972,198,3983,2(...TRUNCATED) | [128000,77,284,528,5498,2455,8714,284,1988,1020,13406,2892,2,7531,279,1176,323,1566,43972,198,3983,2(...TRUNCATED) | [128000,128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,198,15724,2696,25,220,1627,(...TRUNCATED) | [-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | |
Minimum number of steps | "We have a string of letters 'a' and 'b'. We want to perform some operations on it. On each step we (...TRUNCATED) | codeforces | B | 804 | 2025-01-20 20:58:05.360400 | medium | [] | [] | [] | "import sys\n\ndef max_ribbon_pieces(n, a, b, c):\n # Initialize dp array with -infinity to repre(...TRUNCATED) | [128000,475,5826,271,755,1973,62,55680,84579,1471,11,264,11,293,11,272,997,262,674,9185,11581,1358,4(...TRUNCATED) | [[128000,475,5826,271,755,1973,62,55680,84579,1471,11,264,11,293,11,272,997,262,674,9185,11581,1358,(...TRUNCATED) | [128000,475,5826,271,755,1973,62,55680,84579,1471,11,264,11,293,11,272,997,262,674,9185,11581,1358,4(...TRUNCATED) | [128000,475,5826,271,755,1973,62,55680,84579,1471,11,264,11,293,11,272,997,262,674,9185,11581,1358,4(...TRUNCATED) | [128000,128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,198,15724,2696,25,220,1627,(...TRUNCATED) | [-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | |
Cut Ribbon | "Polycarpus has a ribbon, its length is *n*. He wants to cut the ribbon in a way that fulfils the fo(...TRUNCATED) | codeforces | A | 189 | 2025-01-20 20:58:05.360400 | medium | [] | [] | [] | "import sys\n\ndef find_number_at_position(n):\n low = 1\n high = 2 * 10**7 # Safe upper boun(...TRUNCATED) | [128000,475,5826,271,755,1505,5617,3837,9858,1471,997,262,3428,284,220,16,198,262,1579,284,220,17,35(...TRUNCATED) | [[128000,475,5826,271,755,1505,5617,3837,9858,1471,997,262,3428,284,220,16,198,262,1579,284,220,17,3(...TRUNCATED) | [128000,475,5826,271,755,1505,5617,3837,9858,1471,997,262,3428,284,220,16,198,262,1579,284,220,17,35(...TRUNCATED) | [128000,475,5826,271,755,1505,5617,3837,9858,1471,997,262,3428,284,220,16,198,262,1579,284,220,17,35(...TRUNCATED) | [128000,128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,198,15724,2696,25,220,1627,(...TRUNCATED) | [-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | |
Infinite Sequence | "Consider the infinite sequence of integers: 1,<=1,<=2,<=1,<=2,<=3,<=1,<=2,<=3,<=4,<=1,<=2,<=3,<=4,<(...TRUNCATED) | codeforces | A | 622 | 2025-01-20 20:58:05.360400 | medium | [] | [] | [] | "a, b = input().split()\nn = int(input())\nprint(f\"{a} {b}\")\nfor _ in range(n):\n old, new = i(...TRUNCATED) | [128000,64,11,293,284,1988,1020,7105,746,77,284,528,5498,2455,1374,968,14461,64,92,314,65,14790,2000(...TRUNCATED) | [[128000,64,11,293,284,1988,1020,7105,746,77,284,528,5498,2455,1374,968,14461,64,92,314,65,14790,200(...TRUNCATED) | [128000,64,11,293,284,1988,1020,7105,746,77,284,528,5498,2455,1374,968,14461,64,92,314,65,14790,2000(...TRUNCATED) | [128000,64,11,293,284,1988,1020,7105,746,77,284,528,5498,2455,1374,968,14461,64,92,314,65,14790,2000(...TRUNCATED) | [128000,128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,198,15724,2696,25,220,1627,(...TRUNCATED) | [-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | |
A Serial Killer | "Our beloved detective, Sherlock is currently trying to catch a serial killer who kills a person eac(...TRUNCATED) | codeforces | A | 776 | 2025-01-20 20:58:05.360400 | easy | [] | [] | [] | "import sys\nimport math\n\nn = int(sys.stdin.readline())\n\n# Start from the largest possible prope(...TRUNCATED) | [128000,475,5826,198,475,7033,271,77,284,528,18635,44284,32900,12647,2,5256,505,279,7928,3284,6300,1(...TRUNCATED) | [[128000,475,5826,198,475,7033,271,77,284,528,18635,44284,32900,12647,2,5256,505,279,7928,3284,6300,(...TRUNCATED) | [128000,475,5826,198,475,7033,271,77,284,528,18635,44284,32900,12647,2,5256,505,279,7928,3284,6300,1(...TRUNCATED) | [128000,475,5826,198,475,7033,271,77,284,528,18635,44284,32900,12647,2,5256,505,279,7928,3284,6300,1(...TRUNCATED) | [128000,128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,198,15724,2696,25,220,1627,(...TRUNCATED) | [-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | |
Fraction | "Petya is a big fan of mathematics, especially its part related to fractions. Recently he learned th(...TRUNCATED) | codeforces | A | 854 | 2025-01-20 20:58:05.360400 | easy | [] | [] | [] | "import sys\nimport math\n\ndef mod_tetration(n, m):\n # Special case: if m == 1, anything mod 1 (...TRUNCATED) | [128000,475,5826,198,475,7033,271,755,1491,530,74954,1471,11,296,997,262,674,9984,1162,25,422,296,62(...TRUNCATED) | [[128000,475,5826,198,475,7033,271,755,1491,530,74954,1471,11,296,997,262,674,9984,1162,25,422,296,6(...TRUNCATED) | [128000,475,5826,198,475,7033,271,755,1491,530,74954,1471,11,296,997,262,674,9984,1162,25,422,296,62(...TRUNCATED) | [128000,475,5826,198,475,7033,271,755,1491,530,74954,1471,11,296,997,262,674,9984,1162,25,422,296,62(...TRUNCATED) | [128000,128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,198,15724,2696,25,220,1627,(...TRUNCATED) | [-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | |
Modular Exponentiation | "The following problem is well-known: given integers *n* and *m*, calculate\n\nwhere 2*n*<==<=2·2·(...TRUNCATED) | codeforces | A | 913 | 2025-01-20 20:58:05.360400 | easy | [] | [] | [] | "import sys\n\ndef main():\n import sys\n x, y, m = map(int, sys.stdin.read().split())\n\n (...TRUNCATED) | [128000,475,5826,271,755,1925,4019,262,1179,5826,198,262,865,11,379,11,296,284,2472,1577,11,5826,442(...TRUNCATED) | [[128000,475,5826,271,755,1925,4019,262,1179,5826,198,262,865,11,379,11,296,284,2472,1577,11,5826,44(...TRUNCATED) | [128000,475,5826,271,755,1925,4019,262,1179,5826,198,262,865,11,379,11,296,284,2472,1577,11,5826,442(...TRUNCATED) | [128000,475,5826,271,755,1925,4019,262,1179,5826,198,262,865,11,379,11,296,284,2472,1577,11,5826,442(...TRUNCATED) | [128000,128006,9125,128007,271,38766,1303,33025,2696,25,6790,220,2366,18,198,15724,2696,25,220,1627,(...TRUNCATED) | [-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 9