brain
tamnd's digital brain — notes, problems, research
41650 notes
We are given a line of boxes, each containing some number of chocolate pieces. A single move allows us to take one piece from a box and shift it to an adjacent box, so the cost of moving a piece is exactly the distance it travels along the line.
We are given a set of signal towers placed on a number line. Each tower has a fixed position and a symmetric coverage radius. A tower at position $xi$ with radius $si$ covers every integer point from $xi - si$ to $xi + si$.
We are given a weighted undirected graph where a subset of nodes are “centrals”, meaning that whenever a robot arrives there its battery is instantly refilled to full capacity. The robot starts and must finish each query at a central node.
The robot stores a binary instruction string over the alphabet {A, B}. When we process this string with an initial pair of values (A, B), each character acts like a small transformation step.
We are given a set of cities where each city proposes exactly one possible road. City $i$ wants to connect to a specific other city $Ai$, so each proposal is an undirected edge $(i, Ai)$.
We are given a rectangular region and several circular sensors placed inside it. Each sensor detects any point that lies strictly inside its circle.
The grid in this problem is not given explicitly as an $N times N$ matrix. Instead, every cell value is determined by a simple additive structure: the value at position $(i, j)$ is $Ri + Cj$.
We are given a rectangular grid of uppercase letters and many query strings. For each query string, we need to count how many ways it can be traced inside the grid under a very specific movement rule: we start from some cell, first move only to the right any number of steps…
Each wire connects two contact points, and we say two wires are related if they share at least one endpoint, or if there is a chain of wires where consecutive wires share endpoints.
We are given two sets of time intervals: one set represents lectures, the other represents seminars. Each lecture must be assigned a high-definition projector, while each seminar can use any projector, either HD or ordinary.
The garden is an $n times n$ grid where each cell is either a plant that must be watered or a slab that must never be touched. The layout is highly structured: all diagonal cells are slabs, and every cell strictly below the diagonal that touches the diagonal also becomes a slab.
We are given two sequences that evolve in lockstep over time. In each round, the human gains some amount of points while the computer also gains points. Both totals accumulate independently across rounds.
We are given a list of dancers, each with a fixed awkwardness value. A “concert” is defined as choosing a subset of these dancers. Not all subsets are allowed: the total awkwardness of a chosen subset must not exceed a limit $k$.
We are given several binary strings, each representing a necklace. Each position in a string is either 0 or 1, and we interpret this as two types of gems. We are allowed to reverse some of these strings.
We are given a collection of projects, each defined by a time interval and a payment. If we choose a trip to Saint Petersburg, we also fix a continuous interval of days during which we stay in the city.
We are given a collection of employees, where each employee belongs to exactly one team. The only meaningful structure in the input is the frequency of each team, since employees from the same team must always travel together.
We are given several scientists, each staying at the conference for a time interval from day $li$ to $ri$, inclusive. Some scientists explicitly belong to a known country $ci 0$, while others have no country assigned ($ci = 0$).
We are given several containers, each holding a multiset of distinct integers. A single operation is performed exactly once: from every container, we must pick exactly one value, and then redistribute those chosen values back into the containers so that each container still…
We are asked to reconstruct a very unusual infinite sequence that is generated in rounds. Each round repeatedly looks at the smallest positive integers that have not yet appeared in the sequence.
We are asked to construct a planar structure made of polygonal faces, where each face is a simple cycle in a shared graph. Each face i must have exactly ai vertices on its boundary. Whenever two faces touch, they must share an entire edge, not just a vertex.
The grid consists of two horizontal rows, each with $n$ pipe pieces placed in a line. Water enters from the left side of the top row, specifically into cell $(1,1)$, and must travel through connected pipe openings until it eventually exits to the right side of the bottom row…
We are given a sequence of integers and must assign each position one of three colors: red, green, or blue. After coloring, we look only at red elements in their original order; they must form a permutation of consecutive integers starting from 1.
We are given a tree where each edge represents a road between two cities. Every road must be assigned to a company, and multiple roads can share the same company.
We are given a list of problem difficulties, where each problem has an index and a numeric complexity value. The task is to select three distinct indices $a$, $b$, and $c$ such that the corresponding values form a strictly increasing chain: $ra < rb < rc$.
We are given a sequence of days, and on each day there is a price for buying a single ice cream portion. Each day also comes with constraints describing how many portions Tanya is allowed to eat on that day.
We are given a group of employees and an undirected “dislike” relation between some pairs. At any moment, each employee has a salary, and this salary induces a directed view of every dislike edge: between two connected employees, the one with higher salary brags to the one…
We are given a complete bipartite structure between two sets of size $n$, where every potential edge $(elli, rj)$ exists independently with some probability $p{ij}/100$. The randomness is over the presence or absence of each edge, and all edges are independent.
We are given a long decimal string that was produced as a subsequence of outputs from a very simple counter process. The counter always starts at value zero.
We are given one long reference string t and a collection of strings s1 … sn. For every ordered pair of strings (si, sj), we form a new string by concatenating them, then we count how many times this concatenated string appears as a contiguous substring inside t.
We are asked to construct a string made only of the digits 1, 3, and 7 such that a very specific pattern appears a prescribed number of times as a subsequence.
A command string describes how a robot walks on an infinite grid. Each character moves the robot one step in one of four directions. If we choose a starting position and execute the whole sequence, the robot traces a path and must never leave a finite rectangular board.
We are given a multiset of integers for each test case. From this multiset, we are allowed to pick any subset of elements and then permute them freely.
We are given a line of $m$ cells and a sequence of $n$ sliding doors. Each door occupies a contiguous block of cells, and the doors appear in a fixed left-to-right order.
We are given an undirected multigraph where edges may repeat and self-loops are allowed. The task is to completely eliminate all edges by repeatedly choosing a simple cycle and removing all edges belonging to that cycle.
We are given an array of wheel pressures and we need to pick exactly $m$ of them. After selecting those $m$ wheels, we are allowed to change their pressures so that all of them end up equal to a single value.
We are given a single flattened sequence that was produced from several hidden integer sequences. The encoding process mixed all sequences together in “column order”: first all first elements of each sequence, then all second elements, then all third elements, and so on.
We are given two strings consisting only of two symbols, a “minus” and a “plus”. The only allowed move takes two neighboring minus signs and replaces them with a single plus sign, which shortens the string by one character.
We are given two numbers per query, and each query hides a simple structure built from three unknown positive integers $a$, $b$, and $c$. From these three values we can form three pairwise sums: $a+b$, $a+c$, and $b+c$.
The city is a sequence of unit square buildings placed along an infinite horizontal line. Each building occupies an interval of length one, starting at some integer coordinate $ai$. So building $i$ spans $[ai, ai + 1]$, and these positions are strictly increasing.
We are given an array where every element lies between 1 and x, and we consider a transformation defined by a value interval [l, r]. This transformation deletes every array element whose value falls inside that interval, while leaving all other elements in their original order.
We are given an unknown ordering of six fixed numbers: 4, 8, 15, 16, 23, and 42. Each number appears exactly once in an array of length six, but their positions are hidden.
We are given an array of distinct numbers, and we look at every possible contiguous subarray. For each subarray, we temporarily reorder its elements in increasing order, then assign weights based on position in that sorted subarray: the smallest element gets weight 1, the next…
We are given a sequence that starts from a very simple base and then evolves through a multiplicative recurrence.
We are given a timeline of events. At any moment, Hiasat’s profile has a single visible handle, and he is allowed to change this handle only at specific moments marked in the input. Between changes, the handle stays fixed.
We are given a collection of judges. Each judge contributes two values: a number $ai$, which controls how “resistant” their opinion is, and a cost parameter $ei$, which is the time cost if we decide to interact with that judge. We may choose to play with a judge at most once.
We are interacting with a hidden number $a$, which is fixed for each game and lies between 1 and $10^9$. We cannot query it directly. Instead, we can ask questions consisting of two non-negative integers $x$ and $y$, and the judge compares $x bmod a$ and $y bmod a$.
We are given a set of people positioned on a number line. Each person is either a rider or a taxi driver, and all positions are distinct and already sorted in increasing order.
A spherical planet of radius $R$ is filled with an incompressible жидкость of constant density $\rho$ in hydrostatic equilibrium under its own gravitational field.
A uniform rope of linear mass density $\lambda$ (kg/m) passes over a frictionless pulley.
The system consists of the Sun, the Moon, and an observer on Earth.
A neon lamp consists of two large parallel plate electrodes separated by a distance $d = 3 \times 10^{-3},\text{m}$.
A planet of mass $M$ and radius $R$ is surrounded by an atmosphere of height $H$.