problem stringlengths 58 3.27k | answer stringlengths 0 91 | 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 | 4 |
Let $x,y$ and $z$ be positive real numbers that satisfy the following system of equations:
\[\log_2\left({x \over yz}\right) = {1 \over 2}\]\[\log_2\left({y \over xz}\right) = {1 \over 3}\]\[\log_2\left({z \over xy}\right) = {1 \over 4}\]
Then the value of $\left|\log_2(x^4y^3z^2)\right|$ is $\tfrac{m}{n}$ where $m$ an... | 033 | AIME24 | 25 | 3 |
Let $k$ be a real number such that the system \begin{align*} &|25 + 20i - z| = 5 \ &|z - 4 - k| = |z - 3i - k| \end{align*} has exactly one complex solution $z$. The sum of all possible values of $k$ can be written as $\frac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Find $m + n$. Here $i = \sqrt... | 77 | AIME25 | 38 | 2 |
Circle $\omega_1$ with radius $6$ centered at point $A$ is internally tangent at point $B$ to circle $\omega_2$ with radius $15$. Points $C$ and $D$ lie on $\omega_2$ such that $\overline{BC}$ is a diameter of $\omega_2$ and ${\overline{BC} \perp \overline{AD}}$. The rectangle $EFGH$ is inscribed in $\omega_1$ such tha... | 293 | AIME25 | 51 | 1 |
What is the degree measure of the acute angle formed by lines with slopes $2$ and $\frac{1}{3}$? | 45 | AMC23 | 63 | 5 |
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 | 4 |
In the state of Coinland, coins have values $6,10,$ and $15$ cents. Suppose $x$ is the value in cents of the most expensive item in Coinland that cannot be purchased using these coins with exact change. What is the sum of the digits of $x?$ | 11 | AMC23 | 89 | 3 |
The universe is filled with the Cosmic Microwave Background. Consider the annihilation of high energy \gamma-rays with a photon from the CMB Radiation into electron-positron, i.e. $\gamma\gamma\rightarrow e^{+}e^{-}$. From what energy \gamma-rays would have their lifetimes in the universe limited by this process? Knowi... | 2.6*1e5 GeV | GPQADiamond | 107 | 1 |
Astronomers are studying a system of five exoplanets with circular orbits, discovered through the TTV method. The planets (designated as Planet_1 through Planet_5), which are in orbital resonance, have orbital periods in a ratio of 1:2:2.5:3.5:5. Assuming these planets possess the same albedo, what is the ratio of the ... | ~0.83 | GPQADiamond | 171 | 1 |
The Interaction between the bosonic field X and fermions is given by
\mathcal{L}\left(y\right)=-\lambda{f}\bar{\psi}{f}\left(y\right)\left(\upsilon+X\left(y\right)\right)\psi_{f}\left(y\right)
The mass of the boson X is 6 GeV.
What are the kinematically allowed decays of the boson X at the lowest order?
PS: for the ... | X\rightarrow c\bar{c},s\bar{s},u\bar{u},d\bar{d},\tau^{+}\tau^{-},\mu^{+}\mu^{-},e^{+}e^{-} | GPQADiamond | 235 | 1 |
Convert the point $(0,3)$ in rectangular coordinates to polar coordinates. Enter your answer in the form $(r,\theta),$ where $r > 0$ and $0 \le \theta < 2 \pi.$ | \left( 3, \frac{\pi}{2} \right) | MATH500 | 299 | 1 |
There exist constants $a$, $b$, $c$, and $d$ such that
\[(\sin x)^7 = a \sin 7x + b \sin 5x + c \sin 3x + d \sin x\]for all angles $x$. Find $d$. | \frac{35}{64} | MATH500 | 363 | 1 |
Suzanne walks four miles every third day. What is the fewest number of miles she can walk in February? | 36 | MATH500 | 427 | 1 |
In $\triangle PQR$, we have $PQ = QR = 34$ and $PR = 32$. Find the length of median $\overline{QM}$. | 30 | MATH500 | 491 | 1 |
Simplify $\frac{1}{5}\cdot \frac{8}{7}\div \frac{12}{20}$. | \frac{8}{21} | MATH500 | 555 | 1 |
In the diagram below, we have $\sin \angle RPQ = \frac{7}{25}$. What is $\cos \angle RPS$?
[asy]
pair R,P,Q,SS;
SS = (-2,0);
P = (0,0);
Q = (2,0);
R = rotate(aSin(7/25))*(1.5,0);
dot("$S$",SS,S);
dot("$Q$",Q,S);
dot("$R$",R,N);
dot("$P$",P,S);
draw(Q--SS);
draw(P--R);
[/asy] | -\frac{24}{25} | MATH500 | 619 | 1 |
Simplify the following expression in $x$: $$19x + 1 - 4x - 81.$$ | 15x - 80 | MATH500 | 683 | 1 |
Compute $17^{-1}\pmod{83}$. Express your answer as a residue from $0$ to $82$, inclusive.
(You may find it helpful to consider the fact that $17\cdot 5=85$.) | 44 | MATH500 | 747 | 1 |
You are given an array of integers $a_1, a_2, \ldots, a_n$ and a number $k$ ($2 \leq k \leq 5$). In one operation, you can do the following:
- Choose an index $1 \leq i \leq n$,
- Set $a_i = a_i + 1$.Find the minimum number of operations needed to make the product of all the numbers in the array $a_1 \cdot a_2 \cdo... | LiveCodeBench | 803 | 1 | |
You are given two 0-indexed integer arrays, cost and time, of size n representing the costs and the time taken to paint n different walls respectively. There are two painters available:
A paid painter that paints the i^th wall in time[i] units of time and takes cost[i] units of money.
A free painter that paints any wa... | LiveCodeBench | 824 | 2 | |
The imbalance number of a 0-indexed integer array arr of length n is defined as the number of indices in sarr = sorted(arr) such that:
0 <= i < n - 1, and
sarr[i+1] - sarr[i] > 1
Here, sorted(arr) is the function that returns the sorted version of arr.
Given a 0-indexed integer array nums, return the sum of imbalance... | LiveCodeBench | 845 | 3 | |
Given a 0-indexed string s, permute s to get a new string t such that:
All consonants remain in their original places. More formally, if there is an index i with 0 <= i < s.length such that s[i] is a consonant, then t[i] = s[i].
The vowels must be sorted in the nondecreasing order of their ASCII values. More formally,... | LiveCodeBench | 867 | 1 | |
You are given positive integers low, high, and k.
A number is beautiful if it meets both of the following conditions:
The count of even digits in the number is equal to the count of odd digits.
The number is divisible by k.
Return the number of beautiful integers in the range [low, high].
Example 1:
Input: low = 1... | LiveCodeBench | 888 | 2 | |
You are given a 0-indexed array maxHeights of n integers.
You are tasked with building n towers in the coordinate line. The i^th tower is built at coordinate i and has a height of heights[i].
A configuration of towers is beautiful if the following conditions hold:
1 <= heights[i] <= maxHeights[i]
heights is a mountain... | LiveCodeBench | 909 | 3 | |
You are given two positive integers n and limit.
Return the total number of ways to distribute n candies among 3 children such that no child gets more than limit candies.
Example 1:
Input: n = 5, limit = 2
Output: 3
Explanation: There are 3 ways to distribute 5 candies such that no child gets more than 2 candies: (1... | LiveCodeBench | 931 | 1 | |
You are given a 0-indexed integer array coins, representing the values of the coins available, and an integer target.
An integer x is obtainable if there exists a subsequence of coins that sums to x.
Return the minimum number of coins of any value that need to be added to the array so that every integer in the range [1... | LiveCodeBench | 952 | 2 | |
Alice and Bob are playing a turn-based game on a circular field surrounded by flowers. The circle represents the field, and there are x flowers in the clockwise direction between Alice and Bob, and y flowers in the anti-clockwise direction between them.
The game proceeds as follows:
Alice takes the first turn.
In each... | LiveCodeBench | 973 | 3 | |
There is an enemy with stamina A. Every time you attack the enemy, its stamina reduces by B.
At least how many times do you need to attack the enemy to make its stamina 0 or less?
Input
The input is given from Standard Input in the following format:
A B
Output
Print the answer.
Constraints
- 1 \le A,B \le 10^{1... | LiveCodeBench | 995 | 1 | |
You are given a string S of length N consisting of lowercase English letters.
We denote the i-th character of S by S_i.
Print the string of length 2N obtained by concatenating S_1,S_1,S_2,S_2,\dots,S_N, and S_N in this order.
For example, if S is beginner, print bbeeggiinnnneerr.
Input
The input is given from Standar... | LiveCodeBench | 1,016 | 2 | |
Takahashi wants a beverage called AtCoder Drink in a restaurant.
It can be ordered at a regular price of P yen.
He also has a discount coupon that allows him to order it at a lower price of Q yen.
However, he must additionally order one of the restaurant's N dishes to use that coupon.
For each i = 1, 2, \ldots, N, t... | LiveCodeBench | 1,037 | 3 | |
You are given a string S of length N consisting of lowercase English letters.
Each character of S is painted in one of the M colors: color 1, color 2, ..., color M; for each i = 1, 2, \ldots, N, the i-th character of S is painted in color C_i.
For each i = 1, 2, \ldots, M in this order, let us perform the following ope... | LiveCodeBench | 1,059 | 1 | |
This problem is an easier version of Problem G.
There is a slot machine with three reels.
The arrangement of symbols on the i-th reel is represented by the string S_i. Here, S_i is a string of length M consisting of digits.
Each reel has a corresponding button. For each non-negative integer t, Takahashi can either ch... | LiveCodeBench | 1,080 | 2 | |
You are given a string S of length N consisting of digits.
Find the number of square numbers that can be obtained by interpreting a permutation of S as a decimal integer.
More formally, solve the following.
Let s _ i be the number corresponding to the i-th digit (1\leq i\leq N) from the beginning of S.
Find the number ... | LiveCodeBench | 1,101 | 3 | |
You are given a string S consisting of three different characters: A, B, and C.
As long as S contains the string ABC as a consecutive substring, repeat the following operation:
Remove the leftmost occurrence of the substring ABC from S.
Print the final string S after performing the above procedure.
Input
The input ... | LiveCodeBench | 1,123 | 1 | |
You are given two grids, A and B, each with H rows and W columns.
For each pair of integers (i, j) satisfying 1 \leq i \leq H and 1 \leq j \leq W, let (i, j) denote the cell in the i-th row and j-th column. In grid A, cell (i, j) contains the integer A_{i, j}. In grid B, cell (i, j) contains the integer B_{i, j}.
You w... | LiveCodeBench | 1,144 | 2 | |
There are N people standing in a line: person 1, person 2, \ldots, person N.
You are given the arrangement of the people as a sequence A=(A _ 1,A _ 2,\ldots,A _ N) of length N.
A _ i\ (1\leq i\leq N) represents the following information:
- if A _ i=-1, person i is at the front of the line;
- if A _ i\neq -1, person i ... | LiveCodeBench | 1,165 | 3 | |
A string consisting of 0 and 1 is called a good string if two consecutive characters in the string are always different.
You are given a string S of length N consisting of 0 and 1.
Q queries will be given and must be processed in order.
There are two types of queries:
- 1 L R: Flip each of the L-th to R-th characters ... | LiveCodeBench | 1,187 | 1 | |
There is a grid with H rows and W columns. Initially, all cells are painted with color 0.
You will perform the following operations in the order i = 1, 2, \ldots, M.
-
If T_i = 1, repaint all cells in the A_i-th row with color X_i.
-
If T_i = 2, repaint all cells in the A_i-th column with color X_i.
After all ope... | LiveCodeBench | 1,208 | 2 | |
There is an SNS used by N users, labeled with numbers from 1 to N.
In this SNS, two users can become friends with each other.
Friendship is bidirectional; if user X is a friend of user Y, user Y is always a friend of user X.
Currently, there are M pairs of friendships on the SNS, with the i-th pair consisting of users... | LiveCodeBench | 1,229 | 3 | |
This is an interactive problem (where your program interacts with the judge via input and output).
You are given a positive integer N and integers L and R such that 0 \leq L \leq R < 2^N. The judge has a hidden sequence A = (A_0, A_1, \dots, A_{2^N-1}) consisting of integers between 0 and 99, inclusive.
Your goal is to... | LiveCodeBench | 1,251 | 1 | |
You are given a string s and an integer k.
Define a function distance(s_1, s_2) between two strings s_1 and s_2 of the same length n as:
The sum of the minimum distance between s_1[i] and s_2[i] when the characters from 'a' to 'z' are placed in a cyclic order, for all i in the range [0, n - 1].
For example, distance(... | LiveCodeBench | 1,272 | 2 | |
You are given a string s, which is known to be a concatenation of anagrams of some string t.
Return the minimum possible length of the string t.
An anagram is formed by rearranging the letters of a string. For example, "aab", "aba", and, "baa" are anagrams of "aab".
Example 1:
Input: s = "abba"
Output: 2
Explanation... | LiveCodeBench | 1,293 | 3 |
README.md exists but content is empty.
- Downloads last month
- 6