Dataset:v0
id
problem.problem_dir
problem.problem_name
problem.problem_description
problem.sample_input
problem.sample_output
problem.problem_input
problem.problem_output
expected_result
PosixPath('data/2023/practice')
two_apples_a_day
“An apple a day keeps the doctor away” is Steve’s motto. His other motto, “You can never have too much of a good thing,” holds true for both apples and mottos. Steve would like to eat two apples per day for the next \(N\) days, but with strict adherence to his third motto “Consistency is key.” Specifically, he’d like the sum of the two apple weights he eats over the next \(N\) days to be the same for each day.
Steve has already purchased \(2*N-1\) apples, the \(i\)th of which weighs \(A_i\) oun...
7
3
6 3 1 2 5
2
7 7 7
1
1
3
1 9 1 1 4
4
1 9 1 1 4 9 9
4
1 9 10 1 4 6 9
3
1000000000 2 10 4 999999994
Case #1: 4
Case #2: 7
Case #3: 1
Case #4: -1
Case #5: 6
Case #6: -1
Case #7: 1000000002
PosixPath('data/2023/practice/two_apples_a_day.in')
PosixPath('data/2023/practice/two_apples_a_day.out')
passed
PosixPath('data/2023/practice')
road_to_nutella
You and your friends have drawn a really big connected graph in sidewalk chalk with \(N\) nodes (numbered from \(1..N\)) and \(M\) edges. \(Q\) times, there will be a race from node \(a_i\) to node \(b_i\), with a chance to win a coveted hazelnut chocolate snack. By the unbreakable rules of hop-scotch, everyone must travel along a path from node \(a_i\) to node \(b_i\) using edges in the graph, alternating which foot touches the ground at each node, starting each race with their left foot on \(...
4
13 15
1 2
2 3
2 4
4 5
3 5
5 6
6 7
6 8
8 9
8 12
8 13
9 10
10 11
11 12
12 13
5
7 1
7 8
1 2
1 11
2 3
4 3
1 2
2 3
2 4
2
2 3
1 4
4 4
1 2
2 3
1 3
3 4
2
2 3
1 4
4 4
1 2
2 3
1 4
3 4
2
2 3
1 4
Case #1: 5
Case #2: -2
Case #3: 0
Case #4: -2
PosixPath('data/2023/practice/road_to_nutella.in')
PosixPath('data/2023/practice/road_to_nutella.out')
passed
PosixPath('data/2023/practice')
cheeseburger_corollary_ch1
*This problem shares some similarities with A2, with key differences in bold.*
Problem solving skills are applicable to many daily musings. For instance, you might ponder over shared birthdays, bird houses, mapmaking, or ordering an exact number of chicken nuggets. Naturally, another great question to ponder is: how many deckers of a cheeseburger you could build if you spent your entire salary on fast food!
Specifically, you're interested in building a \(K\)-decker cheeseburger, which alternat...
7
1 1 3
0 2 4
5 5 1
0 1 1
1 1 2
97 1 99
97 1 100
Case #1: YES
Case #2: NO
Case #3: YES
Case #4: YES
Case #5: YES
Case #6: YES
Case #7: NO
PosixPath('data/2023/practice/cheeseburger_corollary_ch1.in')
PosixPath('data/2023/practice/cheeseburger_corollary_ch1.out')
passed
PosixPath('data/2023/practice')
cheeseburger_corollary_ch2
*This problem shares some similarities with A1, with key differences in bold.*
Problem solving skills are applicable to many daily musings. For instance, you might ponder over shared birthdays, bird houses, mapmaking, or ordering an exact number of chicken nuggets. Naturally, another great question to ponder is: how many deckers of a cheeseburger you could build if you spent your entire salary on fast food!
Specifically, you're interested in building a \(K\)-decker cheeseburger, which alternat...
6
2 3 5
2 3 2
2 3 1
5 1 100
1 3 100
1 1 1000000000000
Case #1: 3
Case #2: 1
Case #3: 0
Case #4: 199
Case #5: 100
Case #6: 1999999999999
PosixPath('data/2023/practice/cheeseburger_corollary_ch2.in')
PosixPath('data/2023/practice/cheeseburger_corollary_ch2.out')
passed
PosixPath('data/2023/practice')
dim_sum_delivery
*Nim Sum Dim Sum*, a bustling local dumpling restaurant, has two game theory-loving servers named, you guessed it, Alice and Bob. Its dining area can be represented as a two-dimensional grid of \(R\) rows (numbered \(1..R\) from top to bottom) by \(C\) columns (numbered \(1..C\) from left to right\).
Currently, both of them are standing at coordinates \((1, 1)\) where there is a big cart of dim sum. Their job is to work together to push the cart to a customer at coordinates \((R, C)\). To make ...
3
2 2 1 1
5 2 3 1
4 4 3 3
Case #1: NO
Case #2: YES
Case #3: NO
PosixPath('data/2023/practice/dim_sum_delivery.in')
PosixPath('data/2023/practice/dim_sum_delivery.out')
passed
1–5 of 5