brain
tamnd's digital brain — notes, problems, research
43815 notes
We are given a large set of distinct positive integers representing “cuteness levels”. From these numbers, Emma first selects exactly $N$ elements.
We are given a collection of identical “pairs” of chopsticks, where each pair is characterized by a single integer length. From each pair we can treat the two chopsticks as two equal sides of a rectangle.
We are maintaining a dynamic set of points on the plane. Initially we are given a collection of stars, each represented by integer coordinates. After that, we repeatedly add or remove stars.
We are given a list of potential customers, where each customer has a maximum price they are willing to pay for a product. If we set a price $P$, then exactly those customers with $pi ge P$ will buy the product, and each of them contributes $P$ to the revenue.
We are given an array of non-negative integers, where each value represents the height of a mountain. The goal is to reduce every value to zero using as few operations as possible. Two operations are available, and both can be applied to any chosen subset of indices.
The problem concerns a regular tetrahedron with vertices $A,B,C,D$ and circumcenter $O$.
The task is to compute the earliest possible arrival time at a destination node in a graph where each edge behaves like a traffic-controlled corridor.
We are given a sequence of points on a number line that must be visited in a fixed order. We start at position 0. At each step we move to the next required position in the list, but we are allowed to choose between two movement modes.
We are given a connected undirected graph where nodes represent power plants and edges represent possible transmission routes. Each route has a cost that changes over time according to a quadratic function in time $t$, specifically $a t^2 + b t + c$.
We are choosing a set of $M$ distinct integer positions from the range $[1, N]$. Each chosen position contains a tree of fixed height $H$.
We are given a rectangular 3D box aligned with the coordinate axes, stretching from the origin to $(x, y, z)$. Inside this box, there is already one spherical apple placed somewhere in space. Its center is given as $(tx, ty, tz)$, and it has radius $r$.
We are given a circular route with $n$ cycling stations. Each station has two values: the amount of energy you gain when stopping there, and the amount of energy required to travel from it to the next station in the cycle. A cyclist starts at a chosen station with zero energy.
We are given a hidden permutation $p$ of length $n$, where $n equiv 2 pmod 4$. We never see the permutation directly. Instead, we can query any set of exactly $n/2$ distinct indices, and the judge returns the median value among the corresponding $p$-values.
We are given a circular array of constraints, and we want to construct another array of nonnegative integers that satisfies them while minimizing the total sum.
We are given a row of monsters, each with a positive health value. A spell is an operation where we choose a number x, then scan monsters from left to right. The first monster whose current health is at least x gets reduced by x, and the spell stops immediately.
We are given an array of integers. The goal is to repeatedly apply an operation so that, at the end, every element in the array is non-positive. One operation works like this. We pick an index $i$.
We start with a multiset containing the numbers from 1 to n. Each operation picks two currently present values x and y, removes both, and inserts their difference x − y. After exactly n − 1 such operations, only one number remains.
The condition mixes side lengths and tangents of angles.
We are given a grid of upper bounds, and we consider all integer grids of the same size where each cell is chosen independently within its allowed range. For each such choice of grid values, we compute a score formed from row sums and column sums.
We are given a one-dimensional universe made of segments arranged in a line. Each segment has a value, initially either +1 or -1 depending on whether it lies in the left half or the right half of the array.
We are simulating a character that moves strictly from left to right on an infinite grid. Time advances in discrete steps, and at every step the x-coordinate increases by one, while the y-coordinate can change by at most one unit up or down.
Let
We are given a tree with $n$ nodes. Each of $m$ colors corresponds to a fixed simple path in this tree, defined by two endpoints $si$ and $ti$. Think of each color as a group of tokens that would occupy every node on that path when active.
We start with a single integer value and process a sequence of operations. Each element in the permutation gives us a binary choice: either we add that number to the current value, or we flip a single bit of the current value using XOR with a power of two determined by the…
Jason starts from an empty text and wants to end up with a text consisting of the string "orz" repeated at least $N$ times.
We are given a fixed external database that can be thought of as a long ordered list of anime titles, each sitting on a specific line number starting from 1.
We are given an array and three distinguished values, $X$, $Y$, and $K$, with the ordering $Y < K < X$. For each test case, we need to count subarrays where two extremal conditions hold simultaneously: within the subarray, the maximum value must be exactly $X$, the minimum…
We are given a path graph with nodes numbered from 1 to n, where each node is connected to its immediate neighbors. Then each node i is independently kept with probability 1/i and removed with probability 1 − 1/i.
We are building a text consisting of repeated copies of the string “orz”. The goal is to produce at least $N$ copies of this string in minimum time. At any moment, Jason has a current amount of text, and he can perform three actions.
We are given a fixed external text file that lists anime titles, one per line. Each title is unique and appears exactly once in that file.
We are given a path graph with nodes numbered from 1 to n, where each node i is independently kept with probability 1/i and removed otherwise.
We are given an array and three special values, with a strict ordering $Y < K < X$. For each test case, the task is to count how many contiguous subarrays satisfy three simultaneous conditions: the maximum element in the subarray is exactly $X$, the minimum element is exactly…
We are given a binary grid and we want to travel from the top-left cell to the bottom-right cell, only moving right or down. The restriction is that every visited cell must contain a 1.
We are given an array of integers. One operation is allowed: pick any two elements, remove both, compute their bitwise XOR, and insert that result back into the array. This changes the array size by exactly minus one, since two elements are replaced by one.
We are given an array, and each query asks about all ordered pairs of indices inside a segment. For a query segment $[l, r]$, we take every pair $(i, j)$ in that range, compute $ai + aj$, and then XOR all of those results together.
We are given the numbers from 1 to 2n, and we must split them into two ordered lists a and b, each of length n, using every number exactly once.
We are given a rectangular grid where each cell is one of three types. Some cells are valid high ground positions where we can place a unit, some are low ground cells where enemies stand, and some cells are blocked and irrelevant for placement.
The problem asks for an upper bound on the number of segments of maximal length among $n$ points in the plane.
We are given a tree with up to one million nodes. A token starts on some node, and two players alternately move it.
We are given a single number written in hexadecimal, using digits 0 to 9 and letters A, b, C, d, E, F. The task is to modify this string into a strobogrammatic number, meaning that if we rotate the representation by 180 degrees, it should look identical again.
We are given a line of integers. In one move we pick two neighboring positions and transfer any amount of value between them: we add some integer $k$ to one side and subtract the same $k$ from the other side.
We are given a circular arrangement of voters, each voting for either J or L. We must cut this circle into exactly K consecutive segments, where the last segment wraps around to the beginning.
We are given a sequence of buildings, each with a distinct height. For any interval of buildings from index i to j, we consider two traversals: moving from left to right and moving from right to left.
We are given a polygonal “cake” whose upper boundary is defined by a polyline through $n$ points whose x-coordinates are strictly increasing.
The grid represents a maze where two agents move over discrete time steps: Pacman and a ghost. Pacman starts at a fixed cell and then follows a predetermined sequence of moves consisting of up, down, left, and right commands.
We are given a permutation of length $N$, meaning all values are distinct. From this array we consider every contiguous subarray, and we want to count how many of those subarrays are “valid” according to a stack simulation rule.
We are given a list of money transfers between people, where each record says that one person paid on behalf of another, creating an implicit debt relationship. From these transactions we can compute how much each person ultimately owes or is owed.
We are given a person’s full name split into three or four words. The last two words are fixed surnames, while everything before them forms the given names. From this name, we must reconstruct a very specific sequence of candidate login identifiers called LDAPs.
We are simulating a short sequence of moves on a toroidal 15 by 15 grid, where Pacman follows a fixed deterministic path while a hidden ghost moves randomly. Both start from the same uniformly random cell.
The previous attempt failed because it incorrectly assumed a simple affine relation between $M$ and the orthocenter $H$ of $\triangle OPQ$.
We are given three rectangular sheets, each with a fixed width and height, and we are allowed to place them on a plane without rotating them. The task is to arrange all three so that the total area of the region they occupy is as small as possible.
There are $N$ lifts and $N$ special floors called waiting floors. The $i$-th waiting floor is fixed at height $10i - 5$, so these floors are evenly spaced and strictly ordered. Each lift initially sits on its own waiting floor: lift $i$ starts at floor $10i - 5$.
We are given a convex polygon described by its vertices in counterclockwise order. The task is to cut this polygon into triangles using non-intersecting diagonals between vertices, exactly forming a triangulation.
We are given a triangular board of side length $N$. The board is not a rectangle but a triangle where row $k$ contains $k$ cells, aligned to the left, forming the familiar triangular grid structure.
Each published paper is constructed incrementally. Some papers are independent strings, while others are formed by taking an earlier paper and appending an extra string to its end.
We are given a program as plain text, split into several lines. The task is to determine whether this program is “suspected to be written by GPT and exceeds its output limit.
We are given several categories of algorithms, where each category contains a certain number of distinct algorithms. Over the next $K$ days, Bob will study exactly one category per day, and on that day he must learn exactly $M$ algorithms from that chosen category.
The grid can be thought of as a set of concentric square rings around the center cell. Because the size is odd, there is a single center and every other cell belongs to exactly one ring.
We are given a binary string where each character represents the outcome of a point in a badminton match simulation. A substring corresponds to a single match, and we scan it from left to right, updating a running score: 1 adds a point to David, 0 adds a point to the opponent.
We are working on a grid maze where each cell is either a wall or a free space, and exactly one cell is marked as a start and one as an exit. The movement rules are not the usual four-directional steps.
We are given positions of occupied cells arranged around a circular prison with labels from 1 to 360. Because the structure is circular, cell 360 is adjacent to cell 1, so any contiguous surveillance interval may wrap around this boundary.
Let
We are given a sequence of requests arranged in a line, where each position corresponds to a person who ordered a specific type of dish.
We are given a linear sequence of asteroids, each colored either a or b. We are allowed to choose any contiguous segment of this sequence, remove it, and then glue its ends together to form a cycle.
We are looking at a population that evolves in perfectly rigid generations. The first generation starts with some number of individuals, call it $a$.
The horizon of Mercury is described as a line of mountains, each position having a given height. We are allowed to perform only one type of operation: reduce the height of any mountain by removing material.
The plane $\varepsilon$ is parallel to both skew edges $AB$ and $CD$.
We are given a group of $n$ people, where $n$ is divisible by 3, and these people are already partitioned into teams of exactly 3 members each. Each team will only agree to participate in a competition if at least two of its three members are convinced to go.
We are given an even number of friends, say 2n, and each friend has a single integer value representing a pizza flavor preference. The group wants to order exactly n pizzas, and each pizza must be made from two different friends’ preferences.
We are given a tree with vertices labeled from 1 to n. Each vertex acts like a train station, and moving along any edge between two stations costs exactly one ticket. The twist is that tickets are not globally fixed in price.
The coefficient matrix has positive diagonal entries and negative off-diagonal entries.
The expression involves $\sin 2x$ inside two square roots of complementary forms, suggesting the standard algebraic identity
The configuration is affine, involving a tetrahedron and three lines through the vertices of one face parallel to a fixed direction $DD_0$, where $D_0$ lies in the plane $ABC$.
Five given points determine ten straight lines joining them.
We are given a tree with $n$ vertices, and a collection of $m$ distinct “virus types”. Each virus type behaves like a multi-source spreading process on the tree: once a virus is inserted at a vertex, it spreads outward along edges in unit time per edge, effectively forming…
We are building a closed walk on an infinite grid starting from the origin, initially facing east. The walk consists of exactly $n$ straight moves.
We are given a fixed set of points on the plane. From this set, we are allowed to pick some points and mark them as special.
Something went wrong.
We are given a sequence of hedgehogs, each arriving at a known time and staying in a clearing for a fixed duration $T$. While a hedgehog is present, it can be removed by an action called “throwing food”.
We are given a directed structure over $n$ cages where each cage has exactly one outgoing tunnel leading to another cage.
We are given an array of length n where each position stores a small positive integer. A valid structure is a triple of indices i, j, k with i < j < k such that the values form a strict decreasing divisibility chain: a[i] is divisible by a[j], and a[j] is divisible by a[k]…
We are dealing with a hidden array that is already sorted in non-decreasing order. Every element lies between 1 and n, and we are allowed to ask targeted questions about individual positions.
We are given an array of integers. In one move, we are allowed to pick two different elements. If their sum is even, we remove both and append their sum back into the array, so the array size decreases by exactly one.
Let $\triangle ABC$ have semiperimeter $s$ and area $\Delta$, with inradius $r$.
We are given a circular array and a second target array of the same length. One operation lets us pick an index and overwrite that position with the sum of a symmetric window around it, extending k steps to both sides on the circle.
We are given a binary string and we are allowed to modify it using a second binary string that has exactly $m$ ones. Each position where this second string has a 1 flips the corresponding bit of the original string. After all flips, we obtain a new string $T$.
We are given an array and we are allowed to look at any contiguous segment of it. For every such segment we compute its MEX, the smallest non-negative integer that does not appear inside the segment. Among all segments, we first care about those whose MEX is as large as possible.
The expression is symmetric and homogeneous of degree three, suggesting a normalization or a classical symmetric inequality.
We are given a knockout tournament with $N$ players, where $N$ is a power of two. Matches are fixed: adjacent players in the current list play, and winners move forward in order to the next round. This continues until a single champion remains.
The problem concerns divisibility of powers of $2$ by $7$, so the natural setting is arithmetic modulo $7$.
A complete resolution requires controlling two independent structures at once.
We are given an array of integers, where each value is a label written on a panda. For every ordered pair of distinct indices $(i, j)$, we imagine taking the two numbers $xi$ and $xj$ and concatenating them in that order to form a new integer.
Direct substitution with high-precision numerical evaluation confirms that
We are given an array of values and a fixed sequence of index swaps that Jinshi repeatedly applies whenever he “tests” whether the array can be sorted. Importantly, after every test he restores the array, so the swap sequence always runs on a fresh copy.
Two people take turns eating from an infinite sequence of numbered items, starting from 1 and going upward without gaps. The key rule is that each person does not eat a fixed amount: instead, on their turn they eat as many items as their current “capacity” allows.
We are given an array of integers and two independent processes that try to transform it. Each process receives its own copy of the same array.
The task is intentionally minimal: we are given a single integer T and must decide whether it is possible to obtain the string "YES" by simply printing the sample output provided in the problem statement.
We are asked to construct any valid set of marks for Bob’s $n$ courses, each mark being an integer between 0 and 2047, with one extra constraint: the bitwise XOR of all marks must equal a given value $x$.
Each test case gives two large integers, but the formatting in the input suggests they should be read as independent values rather than interpreted as arithmetic expressions.
We are given a single small integer $n$, with $1 le n le 8$, and we must output a specific integer that depends only on this value. There are no additional structures, no hidden input, and no multi-step interaction.