brain
tamnd's digital brain — notes, problems, research
41650 notes
The construction in this problem generates a sequence of strings where each level wraps the previous one inside a fixed template. The base string, call it $f0$, is a fixed sentence.
We are asked to list special numbers in increasing order and take a prefix sum. A number is considered valid if it reads the same forward and backward in decimal notation and its length is even.
We are given a single long string consisting only of digits. This string is known to come from a correct arithmetic identity of the form a + b = c, but the symbols + and = were removed and the digits were concatenated.
We are given a single non-negative integer, and we are asked to transform it into a nearby number whose last digit is zero.
We are given a string whose characters are indexed from left to right, and a sequence of operations that repeatedly remove certain characters from specified segments of the current string.
We are given several groups of students. Each group has either one student or two students, and these groups are indivisible. The coach wants to form as many teams as possible, where each team must contain exactly three students.
We are given a rational number formed by dividing two integers, and we are interested in its decimal representation after the decimal point. The task is to determine the earliest position where a specific digit appears in that infinite (or terminating) decimal expansion.
We are asked to build a subset of the numbers from 1 to n such that a very specific quantity computed on this subset equals k exactly. The quantity counts ordered pairs of distinct elements (a, b) where a appears earlier in value than b and a divides b evenly.
We start with a single original plush toy and no copies. A machine can be applied repeatedly, and each application changes the inventory depending on what type of toy it is applied to.
We are given two different trees on the same number of cities. One tree describes bus connections between cities labeled from 1 to N. The other tree describes train connections between cities labeled from N+1 to 2N.
We are given the value of the game after two moves, call it $X2$. The game starts from some unknown integer $X0 ge 3$, and two players alternately modify this value.
We are given a sequence of observations over consecutive days. Each day corresponds to a water level, and over time Arkady leaves marks at the distinct water levels he has seen so far. If a water level repeats, no new mark is added.
We are given a pool of servers, each with a fixed capacity measured in resource units. Two independent services must be deployed, and each service can use several servers at the same time.
We are simulating a bank account over a sequence of days. Each day starts with a fixed charge of $p$ rubles applied to the account. On some specific days, before this charge happens, Arkady deposits money into the account.
We are asked to count how many integers in a closed interval $[l, r]$ can be written using only the prime factors 2 and 3. Any valid number must have the form $2^x cdot 3^y$, where both exponents are non-negative integers.
The system simulates a fleet of taxis moving on a large rectangular grid where distance is measured in Manhattan terms, but movement has an additional constraint: whenever a car is instructed to go to a point, it first adjusts its x-coordinate fully and only then adjusts its…
We are given a proposed username and a collection of already-registered usernames. The task is to decide whether the new one is “safe” to use, meaning it is not considered equivalent to any existing username under a set of transformation rules.
We are given a sequence of positions along a straight line where bike stations are located. The first station coincides with Arkady’s starting point (school), and the last station coincides with his destination (home).
We are given a line of $k$ coins, each independently oriented either “obverse” (call it O) or “reverse” (call it R). A full configuration is simply a binary string of length $k$, but $k$ can be extremely large, so we cannot enumerate configurations.
We are given a collection of integer segments on the line from 1 to m. Each segment contributes coverage to every integer point inside it, including endpoints. For every integer position x, we can compute how many segments cover it; call this value cnt(x).
We are given a rooted tree with vertices numbered from 1 to n, where vertex 1 is the root. Every vertex i greater than 1 has exactly one parent p[i], and that parent always has a smaller index, which implicitly guarantees that the structure is a rooted tree without cycles and…
We are given a single-elimination tournament with $n$ teams labeled from 1 to $n$. The structure of the tournament is fixed and mechanical: in every round, the remaining teams are sorted by their original labels, then paired consecutively, so team 1 plays 2, 3 plays 4, and so on.
Two people stand on a number line at integer coordinates $a$ and $b$. They want to end up at the same integer position, and each of them can move one step left or right any number of times. The twist is that movement cost is not linear.
We are asked to construct a permutation of the numbers from 1 to N such that every position behaves in a very specific cyclic way.
We are working on a rooted tree where each node carries two numerical attributes, one acting like a “multiplier when leaving a node” and the other acting like a “weight when entering a node”.
We are given a single lowercase string $A$. The task is to construct another string $B$ such that two conditions hold at the same time: $B$ must read the same forward and backward, and the string $A$ must appear inside $B$ as a subsequence, meaning we can delete some…
We are given a sequence of non-negative integers. The only allowed operation is to pick a pair of adjacent positions where both values are still positive, subtract the smaller value from both, and pay a cost equal to that smaller value.
We are given a sequence made only of two values, 1 and 2, arranged in a line. We are allowed to choose a single contiguous segment of this sequence, reverse it, and then we want to measure how long a non-decreasing subsequence becomes after this operation.
We are asked to construct a polynomial whose coefficients are non-negative integers strictly less than a given base $k$, such that when this polynomial is divided by $x + k$, the remainder is exactly the constant polynomial $p$.
We are asked to construct a positive integer not exceeding $10^{18}$ such that when it is written in base 10, the total number of “loops” formed by its digits is exactly $k$.
Two players are interacting with two arrays of integers. One player owns an array of length n, the other owns an array of length m. Each number represents a lantern’s brightness, and brightness can be positive, negative, or zero. The interaction is adversarial.
We are given a string of length $n$, and we are allowed to transform it using a single operation that cuts the string into a suffix and a prefix. The suffix is reversed and moved to the front, and the prefix is appended after it.
We are given a directed graph where each vertex represents a state of a game token. A token starts at a fixed vertex, and two players alternate moving it along outgoing edges. A player loses immediately if they are to move from a vertex that has no outgoing edges.
We are given two integers that describe a vertical structure of branches on a tree. The branches are numbered in increasing order, starting from a low level up to some maximum height.
We are given a list of participant scores, and we need to count how many different ways we can choose a group of participants to receive diplomas under a very specific rule. A valid group is determined by picking a score threshold.
We start with a single string of lowercase letters and repeatedly perform a sequence of destructive operations. In the i-th operation, we are forced to delete a contiguous block whose length is fixed to be $2i - 1$, but we are free to choose where that block lies in the…
We are given a multiset of values, where each value is attached to a distinct position. The task is not to process a single ordering of these values, but to consider every possible permutation of indices, treating identical values at different positions as distinct.
The task describes a transformation on a string where certain characters are removed according to a local rule involving vowels. We are given a word and repeatedly modify it until no two adjacent vowels remain.
We are given a set of distinct points on a number line representing prizes. Two people start from fixed positions, one from the left side at position 1 and the other far to the right at position 106.
Arkady cooks a cutlet for a total of $2n$ seconds, and the physics is simple: at every moment it is on exactly one side, and whenever he flips it, the side changes instantly.
We are maintaining a growing collection of positive integers. The collection starts empty, and we process two types of operations: we either insert a new number, or we ask a question about the current collection.
We are given a directed structure over $n$ nodes, where each node has exactly one outgoing edge. Concretely, plane $i$ points to plane $fi$, meaning it “likes” exactly one other plane. Self-loops are explicitly disallowed, so no node points to itself.
Dima has a fixed number of hamsters that will be ready for transport, and a collection of box types, each with a different capacity. Every box used must be completely filled, and all chosen boxes must be of a single type because buying mixed types removes a discount.
We are given several points placed on a number line. Each point is just a single integer coordinate. We want to keep a subset of these points such that the spread of the remaining points is controlled, specifically the difference between the largest and smallest kept point…