brain

tamnd's digital brain — notes, problems, research

43815 notes

IMO 1978 LL USA42

A, B, C, D, E are points on a circle O with radius equal to r.

imolonglistmathematicsolympiad
IMO 1970 LL ROM48

Let a polynomial p(x) with integer coefficients take the value

imolonglistmathematicsolympiad
IMO 1984 LL POL45

Let X be an arbitrary nonempty set contained in the plane and

imolonglistmathematicsolympiad
IMO 1972 LL BUL3

On a line a set of segments is given of total length less than

imolonglistmathematicsolympiad
IMO 1969 LL HUN38

Let r and m (r \leqm) be natural numbers and Ak = 2k−1

imolonglistmathematicsolympiad
IMO 1989 LL POR83

Poldavia is a strange kingdom. Its currency unit is the bourbaki

imolonglistmathematicsolympiad
IMO 1985 LL CUB17

Set

imolonglistmathematicsolympiad
IMO 1989 LL MON68

If 0 < k \leq1 and ai are positive real numbers, i = 1, 2, . . . , n,

imolonglistmathematicsolympiad
IMO 1969 LL BEL2

(a) Find the equations of regular hyperbolas passing through

imolonglistmathematicsolympiad
IMO 1992 LL ITA39

Let n \geq2 be an integer. Find the minimum k for which there

imolonglistmathematicsolympiad
IMO 1986 LL FRA24

Two families of parallel lines are given in the plane, consisting

imolonglistmathematicsolympiad
IMO 1992 LL TWN77

Show that if 994 integers are chosen from 1, 2, . . . , 1992 and

imolonglistmathematicsolympiad
IMO 1988 LL HKG31

The circle x2 + y2 = r2 meets the coordinate axes at A =

imolonglistmathematicsolympiad
IMO 1985 LL BRA7

A convex quadrilateral is inscribed in a circle of radius 1. Prove

imolonglistmathematicsolympiad
IMO 1967 LL USS58

A linear binomial l(z) = Az + B with complex coefficients A

imolonglistmathematicsolympiad
IMO 1969 LL GDR29

Find all real numbers \lambda such that the equation

imolonglistmathematicsolympiad
IMO 1986 LL MOR57

In a triangle ABC, the incircle touches the sides BC, CA, AB

imolonglistmathematicsolympiad
IMO 1970 LL SWE53

A square ABCD is divided into (n −1)2 congruent squares,

imolonglistmathematicsolympiad
IMO 1979 LL ROM55

Let a, b be coprime integers. Show that the equation ax2 +

imolonglistmathematicsolympiad
IMO 1967 LL POL38

Does there exist an integer such that its cube is equal to

imolonglistmathematicsolympiad
IMO 1971 LL AUT1

The points S(i, j) with integer Cartesian coordinates 0 < i \leqn,

imolonglistmathematicsolympiad
IMO 1967 LL SWE52

In the plane a point O and a sequence of points P1, P2, P3, . . .

imolonglistmathematicsolympiad
IMO 1992 LL IRN37

Let the circles C1, C2, and C3 be orthogonal to the circle C

imolonglistmathematicsolympiad
IMO 1967 LL MON32

Determine the volume of the body obtained by cutting the

imolonglistmathematicsolympiad
IMO 1979 LL VIE72

Let f(x) be a polynomial with integer coefficients. Prove that

imolonglistmathematicsolympiad
IMO 1984 LL BUL9

The circle inscribed in the triangle A1A2A3 is tangent to

imolonglistmathematicsolympiad
IMO 1986 LL USS78

If T and T1 are two triangles with angles x, y, z and x1, y1, z1,

imolonglistmathematicsolympiad
IMO 1969 LL BEL3

Construct the circle that is tangent to three given circles.

imolonglistmathematicsolympiad
IMO 1989 LL THA98

Let f : N oN be such that

imolonglistmathematicsolympiad
IMO 1989 LL BUL6

The circles c1 and c2 are tangent at the point A. A straight

imolonglistmathematicsolympiad
IMO 1985 LL USA89

Given that n elements a1, a2, . . . , an are organized into n pairs

imolonglistmathematicsolympiad
IMO 1988 LL POL71

Given integers a1, . . . , a10, prove that there exists a nonzero

imolonglistmathematicsolympiad
IMO 1979 LL FRA21

Let E be the set of all bijective mappings from R to R satisfying

imolonglistmathematicsolympiad
IMO 1971 LL CUB11

Prove that n! cannot be the square of any natural number.

imolonglistmathematicsolympiad
IMO 1971 LL GDR19

In a triangle P1P2P3 let PiQi be the altitude from Pi for

imolonglistmathematicsolympiad
IMO 1986 LL USS79

Let AA1, BB1, CC1 be the altitudes in an acute-angled triangle

imolonglistmathematicsolympiad
IMO 1988 LL USA81

There are n \geq3 job openings at a factory, ranked 1 to n in

imolonglistmathematicsolympiad
IMO 1984 LL BUL7

Prove that for any natural number n, the number

imolonglistmathematicsolympiad
IMO 1977 LL GBR19

Given any integer m > 1 prove that there exist infinitely

imolonglistmathematicsolympiad
IMO 1988 LL FRA12

Show that there do not exist more than 27 half-lines (or rays)

imolonglistmathematicsolympiad
IMO 1971 LL BUL6

Let squares be constructed on the sides BC, CA, AB of a trian-

imolonglistmathematicsolympiad
IMO 1969 LL CZS13

Let p be a prime odd number. Is it possible to find p−1 natural

imolonglistmathematicsolympiad
IMO 1977 LL HUN25

Prove the identity

imolonglistmathematicsolympiad
IMO 1989 LL IRE54

Let f be a function from the real numbers to the real numbers

imolonglistmathematicsolympiad
IMO 1984 LL MOR37

Denote by [x] the greatest integer not exceeding x. For all

imolonglistmathematicsolympiad
IMO 1972 LL ROM32

If n1, n2, . . . , nk are natural numbers and n1+n2+\cdot \cdot \cdot+nk = n,

imolonglistmathematicsolympiad
IMO 1986 LL IRE46

We wish to construct a matrix with 19 rows and 86 columns,

imolonglistmathematicsolympiad
IMO 1966 LL HUN20

We are given three equal rectangles with the same center in

imolonglistmathematicsolympiad
IMO 1988 LL GRE29

Find positive integers x1, x2, . . . , x29, at least one of which is

imolonglistmathematicsolympiad
IMO 1983 LL USA64

The sum of all the face angles about all of the vertices except

imolonglistmathematicsolympiad
IMO 1988 LL SIN73

In a group of n people each one knows exactly three others. They

imolonglistmathematicsolympiad
IMO 1985 LL MON53

For each P inside the triangle ABC, let A(P), B(P), and

imolonglistmathematicsolympiad
IMO 1987 LL GBR26

Prove that if x, y, z are real numbers such that x2+y2+z2 = 2,

imolonglistmathematicsolympiad
IMO 1986 LL GBR31

Let P and Q be distinct points in the plane of a triangle ABC

imolonglistmathematicsolympiad
IMO 1966 LL USS56

Let ABCD be a tetrahedron such that AB \perpCD,

imolonglistmathematicsolympiad
IMO 1988 LL INA46

(a) Calculate x = (11+6

imolonglistmathematicsolympiad
IMO 1989 LL FIN17

Let a, 0 < a < 1, be a real number and f a continuous function

imolonglistmathematicsolympiad
IMO 1973 Problem 3

The polynomial

imomathematicsolympiad
IMO 1973 Problem 2

The reviewers correctly identified that the previous proof failed at the planar lemma.

imomathematicsolympiad
IMO 1973 Problem 1

The reviewer identified a false claim in the previous proof:

imomathematicsolympiad
IMO 1972 Problem 6

The problem asks for the existence of a regular tetrahedron with one vertex on each of four given distinct parallel planes in $\mathbb{R}^3$.

imomathematicsolympiad
IMO 1972 Problem 4

The system involves five positive real numbers $(x_1, x_2, x_3, x_4, x_5)$ linked cyclically by inequalities of the form $(x_i^2 - x_{i+2}x_{i+4})(x_{i+1}^2 - x_{i+2}x_{i+4}) \le 0$, where indices are…

imomathematicsolympiad
IMO 1972 Problem 3

Consider small values of $m$ and $n$ to examine the expression

imomathematicsolympiad
IMO 1972 Problem 2

A cyclic quadrilateral is given.

imomathematicsolympiad
IMO 1972 Problem 1

Consider a set of ten distinct two-digit numbers, $S = {a_1, a_2, \dots, a_{10}}$, and examine the sums of all its non-empty subsets.

imomathematicsolympiad
IMO 1971 Problem 6

The reviewer identified only one critical flaw, namely the final deduction from

imomathematicsolympiad
IMO 1971 Problem 5

For small values of $m$, explicit examples suggest a graph-theoretic interpretation.

imomathematicsolympiad
IMO 1971 Problem 4

The path $XYZTX$ lies on the four faces adjacent cyclically around the tetrahedron.

imomathematicsolympiad
IMO 1971 Problem 3

The sequence begins

imomathematicsolympiad
IMO 1971 Problem 2

Let $P_1$ be a convex polyhedron with nine vertices $A_1,\dots,A_9$ in $\mathbb{R}^3$, and let $P_i = P_1 + (A_i - A_1)$ for $i=2,\dots,9$.

imomathematicsolympiad
IMO 1971 Problem 1

Define

imomathematicsolympiad
IMO 1959 Problem 1

The fraction

imomathematicsolympiad
LeetCode 2364 - Count Number of Bad Pairs

The problem asks us to count the number of bad pairs in an array. We are given a 0-indexed integer array nums, and a pair of indices (i, j) is considered bad if: - i < j - j - i !

leetcodemediumarrayhash-tablemathcounting
LeetCode 2930 - Number of Strings Which Can Be Rearranged to Contain Substring

The problem asks us to count how many strings of length n made of lowercase English letters can be rearranged to contain the substring "leet". In other words, a string is "good" if, after any permutation of its characters, "leet" appears as a contiguous sequence.

leetcodemediummathdynamic-programmingcombinatorics
CF 149E - Martian Strings

The problem describes a Martian with a row of eyes, each covered by a patch marked with an uppercase letter. The string of letters visible when all eyes are opened represents a sequence s of length n.

codeforcescompetitive-programmingstring-suffix-structuresstrings
LeetCode 3179 - Find the N-th Value After K Seconds

The problem requires computing the value of the last element in an array after a series of sequential cumulative sum operations over a fixed number of seconds. You start with an array a of length n where all elements are initialized to 1.

leetcodemediumarraymathsimulationcombinatoricsprefix-sum
LeetCode 3147 - Taking Maximum Energy From the Mystic Dungeon

The problem asks us to maximize the total energy gained from a sequence of magicians arranged in a line, where each magician provides a certain energy value, which can be negative or positive.

leetcodemediumarraydynamic-programmingprefix-sum
LeetCode 1943 - Describe the Painting

The problem describes a painting laid out on a number line. Each segment of the painting is represented as a half-closed interval [start, end) and is painted with a unique color value.

leetcodemediumarrayhash-tablesortingprefix-sum
LeetCode 2676 - Throttle

This problem asks us to implement a throttling mechanism for a function. We are given a function fn and a delay interval t in milliseconds. We must return a new function, called a throttled function, that controls how often fn is allowed to execute.

leetcodemedium
LeetCode 1950 - Maximum of Minimum Values in All Subarrays

This problem asks us to compute, for every possible subarray size, the best possible minimum value among all subarrays of that size. Given an array nums of length n, we must evaluate every window size from 1 to n. For each size k, we consider all contiguous subarrays of length k.

leetcodemediumarraystackmonotonic-stack
CF 152B - Steps

We have a rectangular grid with n rows and m columns. Vasya starts at position (xc, yc). Then he processes k movement vectors one by one. For a vector (dx, dy), he repeatedly moves: He keeps moving in that direction until the next move would leave the grid.

codeforcescompetitive-programmingbinary-searchimplementation
LeetCode 1957 - Delete Characters to Make Fancy String

The problem asks us to transform a given string into a "fancy string". A fancy string is defined as a string that does not contain three consecutive identical characters anywhere in the string.

leetcodeeasystring
LeetCode 3120 - Count the Number of Special Characters I

The problem asks us to count the number of special characters in a given string word. A character is defined as special if it appears in both lowercase and uppercase forms within the same string.

leetcodeeasyhash-tablestring
LeetCode 3273 - Minimum Amount of Damage Dealt to Bob

This problem asks us to determine the minimum total damage Bob will receive while fighting a group of enemies. Each enemy has two attributes: - damage[i], the amount of damage they inflict on Bob every second while alive. - health[i], the amount of health they start with.

leetcodehardarraygreedysorting
LeetCode 2840 - Check if Strings Can be Made Equal With Operations II

The problem asks us to determine whether two strings s1 and s2 of equal length can be made identical using a specific type of swap operation.

leetcodemediumhash-tablestringsorting
LeetCode 2905 - Find Indices With Index and Value Difference II

The problem asks us to find two indices i and j in an integer array nums that satisfy two conditions simultaneously: the absolute difference between the indices must be at least indexDifference (abs(i - j) = indexDifference) and the absolute difference between the values at…

leetcodemediumarraytwo-pointers
LeetCode 2737 - Find the Closest Marked Node

That is a very large, detailed reference document with multiple long sections, full walkthroughs, two language implementations, worked examples, test suites, and edge case analysis for LeetCode 2737.

leetcodemediumarraygraph-theoryheap-(priority-queue)shortest-path
LeetCode 3226 - Number of Bit Changes to Make Two Integers Equal

The problem gives us two positive integers, n and k. We are allowed to perform one specific operation on n: choose any bit that is currently 1 in the binary representation of n and change it to 0.

leetcodeeasybit-manipulation
CF 159B - Matchmaker

We have two collections of objects. Markers are described by (color, diameter) and caps are also described by (color, diameter). A cap can be attached to a marker only if the diameters are equal.

codeforcescompetitive-programming*specialgreedysortings
CF 144E - Competition

We are given a triangular region of a square matrix called an n-degree staircase. In this staircase, each cell is accessible except for the area above the secondary diagonal, which runs from the top right to the bottom left.

codeforcescompetitive-programmingdata-structuresgreedy
CF 246C - Beauty Pageant

We are asked to select soldiers from a battalion to participate in a beauty pageant over several days. Each soldier has a unique beauty value. On each day, we must send a group of soldiers whose combined beauty is unique compared to the other days.

codeforcescompetitive-programmingbrute-forceconstructive-algorithmsgreedy
LeetCode 2280 - Minimum Lines to Represent a Line Chart

In this problem, we are given a list of stock prices over different days. Each element in stockPrices is a pair: This represents a point on a 2D graph where: - The X-axis is the day - The Y-axis is the stock price on that day The line chart is formed by connecting consecutive…

leetcodemediumarraymathgeometrysortingnumber-theory
LeetCode 2638 - Count the Number of K-Free Subsets

That is a detailed, long-form solution guide request. Before I generate it, I need one missing detail: do you want the solution centered on the optimal DP + graph/component approach (grouping numbers by modulo k and solving independent chains with house-robber style DP), or…

leetcodemediumarraymathdynamic-programmingsortingcombinatorics
CF 187E - Heaven Tour

We have n people placed on a line at strictly increasing coordinates. PMP starts at person s, which immediately counts as visited. Every later move must go either strictly left or strictly right, depending on the ticket used for that move.

codeforcescompetitive-programmingdata-structuresgreedy
LeetCode 3272 - Find the Count of Good Integers

The problem asks us to count n-digit integers that are "good" with respect to a given integer k. A "good" integer is one whose digits can be rearranged to form a k-palindromic integer.

leetcodehardhash-tablemathcombinatoricsenumeration
LeetCode 2471 - Minimum Number of Operations to Sort a Binary Tree by Level

The problem asks us to determine the minimum number of swap operations required to sort the values of a binary tree level by level in strictly increasing order. Specifically, at each level of the tree, we can only swap values of nodes that exist on that level.

leetcodemediumtreebreadth-first-searchbinary-tree
LeetCode 3144 - Minimum Substring Partition of Equal Character Frequency

In this problem, we are given a lowercase English string s, and we must split it into one or more contiguous substrings such that every substring is balanced. A substring is considered balanced when every distinct character inside it appears the same number of times.

leetcodemediumhash-tablestringdynamic-programmingcounting
CF 201E - Thoroughly Bureaucratic Organization

The problem involves a set of people, each with an appointment on a unique day in the next n days. You do not know who is scheduled on which day, but you can query the organization in forms that list up to m names.

codeforcescompetitive-programmingbinary-searchcombinatorics
LeetCode 2944 - Minimum Number of Coins for Fruits

This problem asks us to determine the minimum number of coins required to acquire all fruits in a market where buying a fruit grants a special reward. You are given a 0-indexed array prices, where prices[i] represents the cost of purchasing the (i + 1)th fruit.

leetcodemediumarraydynamic-programmingqueueheap-(priority-queue)monotonic-queue
LeetCode 2338 - Count the Number of Ideal Arrays

The problem asks us to count how many arrays of length n satisfy a divisibility condition while keeping every value within the range [1, maxValue]. An array arr is considered ideal if: 1. Every element is between 1 and maxValue. 2.

leetcodehardmathdynamic-programmingcombinatoricsnumber-theory