leetcode.cn 2025-09-02
🟡3025.find-the-number-of-ways-to-place-people-i
🏷️ Tags
#geometry #array #math #enumeration #sorting
🟡3025.find-the-number-of-ways-to-place-people-i
🏷️ Tags
#geometry #array #math #enumeration #sorting
Telegraph
find-the-number-of-ways-to-place-people-i
给你一个 n x 2 的二维数组 points ,它表示二维平面上的一些点坐标,其中 points[i] = [xi, yi] 。 计算点对 (A, B) 的数量,其中
leetcode.com 2025-09-02
🟡3025.find-the-number-of-ways-to-place-people-i
🏷️ Tags
#geometry #array #math #enumeration #sorting
🟡3025.find-the-number-of-ways-to-place-people-i
🏷️ Tags
#geometry #array #math #enumeration #sorting
Telegraph
find-the-number-of-ways-to-place-people-i
You are given a 2D array points of size n x 2 representing integer coordinates of some points on a 2D plane, where points[i] = [xi, yi]. Count the number of pairs of points (A, B), where
leetcode.cn 2025-09-03
🔴3027.find-the-number-of-ways-to-place-people-ii
🏷️ Tags
#geometry #array #math #enumeration #sorting
🔴3027.find-the-number-of-ways-to-place-people-ii
🏷️ Tags
#geometry #array #math #enumeration #sorting
Telegraph
find-the-number-of-ways-to-place-people-ii
给你一个 n x 2 的二维数组 points ,它表示二维平面上的一些点坐标,其中 points[i] = [xi, yi] 。 我们定义 x 轴的正方向为 右 (x 轴递增的方向),x 轴的负方向为 左 (x 轴递减的方向)。类似的,我们定义 y 轴的正方向为 上 (y 轴递增的方向),y 轴的负方向为 下 (y 轴递减的方向)。 你需要安排这 n 个人的站位,这 n 个人中包括 Alice 和 Bob 。你需要确保每个点处 恰好 有 一个 人。同时,Alice 想跟 Bob 单独玩耍,所以 Alice…
leetcode.com 2025-09-03
🔴3027.find-the-number-of-ways-to-place-people-ii
🏷️ Tags
#geometry #array #math #enumeration #sorting
🔴3027.find-the-number-of-ways-to-place-people-ii
🏷️ Tags
#geometry #array #math #enumeration #sorting
Telegraph
find-the-number-of-ways-to-place-people-ii
You are given a 2D array points of size n x 2 representing integer coordinates of some points on a 2D-plane, where points[i] = [xi, yi]. We define the right direction as positive x-axis (increasing x-coordinate) and the left direction as negative x-axis (decreasing…
leetcode.cn 2025-09-05
🟡2749.minimum-operations-to-make-the-integer-zero
🏷️ Tags
#bit_manipulation #brainteaser #enumeration
🟡2749.minimum-operations-to-make-the-integer-zero
🏷️ Tags
#bit_manipulation #brainteaser #enumeration
Telegraph
minimum-operations-to-make-the-integer-zero
给你两个整数:num1 和 num2 。 在一步操作中,你需要从范围 [0, 60] 中选出一个整数 i ,并从 num1 减去 2i + num2 。 请你计算,要想使 num1 等于 0 需要执行的最少操作数,并以整数形式返回。 如果无法使 num1 等于 0 ,返回 -1 。 示例 1: 输入:num1 = 3, num2 = -2 输出:3 解释:可以执行下述步骤使 3 等于 0 : - 选择 i = 2 ,并从 3 减去 22 + (-2) ,num1 = 3 - (4 + (-2)) =…
leetcode.com 2025-09-05
🟡2749.minimum-operations-to-make-the-integer-zero
🏷️ Tags
#bit_manipulation #brainteaser #enumeration
🟡2749.minimum-operations-to-make-the-integer-zero
🏷️ Tags
#bit_manipulation #brainteaser #enumeration
Telegraph
minimum-operations-to-make-the-integer-zero
You are given two integers num1 and num2. In one operation, you can choose integer i in the range [0, 60] and subtract 2i + num2 from num1. Return the integer denoting the minimum number of operations needed to make num1 equal to 0. If it is impossible to…
leetcode.cn 2025-09-06
🔴3495.minimum-operations-to-make-array-elements-zero
🏷️ Tags
#bit_manipulation #array #math
🔴3495.minimum-operations-to-make-array-elements-zero
🏷️ Tags
#bit_manipulation #array #math
Telegraph
minimum-operations-to-make-array-elements-zero
给你一个二维数组 queries,其中 queries[i] 形式为 [l, r]。每个 queries[i] 表示了一个元素范围从 l 到 r (包括 l 和 r )的整数数组 nums 。
leetcode.com 2025-09-06
🔴3495.minimum-operations-to-make-array-elements-zero
🏷️ Tags
#bit_manipulation #array #math
🔴3495.minimum-operations-to-make-array-elements-zero
🏷️ Tags
#bit_manipulation #array #math
Telegraph
minimum-operations-to-make-array-elements-zero
You are given a 2D array queries, where queries[i] is of the form [l, r]. Each queries[i] defines an array of integers nums consisting of elements ranging from l to r, both inclusive. In one operation, you can:
leetcode.cn 2025-09-09
🟡2327.number-of-people-aware-of-a-secret
🏷️ Tags
#queue #dynamic_programming #simulation
🟡2327.number-of-people-aware-of-a-secret
🏷️ Tags
#queue #dynamic_programming #simulation
Telegraph
number-of-people-aware-of-a-secret
在第 1 天,有一个人发现了一个秘密。 给你一个整数 delay ,表示每个人会在发现秘密后的 delay 天之后,每天 给一个新的人 分享 秘密。同时给你一个整数 forget ,表示每个人在发现秘密 forget 天之后会 忘记 这个秘密。一个人 不能 在忘记秘密那一天及之后的日子里分享秘密。 给你一个整数 n ,请你返回在第 n 天结束时,知道秘密的人数。由于答案可能会很大,请你将结果对 109 + 7 取余 后返回。 示例 1: 输入:n = 6, delay = 2, forget = 4…
leetcode.com 2025-09-09
🟡2327.number-of-people-aware-of-a-secret
🏷️ Tags
#queue #dynamic_programming #simulation
🟡2327.number-of-people-aware-of-a-secret
🏷️ Tags
#queue #dynamic_programming #simulation
Telegraph
number-of-people-aware-of-a-secret
On day 1, one person discovers a secret. You are given an integer delay, which means that each person will share the secret with a new person every day, starting from delay days after discovering the secret. You are also given an integer forget, which means…