brain

tamnd's digital brain — notes, problems, research

41522 notes

TAOCP 7.2.1.5 Exercise 26

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-simple
TAOCP 7.2.1.5 Exercise 25

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.1.5 Exercise 24

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4hm-hard
TAOCP 7.2.1.5 Exercise 23

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4hm-hard
TAOCP 7.2.1.5 Exercise 22

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-simple
TAOCP 7.2.1.5 Exercise 21

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.1.5 Exercise 20

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.1.5 Exercise 19

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.1.5 Exercise 18

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-simple
TAOCP 7.2.1.5 Exercise 17

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.1.5 Exercise 16

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.1.5 Exercise 15

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.5 Exercise 14

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.1.5 Exercise 13

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.1.5 Exercise 12

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.1.5 Exercise 11

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.1.5 Exercise 10

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.1.5 Exercise 9

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.5 Exercise 8

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.1.5 Exercise 7

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.5 Exercise 6

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.1.5 Exercise 5

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.1.5 Exercise 4

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.1.5 Exercise 3

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.5 Exercise 2

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.1.5 Exercise 1

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.1.4 Exercise 73

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.4 Exercise 72

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.1.4 Exercise 71

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-research
TAOCP 7.2.1.4 Exercise 70

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.1.4 Exercise 69

We seek all integers $n < 10^9$ such that the equation $x_1 + x_2 + \cdots + x_n = x_1 x_2 \cdots x_n$ has exactly one solution in positive integers satisfying $x_1 \ge x_2 \ge \cdots \ge x_n$.

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.1.4 Exercise 68

Let the perfect partition be a multiset with distinct values $v_1 < v_2 < \cdots < v_t$, where each value $v_i$ occurs with multiplicity $b_i-1 \ge 0$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.4 Exercise 67

Let the perfect partition be a multiset with distinct values $v_1 < v_2 < \cdots < v_t$, where each value $v_i$ occurs with multiplicity $b_i-1 \ge 0$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.4 Exercise 66

Let $P$ be a poset on ${1,\dots,m}$ with relation $\prec$, relabeled so that $j \prec k \Rightarrow j \le k$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.4 Exercise 65

Let $m=\prod_{p} p^{E_p}$ be the prime factorization of $m$, where each $E_p\ge 0$.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.1.4 Exercise 64

Let $\lambda = (\lambda_1 \ge \lambda_2 \ge \cdots)$ and $\mu = (\mu_1 \ge \mu_2 \ge \cdots)$ be partitions of the same integer $n$.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.1.4 Exercise 63

Solution to TAOCP 7.2.1.4 Exercise 63.

taocpmathematicsalgorithmsvolume-4research
TAOCP 7.2.1.4 Exercise 62

Let $\mathcal{P}(n,m)$ denote the set of partitions $\alpha = a_1 \ge a_2 \ge \cdots$ of $n$ with largest part $a_1 \le m$.

taocpmathematicsalgorithmsvolume-4research
TAOCP 7.2.1.4 Exercise 61

A partition of $n$ is a nonincreasing sequence a_1 \ge a_2 \ge \cdots \ge a_m \ge 1,\qquad a_1+\cdots+a_m=n.

taocpmathematicsalgorithmsvolume-4hard
TAOCP 7.2.1.4 Exercise 60

The solution does not address the stated problem.

taocpmathematicsalgorithmsvolume-4medium
TAOCP 7.2.1.4 Exercise 59

The solution does not address the stated problem.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.4 Exercise 58

Let F_\alpha(x_1,\dots,x_m)=\frac{1}{m!

taocpmathematicsalgorithmsvolume-4math-medium
CF 102893H - Hard Work

I’m missing the actual statement for Codeforces 102893H - Hard Work. Without the problem description (input/output definition and constraints), I can’t produce a correct editorial or even infer the intended solution reliably.

codeforcescompetitive-programming
CF 102893J - Straight

The problem statement section is empty, so there isn’t enough information to reconstruct what Codeforces 102893J - Straight actually asks.

codeforcescompetitive-programming
CF 102893E - Prank at IKEA

I can’t write a correct editorial yet because the actual problem statement for Codeforces 102893E - Prank at IKEA is missing.

codeforcescompetitive-programming
CF 102893D - Multiple Subject Lessons

I can’t write a correct Codeforces editorial for this yet because the actual problem statement is missing. Right now I only see the title “102893D - Multiple Subject Lessons” but no description of: what the input contains, what decisions we’re making, or what the output…

codeforcescompetitive-programming
CF 102893A - Bank Transfer

I’m missing the actual problem statement for Codeforces 102893A “Bank Transfer”, so I can’t reliably reconstruct the task or write a correct editorial.

codeforcescompetitive-programming
TAOCP 7.2.1.4 Exercise 57

Let $\lambda = (\lambda_1 \ge \lambda_2 \ge \cdots \ge 0)$ and $\mu = (\mu_1 \ge \mu_2 \ge \cdots \ge 0)$ be partitions of the same integer $n$, and assume $\lambda \preceq \mu$ in the majorization or...

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.4 Exercise 56

Let $\lambda = (\lambda_1 \ge \lambda_2 \ge \cdots \ge 0)$ and $\mu = (\mu_1 \ge \mu_2 \ge \cdots \ge 0)$ be partitions of the same integer $n$, and assume $\lambda \preceq \mu$ in the majorization or...

taocpmathematicsalgorithmsvolume-4math-hard
TAOCP 7.2.1.4 Exercise 55

Let $\alpha = a_1 a_2 \dots a_k$ be a partition of $n$ and define the dominance order $\alpha \succeq \beta$ as in the exercise.

taocpmathematicsalgorithmsvolume-4math-project
CF 102893B - Bacteria

I can’t write a correct editorial yet because the problem statement is missing. “Codeforces 102893B - Bacteria” alone isn’t enough to reconstruct the task reliably, and guessing would risk producing a completely wrong solution and explanation.

codeforcescompetitive-programming
CF 102893C - Check Markers

The problem statement is missing from your prompt, so there’s no way to correctly reconstruct the task, constraints, or required output for “Codeforces 102893C - Check Markers”.

codeforcescompetitive-programming
CF 102891C - Elliptic-EX

I don’t have the actual statement of Codeforces 102891C - Elliptic-EX, and writing a correct editorial without it would force guessing the problem structure, which would make the explanation unreliable.

codeforcescompetitive-programming
TAOCP 7.2.1.4 Exercise 54

Let $a_1 \ge a_2 \ge \cdots \ge a_{32} \ge 1$ with $a_1 + \cdots + a_{32} = 100$.

taocpmathematicsalgorithmsvolume-4math-hard
CF 102891G - Silver Fences

I don’t have the actual problem statement for Codeforces 102891G - Silver Fences in your message, and without it I can’t safely reconstruct the solution or write a correct editorial.

codeforcescompetitive-programming
CF 102891E - Entanglement

We are given a tree-like structure of states, rooted at node 1, where each new state attaches to an earlier state and the connection carries a lowercase letter. Every node corresponds to the string formed by reading letters along the unique path from the root to that node.

codeforcescompetitive-programming
CF 102891F - Alarm Clocks

I can’t write a correct editorial for Codeforces 102891F without the actual problem statement. Right now I don’t know what “Alarm Clocks” is asking, what the input structure looks like, or what algorithmic constraints drive the solution.

codeforcescompetitive-programming
CF 102891A - Apples and Oranges

I don’t have the actual statement for Codeforces 102891A - Apples and Oranges, so I can’t reliably reconstruct the problem or write a correct editorial without guessing.

codeforcescompetitive-programming
CF 102890H - How to Work Less to Pass a Programming Course in Planet E-13

Codeforces 102890H: How to Work Less to Pass a Programming Course in Planet E-13

codeforcescompetitive-programming
TAOCP 7.2.1.4 Exercise 53

Let $a_1 \ge a_2 \ge \cdots \ge a_{32} \ge 1$ with $a_1 + \cdots + a_{32} = 100$.

taocpmathematicsalgorithmsvolume-4math-medium
CF 102890C - Counting triangles

We are given a list of strings, all of the same length, and we are asked to group them by an equivalence relation defined through rotation.

codeforcescompetitive-programming
CF 102890J - Jaime's greedy delivery

I can’t write a correct editorial for this yet because the actual problem statement is missing. Right now I only have the title “Jaime’s greedy delivery”, but none of the essential details like what the inputs represent, what decisions are being made, or what needs to…

codeforcescompetitive-programming
CF 102890D - Debugging the network

The task is about decoding a compressed string where digits act as repetition counters for the characters that follow.

codeforcescompetitive-programming
TAOCP 7.2.1.4 Exercise 52

The statement of Exercise 7.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.4 Exercise 51

The statement of Exercise 7.

taocpmathematicsalgorithmsvolume-4math-research
TAOCP 7.2.1.4 Exercise 50

The statement of Exercise 7.

taocpmathematicsalgorithmsvolume-4hm-hard
TAOCP 7.2.1.4 Exercise 49

Let $p(n)$ be the partition function.

taocpmathematicsalgorithmsvolume-4hm-hard
TAOCP 7.2.1.4 Exercise 48

Let $p(n)$ be the partition function.

taocpmathematicsalgorithmsvolume-4hm-project
CF 102890B - Beautiful Necklaces

I can’t reliably write an editorial yet because the actual problem content for Codeforces 102890B - Beautiful Necklaces is missing from your prompt.

codeforcescompetitive-programming
TAOCP 7.2.1.4 Exercise 47

Let $p(m)$ denote the number of integer partitions of $m$, with $p(0)=1$.

taocpmathematicsalgorithmsvolume-4hm-medium
CF 102893L - The Firm Knapsack Problem

We start from a standard 0-1 knapsack setting: each item has a weight and a value, and there is a capacity limit. The classical goal is to maximize total value without exceeding that limit.

codeforcescompetitive-programming
CF 102893F - SMS from MCHS

The system is simulating a very small “SMS center” that processes events over time. Each event either injects a batch of messages into a queue at a specific second or triggers the processing of a single message from the front of that queue.

codeforcescompetitive-programming
CF 102893I - Points and Segments

I don’t have the actual problem statement for Codeforces 102893I - Points and Segments, so I can’t reliably reconstruct the task or derive a correct solution.

codeforcescompetitive-programming
CF 1028922 - Egocentric Subarrays

Stopped thinking

codeforcescompetitive-programming
CF 1028928 - Maximum Donut

I don’t have the actual statement for “Codeforces 1028928 - Maximum Donut” available from your prompt, and without it I’d be forced to guess the problem structure, which would make the editorial unreliable.

codeforcescompetitive-programming
CF 1028927 - Trailing Zeros

The editorial can’t be written yet because the actual problem statement is missing. Right now we only know the title “Trailing Zeros”, but not what is being computed, what the input format is, or what constraints apply.

codeforcescompetitive-programming
CF 1028926 - Birdwatching

The problem statement is missing from your prompt, so there’s no reliable way to reconstruct the intended task.

codeforcescompetitive-programming
CF 1028924 - Park Fountains

I don’t have the actual statement for Codeforces 1028924 - Park Fountains, so I can’t reconstruct the logic or write a correct editorial yet. Please paste the full problem statement (or at least the description + input/output + constraints).

codeforcescompetitive-programming
CF 102890L - Let's count words

The task is essentially about counting how many “words” appear in a given text under a simple tokenization rule. We are given a string that represents a line of text, and we must determine how many distinct word tokens exist in it according to the definition implied by the…

codeforcescompetitive-programming
TAOCP 7.2.1.4 Exercise 46

Let $S$ be a multiset of positive integers, and write its distinct values in increasing order as 1 \le b_1 < b_2 < \cdots < b_t, with multiplicities $m_1, m_2, \ldots, m_t$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.4 Exercise 45

Let $p(n)$ denote the partition function.

taocpmathematicsalgorithmsvolume-4hm-medium
CF 1028929 - Plane and Simple

I can write the full Codeforces-style editorial, but I’m missing the actual problem statement for “Plane and Simple (1028929)”.

codeforcescompetitive-programming
CF 1028925 - Channel Surfing

We are given a collection of TV channels, each broadcasting a sequence of minutes. For every channel, each minute is either “interesting” or “not interesting”.

codeforcescompetitive-programming
CF 1028923 - Infectious Letters

I can’t write a correct editorial yet because the actual problem statement for “Codeforces 1028923 - Infectious Letters” isn’t included.

codeforcescompetitive-programming
CF 1028921 - Unique Elements

We are given one or more sequences of integers, and for each sequence we need to determine which values are “unique” in the sense that they appear exactly once inside that sequence.

codeforcescompetitive-programming
TAOCP 7.2.1.4 Exercise 44

Let $f_{l,m}(n)$ denote the number of partitions of $n$ having exactly $m$ parts and largest part equal to $l$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.4 Exercise 43

Let $f_{l,m}(n)$ denote the number of partitions of $n$ having exactly $m$ parts and largest part equal to $l$.

taocpmathematicsalgorithmsvolume-4math-medium
TAOCP 7.2.1.4 Exercise 42

Let $f_{l,m}(n)$ denote the number of partitions of $n$ having exactly $m$ parts and largest part equal to $l$.

taocpmathematicsalgorithmsvolume-4hm-project
TAOCP 7.2.1.4 Exercise 41

Let $f_{l,m}(n)$ denote the number of partitions of $n$ having exactly $m$ parts and largest part equal to $l$.

taocpmathematicsalgorithmsvolume-4hm-project
CF 102890N - Network connection

We are working with a linear corridor of positions, from 0 to D, where a sequence of N antennas must be placed. Each antenna has a preferred position, and placing it away from that position incurs a linear penalty equal to the distance.

codeforcescompetitive-programming
CF 102890M - Mathematics society problem

We are given a number written as a string of digits and a set of deletion requirements that specify how many occurrences of each digit must be removed in total.

codeforcescompetitive-programming
CF 102890K - K contestants

We are effectively counting how many ways we can assemble a team of size k from two separate pools, where each pool contributes independently via combinations, but one pool is required to contribute at least c members.

codeforcescompetitive-programming
CF 102890I - Is this the best deal?

We are given three purchase amounts, denoted $t1, t2, t3$. There is also a function called discount(x) that tells us how much we actually pay if we buy something with nominal total value $x$.

codeforcescompetitive-programming
CF 102890G - Gold Fever

We are given a sequence of positions, each position representing a “state” with an immediate reward. From each position $i$, we are allowed to jump forward by a distance between two bounds $ai$ and $bi$, landing at some position $i + j$.

codeforcescompetitive-programming
TAOCP 7.2.1.4 Exercise 40

Let $f_{l,m}(n)$ denote the number of partitions of $n$ having exactly $m$ parts and largest part equal to $l$.

taocpmathematicsalgorithmsvolume-4math-medium
CF 102890F - Fit them all

We are given a packing problem on a fixed platform. The task is to determine how many cubes of increasing sizes we can place, starting from a cube of size 1×1×1 up to some largest size K×K×K, such that all of them fit on the platform under a specific placement rule.

codeforcescompetitive-programming
CF 102890E - End of the year bonus

We are given a circular line of people, each with a performance value. The bonus of each person depends on how their performance compares to their immediate neighbors on the left and right.

codeforcescompetitive-programming
CF 102890A - Acing the contest

We are dealing with a selection problem over three disjoint groups of students, which we can think of as three buckets of items labeled A, B, and C. Each group has a fixed number of students, and we want to form a team of exactly K students.

codeforcescompetitive-programming
CF 102891H - Ant MRT

We are given several ants placed at distinct points on a circular track of length (m). Each ant has a direction, either clockwise or counterclockwise, and they all move at unit speed. Whenever two ants meet, they instantly reverse direction.

codeforcescompetitive-programming
CF 102891D - Towers

The city is represented as a line of towers, each with a positive height. You are allowed to repeatedly perform a very specific operation: take one tower and move it onto an adjacent tower, merging them into a single tower whose height becomes the sum of the two.

codeforcescompetitive-programming