problem stringlengths 60 2.62k | answer stringlengths 0 101 | task stringclasses 6
values | problem_number int64 12 1.29k | set_number int64 1 5 |
|---|---|---|---|---|
Consider the paths of length $16$ that follow the lines from the lower left corner to the upper right corner on an $8\times 8$ grid. Find the number of such paths that change direction exactly four times, as in the examples shown below. | 294 | AIME24 | 12 | 1 |
Find the number of ways to place a digit in each cell of a 2x3 grid so that the sum of the two numbers formed by reading left to right is $999$, and the sum of the three numbers formed by reading top to bottom is $99$. The grid below is an example of such an arrangement because $8+991=999$ and $9+9+81=99$.
\[\begin{arr... | 045 | AIME24 | 24 | 5 |
The twelve letters $A$,$B$,$C$,$D$,$E$,$F$,$G$,$H$,$I$,$J$,$K$, and $L$ are randomly grouped into six pairs of letters. The two letters in each pair are placed next to each other in alphabetical order to form six two-letter words, and then those six words are listed alphabetically. For example, a possible result is $AB... | 821 | AIME25 | 37 | 4 |
Suppose $\triangle ABC$ has angles $\angle BAC = 84^\circ, \angle ABC=60^\circ,$ and $\angle ACB = 36^\circ.$ Let $D, E,$ and $F$ be the midpoints of sides $\overline{BC}, \overline{AC},$ and $\overline{AB},$ respectively. The circumcircle of $ riangle DEF$ intersects $\overline{BD}, \overline{AE},$ and $\overline{AF}$... | 336 | AIME25 | 50 | 3 |
What is the degree measure of the acute angle formed by lines with slopes $2$ and $\frac{1}{3}$? | 45 | AMC23 | 63 | 2 |
There is a unique sequence of integers $a_1, a_2, \cdots a_{2023}$ such that
\[\tan2023x = \frac{a_1 \tan x + a_3 \tan^3 x + a_5 \tan^5 x + \cdots + a_{2023} \tan^{2023} x}{1 + a_2 \tan^2 x + a_4 \tan^4 x \cdots + a_{2022} \tan^{2022} x}\]whenever $\tan 2023x$ is defined. What is $a_{2023}?$ | -1 | AMC23 | 76 | 1 |
For how many ordered pairs $(a,b)$ of integers does the polynomial $x^3+ax^2+bx+6$ have $3$ distinct integer roots? | 5 | AMC23 | 88 | 5 |
In a parallel universe where a magnet can have an isolated North or South pole, Maxwell’s equations look different. But, specifically, which of those equations are different? | The ones related to the circulation of the electric field and the divergence of the magnetic field. | GPQADiamond | 104 | 1 |
There is a spin 1/2 particle with magnetic moment mu (= gamma*Sz), aligned with a magnetic field pointing in the +Z direction. Suddenly, the magnetic field is turned off, and another one is turned on along the +Y direction; both fields have the same magnitude, B. The average of the z-component of the particle’s moment ... | gamma*B | GPQADiamond | 168 | 1 |
The 1H NMR spectrum of a solution containing a 1:1 mixture of two aromatic compounds with the molecular formula C10H14 exhibits two signals (two singlets) at around 6.7 ppm in a 1:1 ratio. There are also three signals at around 2.2 ppm (all singlets) in a 2:1:1 ratio. Which two compounds are present in the mixture from... | 1,2,4,5-tetramethylbenzene and 1,2,3,4-tetramethylbenzene | GPQADiamond | 232 | 1 |
Consider a 1-dimensional relativistic harmonic oscillator with mass $m$ and maximum amplitude $A$ obeying Hook's law ($F=-kx$). What is the maximum speed $v_max$ of the mass? The speed of light is $c$. | $v_{max}=c\sqrt{1-\frac{1}{(1+\frac{kA^2}{2mc^2})^2}}$ | GPQADiamond | 296 | 1 |
For some real numbers $a$ and $b$, the equation \[
8x^3 + 4ax^2 + 2bx + a = 0
\]has three distinct positive roots. If the sum of the base-2 logarithms of the roots is 5, what is the value of $a$? | -256 | MATH500 | 360 | 1 |
Evaluate $\lceil (3.6)^2 \rceil - ( \lceil 3.6 \rceil ) ^2$. | -3 | MATH500 | 424 | 1 |
Five points $A$, $B$, $C$, $D$, and $O$ lie on a flat field. $A$ is directly north of $O$, $B$ is directly west of $O$, $C$ is directly south of $O$, and $D$ is directly east of $O$. The distance between $C$ and $D$ is 140 m. A hot-air balloon is positioned in the air at $H$ directly above $O$. The balloon is held i... | 160 | MATH500 | 488 | 1 |
What fraction of 2 feet is 3 inches? Express your answer as a common fraction. | \frac{1}{8} | MATH500 | 552 | 1 |
Let $a,$ $b,$ and $c$ be distinct real numbers. Find the degree of the polynomial
\[p(x) = \frac{(x - b)(x - c)}{(a - b)(a - c)} + \frac{(x - a)(x - c)}{(b - a)(b - c)} + \frac{(x - a)(x - b)}{(c - a)(c - b)}.\] | 0 | MATH500 | 616 | 1 |
Two numbers, $x$ and $y$ are selected at random from the interval $(0,3)$. What is the probability that a triangle with sides of length 1, $x$, and $y$ exists? | \frac{1}{2} | MATH500 | 680 | 1 |
The circle $x^2 + y^2 = 2$ and the parabola $y^2 = 8x$ have two common tangents, forming four points of tangency. Find the area of the quadrilateral formed by the four points of tangency.
[asy]
unitsize(0.8 cm);
real upperparab (real x) {
return (sqrt(8*x));
}
real lowerparab (real x) {
return (-sqrt(8*x));
}
... | 15 | MATH500 | 744 | 1 |
You are given a string $s$ of length $n$, consisting of lowercase Latin letters, and an integer $k$.
You need to check if it is possible to remove exactly $k$ characters from the string $s$ in such a way that the remaining characters can be rearranged to form a palindrome. Note that you can reorder the remaining chara... | LiveCodeBench | 802 | 1 | |
Given a positive integer n, return the punishment number of n.
The punishment number of n is defined as the sum of the squares of all integers i such that:
1 <= i <= n
The decimal representation of i * i can be partitioned into contiguous substrings such that the sum of the integer values of these substrings equals i.... | LiveCodeBench | 823 | 2 | |
You are given a 0-indexed integer array nums containing n distinct positive integers. A permutation of nums is called special if:
For all indexes 0 <= i < n - 1, either nums[i] % nums[i+1] == 0 or nums[i+1] % nums[i] == 0.
Return the total number of special permutations. As the answer could be large, return it modulo... | LiveCodeBench | 844 | 3 | |
Your laptop keyboard is faulty, and whenever you type a character 'i' on it, it reverses the string that you have written. Typing other characters works as expected.
You are given a 0-indexed string s, and you type each character of s using your faulty keyboard.
Return the final string that will be present on your lapt... | LiveCodeBench | 866 | 1 | |
You are given a 0-indexed integer array nums and an integer x.
Find the minimum absolute difference between two elements in the array that are at least x indices apart.
In other words, find two indices i and j such that abs(i - j) >= x and abs(nums[i] - nums[j]) is minimized.
Return an integer denoting the minimum abso... | LiveCodeBench | 887 | 2 | |
You are given a 0-indexed array of integers nums, and an integer target.
Return the length of the longest subsequence of nums that sums up to target. If no such subsequence exists, return -1.
A subsequence is an array that can be derived from another array by deleting some or no elements without changing the order of t... | LiveCodeBench | 908 | 3 | |
You are given a 0-indexed integer array nums and an integer k.
You can perform the following operation on the array at most k times:
Choose any index i from the array and increase or decrease nums[i] by 1.
The score of the final array is the frequency of the most frequent element in the array.
Return the maximum scor... | LiveCodeBench | 930 | 1 | |
You are given a 0-indexed string word.
In one operation, you can pick any index i of word and change word[i] to any lowercase English letter.
Return the minimum number of operations needed to remove all adjacent almost-equal characters from word.
Two characters a and b are almost-equal if a == b or a and b are adjacent... | LiveCodeBench | 951 | 2 | |
You are given a 0-indexed integer array nums of size n, and a 0-indexed integer array pattern of size m consisting of integers -1, 0, and 1.
A subarray nums[i..j] of size m + 1 is said to match the pattern if the following conditions hold for each element pattern[k]:
nums[i + k + 1] > nums[i + k] if pattern[k] == 1.
n... | LiveCodeBench | 972 | 3 | |
A DDoS-type string is a string of length 4 consisting of uppercase and lowercase English letters satisfying both of the following conditions.
- The first, second, and fourth characters are uppercase English letters, and the third character is a lowercase English letter.
- The first and second characters are equal.
Fo... | LiveCodeBench | 994 | 1 | |
There is a simple undirected graph with N vertices and M edges, where vertices are numbered from 1 to N, and edges are numbered from 1 to M. Edge i connects vertex a_i and vertex b_i.
K security guards numbered from 1 to K are on some vertices. Guard i is on vertex p_i and has a stamina of h_i. All p_i are distinct.
A ... | LiveCodeBench | 1,015 | 2 | |
There is a family consisting of person 1, person 2, \ldots, and person N. For i\geq 2, person i's parent is person p_i.
They bought insurance M times. For i=1,2,\ldots,M, person x_i bought the i-th insurance, which covers that person and their descendants in the next y_i generations.
How many people are covered by ... | LiveCodeBench | 1,036 | 3 | |
N people, person 1, person 2, \ldots, person N, are playing roulette.
The outcome of a spin is one of the 37 integers from 0 to 36.
For each i = 1, 2, \ldots, N, person i has bet on C_i of the 37 possible outcomes: A_{i, 1}, A_{i, 2}, \ldots, A_{i, C_i}.
The wheel has been spun, and the outcome is X.
Print the numbe... | LiveCodeBench | 1,058 | 1 | |
You are given a string S.
Find the maximum length of a contiguous substring of S that is a palindrome.
Note that there is always a contiguous substring of S that is a palindrome.
Input
The input is given from Standard Input in the following format:
S
Output
Print the answer.
Constraints
- S is a string of leng... | LiveCodeBench | 1,079 | 2 | |
Takahashi sent a string T consisting of lowercase English letters to Aoki. As a result, Aoki received a string T' consisting of lowercase English letters.
T' may have been altered from T. Specifically, exactly one of the following four conditions is known to hold.
- T' is equal to T.
- T' is a string obtained by inser... | LiveCodeBench | 1,100 | 3 | |
You are given a string S = S_1S_2\ldots S_N of length N consisting of lowercase English letters.
Additionally, you are given Q queries about the string S.
For i = 1, 2, \ldots, Q, the i-th query is represented by two integers l_i, r_i and asks the following.
In the substring S_{l_i}S_{l_i+1}\ldots S_{r_i} of S, which... | LiveCodeBench | 1,122 | 1 | |
AtCoder Inc. sells T-shirts with its logo.
You are given Takahashi's schedule for N days as a string S of length N consisting of 0, 1, and 2.
Specifically, for an integer i satisfying 1\leq i\leq N,
- if the i-th character of S is 0, he has no plan scheduled for the i-th day;
- if the i-th character of S is 1, he plan... | LiveCodeBench | 1,143 | 2 | |
We define Extended A strings, Extended B strings, Extended C strings, and Extended ABC strings as follows:
- A string S is an Extended A string if all characters in S are A.
- A string S is an Extended B string if all characters in S are B.
- A string S is an Extended C string if all characters in S are C.
- A string ... | LiveCodeBench | 1,164 | 3 | |
You are given three positive integers N, M, and K. Here, N and M are different.
Print the K-th smallest positive integer divisible by exactly one of N and M.
Input
The input is given from Standard Input in the following format:
N M K
Output
Print the K-th smallest positive integer divisible by exactly one of N and ... | LiveCodeBench | 1,186 | 1 | |
There is an infinitely long piano keyboard.
Is there a continuous segment within this keyboard that consists of W white keys and B black keys?
Let S be the string formed by infinitely repeating the string wbwbwwbwbwbw.
Is there a substring of S that consists of W occurrences of w and B occurrences of b?
What is a sub... | LiveCodeBench | 1,207 | 2 | |
You are given a permutation A=(A_1,\ldots,A_N) of (1,2,\ldots,N).
Transform A into (1,2,\ldots,N) by performing the following operation between 0 and N-1 times, inclusive:
- Operation: Choose any pair of integers (i,j) such that 1\leq i < j \leq N. Swap the elements at the i-th and j-th positions of A.
It can be pro... | LiveCodeBench | 1,228 | 3 | |
The pattern of AtCoder's wallpaper can be represented on the xy-plane as follows:
-
The plane is divided by the following three types of lines:
-
x = n (where n is an integer)
-
y = n (where n is an even number)
-
x + y = n (where n is an even number)
-
Each region is painted black or white. Any two regions... | LiveCodeBench | 1,250 | 1 | |
You are given an array of integers nums. Return the length of the longest subarray of nums which is either strictly increasing or strictly decreasing.
Example 1:
Input: nums = [1,4,3,3,2]
Output: 2
Explanation:
The strictly increasing subarrays of nums are [1], [2], [3], [3], [4], and [1,4].
The strictly decreasing ... | LiveCodeBench | 1,271 | 2 | |
You are given a string word of size n, and an integer k such that k divides n.
In one operation, you can pick any two indices i and j, that are divisible by k, then replace the substring of length k starting at i with the substring of length k starting at j. That is, replace the substring word[i..i + k - 1] with the su... | LiveCodeBench | 1,292 | 3 |
README.md exists but content is empty.
- Downloads last month
- 6